Skip to content

chore: pass explicit validate= to root Container() in tests#26

Merged
lesnik512 merged 1 commit into
mainfrom
chore/explicit-validate
Jul 6, 2026
Merged

chore: pass explicit validate= to root Container() in tests#26
lesnik512 merged 1 commit into
mainfrom
chore/explicit-validate

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Summary

  • Add explicit validate=True to the two bare root modern_di.Container(...) constructions in tests/conftest.py and tests/test_faststream_di.py.
  • README.md already had validate=True on its one root Container example — no change needed there.

Why

The next modern-di 2.x minor introduces UnvalidatedContainerWarning (a FutureWarning) when a root container is built without an explicit validate argument. Passing it explicitly future-proofs this suite against warning noise and dogfoods graph validation. This PR does not assert the warning, since the currently pinned modern-di release doesn't emit it yet.

Test plan

  • just test-ci — 5 passed, 100% coverage
  • just lint-ci — all checks passed

🤖 Generated with Claude Code

modern-di's next 2.x minor will warn (UnvalidatedContainerWarning,
FutureWarning) when a root container is built without an explicit
validate argument. Set validate=True at both root Container() call
sites to future-proof the suite against that warning and dogfood
graph validation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lesnik512 lesnik512 merged commit 33649db into main Jul 6, 2026
6 checks passed
@lesnik512 lesnik512 deleted the chore/explicit-validate branch July 6, 2026 08:33
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