Skip to content

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

Draft
lesnik512 wants to merge 1 commit into
mainfrom
modern-di-4
Draft

lesnik512 wants to merge 1 commit 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.
  • ADR 0003 said modern-di 3.x had a mandatory-open lifecycle. Only 3.0 raised on a resolve from a closed container; 3.1 to 3.6 warned and reopened it, and 4.0 raises again. The paragraph now says that.
  • 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 else needed changing. The ContainerClosedError comments in main.py and tests/test_lifespan.py already match 4.0.

Verification

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

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

This branch has not been deployed

No deployments
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