Skip to content

chore: adopt modern-di 2.25 integration seams#22

Merged
lesnik512 merged 1 commit into
mainfrom
chore/adopt-2.25-seams
Jul 7, 2026
Merged

chore: adopt modern-di 2.25 integration seams#22
lesnik512 merged 1 commit into
mainfrom
chore/adopt-2.25-seams

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Summary

  • Replace the inline isinstance(AbstractProvider) dispatch in modern_di_fixture with container.resolve_dependency(dependency) — the single provider-or-type entry point modern-di 2.25 added for integrations. Marker/branching semantics are identical; both code paths are already exercised by tests/test_modern_di_fixture.py.
  • Bump the modern-di dependency floor to >=2.25,<3 in pyproject.toml (was >=2.16.1,<3).
  • Update the CLAUDE.md architecture note to describe the delegation to resolve_dependency.

add_providers does not apply to this repo: it never reaches into providers_registry to register providers post-construction (root or child), so there's no site to migrate.

Related: modern-python/modern-di#283

Test plan

  • just install (env refreshed against modern-di 2.25.0)
  • just test-ci — 16 passed, 100% coverage
  • just lint-ci — eof-fixer, ruff format, ruff check, ty check, planning index all clean

Replace the inline isinstance(AbstractProvider)/resolve dispatch in
modern_di_fixture with container.resolve_dependency, the single
provider-or-type entry point modern-di 2.25 added for integrations.
Bump the modern-di floor to >=2.25,<3 accordingly.

No providers_registry reach-in exists in this plugin, so add_providers
does not apply here.
@lesnik512 lesnik512 merged commit 589674d into main Jul 7, 2026
6 checks passed
@lesnik512 lesnik512 deleted the chore/adopt-2.25-seams branch July 7, 2026 19:17
@lesnik512 lesnik512 mentioned this pull request Jul 7, 2026
2 tasks
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