Skip to content

docs: fix README validate order and plain-language pass - #35

Merged
lesnik512 merged 2 commits into
mainfrom
docs/fix-facts
Oct 3, 2026
Merged

lesnik512 merged 2 commits into
mainfrom
docs/fix-facts

Conversation

@lesnik512

@lesnik512 lesnik512 commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Summary

README fixes from a docs review.

The usage example called container.validate() before DIInterceptor(container). The interceptor constructor registers grpc_context_provider (modern_di_grpc/main.py, DIInterceptor.__init__ -> _ensure_context_provider), so any provider depending on grpc.ServicerContext fails validation if validate() runs first. Reproduced with a minimal script: validate() before the interceptor raises ValidationFailedError; after it, it passes.

Changes

  • Move container.validate() after the server/interceptor is built, with the same comment the other integration READMEs use
  • Rewrite the async/lifecycle paragraph without version history ("As of modern-di 3.1", "no longer need to") or bold phrases
  • Replace the em dash in the Usage intro
  • Shared footer: "with an IoC container"; org link sentence without a dash

examples/app.py had the same order and now validates after constructing the interceptor.

Checklist

  • Lint and format pass (ruff)
  • Type check passes (ty)
  • Tests pass and new behavior is covered
  • Build succeeds (uv build) if packaging or build config changed
  • Repo metadata stays consistent across the three surfaces (GitHub description, pyproject description, profile blurb) if this touches packaging

- 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.
@lesnik512
lesnik512 merged commit 6bcd289 into main Oct 3, 2026
12 checks passed
@lesnik512
lesnik512 deleted the docs/fix-facts branch October 3, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant