Skip to content

chore: pass explicit validate= to root Container in tests#3

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

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

Conversation

@lesnik512

Copy link
Copy Markdown
Member

What

Adds an explicit validate=True argument to the two bare root modern_di.Container(...) constructions in the test suite (tests/conftest.py:15, tests/test_lifespan.py:43). README.md already passed validate=True explicitly, so no change was 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 now future-proofs this suite against that warning noise once the dependency is bumped, and dogfoods graph validation in our own tests. The graphs in both sites validated cleanly, so validate=False was not needed anywhere.

Note: the currently pinned modern-di release doesn't emit the warning yet, so this PR does not assert on it — just adds the explicit argument.

Test plan

  • just test-ci (100% coverage gate) passes
  • just lint-ci passes

🤖 Generated with Claude Code

Future-proofs the suite against the upcoming UnvalidatedContainerWarning
(FutureWarning) that modern-di 2.x will emit for root containers built
without an explicit validate argument, and dogfoods graph validation.

Co-Authored-By: Claude Fable 5 <[email protected]>
@lesnik512 lesnik512 merged commit 00949d9 into main Jul 6, 2026
6 checks passed
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