4.0.0 Release
For information about all the new features and changes, please refer to the documentation.
If migrating, please refer to the migration guide.
What's Changed
- Reworked injection internals for significantly better performance and typing compliance. The bundled benchmark improved from
~9sto~4sat10^6iterations versus3.9.2. - Collection providers now return read-only abstractions:
providers.List(...)resolves to a tuple-backedSequence, andproviders.Dict(...)resolves to amappingproxy-backedMapping. - Tightened context-resource and scope handling, including cleaner sync and async context entry for containers and providers, stricter scope checks, and better
Nonehandling across provider resolution paths. BaseContainer.context()now preserves the wrapped callable signature.- The package now ships with its own
that-dependsAgent skill. - Now type checked by both
mypyandpyrefly
Pull Requests
- v4 by @xelandernt in #210
- Skills by @xelandernt in #211
Full Changelog: 3.9.2...4.0.0