Skip to content

feat: support modern-di 4 - #47

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

lesnik512 merged 3 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.1.1,<5. The lower bound stays: the integration uses no 4.0-only API.

I re-checked the code, tests, example, README, CONTEXT.md and the ADRs for 3.x-only names and behaviour (ContainerClosedWarning, use_lock, the registries, finalizer_errors, optional context defaults, close resetting overrides). None are used. The lifespan docstring about ContainerClosedError already describes 4.0 behaviour, and the middleware builds a fresh context= dict per connection, so 4.0 copying that dict changes nothing.

Verification

  • modern-di 3.6.0 (latest on PyPI): lint-ci clean, test-ci 15 passed, 100% coverage.
  • modern-di 4.0 (wheel built from modern-di main f300c2e): ty check clean, 15 passed, 100% coverage.

Stays draft until modern-di 4.0.0 is on PyPI.

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