modern-di-fastapi 2.9.0 — modern-di 2.25 integration seams
Maintenance release. No public API change — setup_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 theproviders_registryreach-in.
build_di_containerregistered_CONNECTION_PROVIDERSby poking
container.providers_registry.add_providers(...)directly; it now calls the
publiccontainer.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_providerandresolveitself; that dispatch now lives in modern-di's
ownresolve_dependency, soFromDIno longer duplicates logic modern-di
maintains.
Packaging
modern-difloor 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, andeof-fixerclean. architecture/container-lifecycle.mdandarchitecture/dependency-resolution.md
updated to describe the new seams.