docs: fix README validate order and plain-language pass - #35
Merged
Merged
Conversation
- Call container.validate() after DIInterceptor(container), which registers grpc_context_provider - Drop version-history wording from the async/lifecycle paragraph - Remove dashes; fix shared footer wording
DIInterceptor registers grpc_context_provider, so validating first would fail for any provider that depends on grpc.ServicerContext.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
README fixes from a docs review.
The usage example called
container.validate()beforeDIInterceptor(container). The interceptor constructor registersgrpc_context_provider(modern_di_grpc/main.py,DIInterceptor.__init__->_ensure_context_provider), so any provider depending ongrpc.ServicerContextfails validation ifvalidate()runs first. Reproduced with a minimal script:validate()before the interceptor raisesValidationFailedError; after it, it passes.Changes
container.validate()after the server/interceptor is built, with the same comment the other integration READMEs useexamples/app.pyhad the same order and now validates after constructing the interceptor.Checklist
ruff)ty)uv build) if packaging or build config changeddescription, profile blurb) if this touches packaging