Skip to content

2.9.0

Latest

Choose a tag to compare

@github-actions github-actions released this 07 Jul 19:39
9bdb9d3

modern-di-fastapi 2.9.0 — modern-di 2.25 integration seams

Maintenance release. No public API changesetup_di, FromDI,
build_di_container, and the context providers keep their signatures and
behavior. It adopts modern-di 2.25's blessed integration seams and raises the
floor.

Internal refactors

  • container.add_providers(...) replaces the providers_registry reach-in.
    build_di_container registered _CONNECTION_PROVIDERS by poking
    container.providers_registry.add_providers(...) directly; it now calls the
    public container.add_providers(...) seam.
  • container.resolve_dependency(...) replaces the copy-pasted marker
    dispatch.
    Dependency.__call__ used to branch on
    isinstance(self.dependency, providers.AbstractProvider) to choose between
    resolve_provider and resolve itself; that dispatch now lives in modern-di's
    own resolve_dependency, so FromDI no longer duplicates logic modern-di
    maintains.

Packaging

  • modern-di floor raised to >=2.25,<3 (was >=2.21.0,<3). The seams
    above (Container.add_providers, Container.resolve_dependency) were added
    in modern-di 2.25.0 (modern-python/modern-di#283).

Downstream

Requires modern-di>=2.25. There is no API or behavior change, so
application code that uses setup_di / FromDI needs no edits — only the
modern-di floor moves.

Internals

  • 100% line coverage maintained; ruff, ty, and eof-fixer clean.
  • architecture/container-lifecycle.md and architecture/dependency-resolution.md
    updated to describe the new seams.