Skip to content

chore(deps): allow modern-di 4 - #73

Merged
lesnik512 merged 2 commits into
mainfrom
modern-di-4
Oct 9, 2026
Merged

lesnik512 merged 2 commits into
mainfrom
modern-di-4

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Refs modern-python/modern-di#579.

Summary

  • Widen the requirement to modern-di>=3,<5. The lower bound stays, since the integration uses no 4.0-only API.
  • Re-checked against modern-di main (f300c2e) and grepped code, tests, README, CONTEXT.md and ADRs for 3.x-only names and behaviour (ContainerClosedWarning, use_lock, the registries, finalizer_errors, optional context, overrides cleared on close). Nothing needed changing. The ContainerClosedError wording in main.py and tests/test_lifespan.py already matches 4.0.
  • tests/dependencies.py has message: StreamMessage[typing.Any] | None = None. This is not the 4.0 optional-context change: a parameterized generic is never wired by type, so the default applies on both 3.x and 4.0 and the parameter is always None.

Verification

  • 3.x: uv sync resolved modern-di 3.6.0. eof-fixer, ruff format/check and ty pass; pytest 13 passed, coverage 100%.
  • 4.0: modern-di main (f300c2e) installed from a local wheel. ty passes; pytest 13 passed, coverage 100%.

This PR stays a draft until modern-di 4.0.0 is on PyPI.

@lesnik512
lesnik512 marked this pull request as ready for review October 9, 2026 18:01
@lesnik512
lesnik512 merged commit 9e85e48 into main Oct 9, 2026
12 checks passed
@lesnik512
lesnik512 deleted the modern-di-4 branch October 9, 2026 18:04
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