Releases: maldoinc/wireup
Releases · maldoinc/wireup
v2.11.3
What's Changed
- Fix scoped resource leak on cancellation in exit-stack cleanup by @glitch-ux in #142
New Contributors
- @glitch-ux made their first contribution in #142
Full Changelog: v2.11.2...v2.11.3
v2.11.2
What's new
- Support FastAPI 0.137.0. This changed how routes are represented internally; Wireup supports both pre and post 0.137.0 transparently.
Full Changelog: v2.11.1...v2.11.2
v2.11.1
What's Changed
- Preserve qualifier on optional factory compat alias by @ranjanprasad96 in #139
New Contributors
- @ranjanprasad96 made their first contribution in #139
Full Changelog: v2.11.0...v2.11.1
v2.10.1
Bugfix Backport for the 2.10 release
What's Changed
- Preserve qualifier on optional factory compat alias by @ranjanprasad96 in #139
New Contributors
- @ranjanprasad96 made their first contribution in #139
Full Changelog: v2.11.0...v2.11.1
v2.11.0
What's Changed
- Added collection Injection
- Drop Python 3.8 and 3.9 support. Minimum required Python is now 3.10.
New Contributors
Full Changelog: v2.10.0...v2.11.0
v2.10.0
What's Changed
- Expose WireupTask via the
wireup.integration.{fastapi,starlete}integration. This enables DI aware background tasks. - New testing docs page
- New validation rules docs page
- Add docs on how to package and deploy redistributable injectable bundles
- Allow scoped container self injection. Fixes #115
- Update testing doc with simple inject example by @chen-tamarin in #119
- Added LRU cache to WireupTask to prevent recompilation by @sap6011 in #127
- fix: pass type_params to _eval_type on Python 3.13 to suppress DeprecationWarning by @mvanhorn in #130
New Contributors
- @chen-tamarin made their first contribution in #119
- @sap6011 made their first contribution in #127
- @mvanhorn made their first contribution in #130
Full Changelog: v2.9.0...v2.10.0
v2.9.0
What's Changed
- feat: add wireup.instance() helper for registering existing instances by @DarshanCode2005 in #105
- simplify api contract when using provided values in
container.enter_scope - The container now is able to inject itself. You can request
wireup.SyncContainerorwireup.AsyncContainerdepending on the type. Note that this is intended for advanced infrastructure scenarios rather regular application code. - Various docs updates. Reorganized nav
New Contributors
- @DarshanCode2005 made their first contribution in #105
Full Changelog: v2.8.0...v2.9.0
v2.8.0
What's Changed
- Allow nested overrides #93 by @smokyabdulrahman in #108
as_typeregistration now validates compatibility at runtime and raises clearer errors for invalid or mismatched types.- Added
wireup.integration.typerintegration - Added
wireup.integration.fastmcpintegration for FastMCP HTTP apps. - Added
WireupTasksupport in FastAPI and Starlette integrations for dependency injection in background tasks. - Added
wireup.integration.fastapi.injectfor injecting into any function during request lifetime. - Added
wireup.integration.django.inject_appfor app-level Django callables (commands, signals, checks, scripts). - Added Strawberry integration documentation.
- New migration guides:
- FastAPI
Dependsto Wireup - Dependency Injector to Wireup
- FastAPI
- Benchmark suite, generated benchmark data, and a new benchmarks documentation page.
Changed
- You can now call setup in fastapi integration even before registering all the routes.
- AIOHTTP integration now supports
middleware_mode: - Django and FastAPI integration documentation was fully reorganized and expanded (setup, lifecycle patterns, testing, troubleshooting).
Fixed
- Falsy handling for
as_typechecks was fixed. - FastAPI request-container/setup error messages improved, including clearer failure messaging when setup/request context is missing.
Full Changelog: v2.7.1...v2.8.0
v2.7.1
- Fix overriding async scoped dependencies
- Improve singleton lookup performance by using an instance factory once the object is created.
Full Changelog: v2.7.0...v2.7.1
v2.7.0
What's new
- Added support for injecting into generator / async-generator functions
- Added new opt-in
concurrent_scoped_accessparameter for locking scopes accessed concurrently oncreate_sync_container/
create_async_container. - Function injection (
inject_from_containerand framework integrations) now generates specialized wrappers at
decoration time, reducing per-call runtime overhead and skipping container lookups when possible. - Exit stack cleanup avoids runtime
inspect.isasyncgen().
Bugfixes
- Fixed a bug where an async container injecting into a
deffunction would not inject async dependencies already
cached in the container. - Qualifiers with falsy values (e.g.
0,"",False) are now handled correctly during injection. - Wireup now raises when encountering positional-only parameters in injectables or injected callables.
Full Changelog: v2.6.0...v2.7.0