Skip to content

Adopt the modern-di integration kit#8

Merged
lesnik512 merged 6 commits into
mainfrom
integration-kit-conversion
Jul 13, 2026
Merged

Adopt the modern-di integration kit#8
lesnik512 merged 6 commits into
mainfrom
integration-kit-conversion

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Summary

  • Composes modern_di.integrations (shipped in modern-di 2.28.0) instead of hand-rolling the same logic — zero change to public API or test behavior.
  • _DIMiddleware's isinstance-over-tuple connection dispatch is replaced by integrations.classify_connection; the manual try/finally around the child container is replaced by Container's own async with protocol.
  • _FromDI/_parse_inject_params/_resolve_di_params are deleted; FromDI becomes a direct re-export of integrations.from_di; inject composes integrations.parse_markers/resolve_markers.
  • pyproject.toml's modern-di floor bumped to >=2.28.0,<3.
  • architecture/container-lifecycle.md, architecture/dependency-resolution.md, and architecture/glossary.md promoted to describe the new internals.

Design background: planning/changes/2026-07-13.01-adopt-integration-kit.md. This is the first of 13 planned adapter conversions across the modern-di ecosystem (starlette chosen first, per modern-di's own rollout plan, as the richest non-native-DI example).

Test plan

  • just test-ci — 8 passed, 100% line coverage
  • just lint-ci — ruff format/check, ty check, check-planning all clean
  • No test file touched anywhere in this branch — the existing suite is the regression check, and it passed unmodified after every task
  • Built via subagent-driven-development: 5 planned tasks, each with an independent spec+quality review; a whole-branch review before merge — verdict "Ready to merge: Yes"

@lesnik512 lesnik512 merged commit 387fec1 into main Jul 13, 2026
6 checks passed
@lesnik512 lesnik512 deleted the integration-kit-conversion branch July 13, 2026 11:33
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