Skip to content

Releases: maldoinc/wireup

v2.11.3

16 Jun 20:01

Choose a tag to compare

What's Changed

  • Fix scoped resource leak on cancellation in exit-stack cleanup by @glitch-ux in #142

New Contributors

Full Changelog: v2.11.2...v2.11.3

v2.11.2

15 Jun 20:26

Choose a tag to compare

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

05 Jun 18:29

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.11.0...v2.11.1

v2.10.1

05 Jun 19:27

Choose a tag to compare

Bugfix Backport for the 2.10 release

What's Changed

New Contributors

Full Changelog: v2.11.0...v2.11.1

v2.11.0

03 May 17:02

Choose a tag to compare

What's Changed

  • Added collection Injection
    • Ask for collections.abc.Sequence[T] to get all implementations of T.
    • Ask for collections.abc.Mapping[Hashable, T] to get all implementations of T keyed by qualifier. Contributed by @Stuckya in #133
  • 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

15 Apr 21:57

Choose a tag to compare

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

Full Changelog: v2.9.0...v2.10.0

v2.9.0

22 Mar 16:53

Choose a tag to compare

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.SyncContainer or wireup.AsyncContainer depending on the type. Note that this is intended for advanced infrastructure scenarios rather regular application code.
  • Various docs updates. Reorganized nav

New Contributors

Full Changelog: v2.8.0...v2.9.0

v2.8.0

03 Mar 00:01

Choose a tag to compare

What's Changed

  • Allow nested overrides #93 by @smokyabdulrahman in #108
  • as_type registration now validates compatibility at runtime and raises clearer errors for invalid or mismatched types.
  • Added wireup.integration.typer integration
  • Addedwireup.integration.fastmcp integration for FastMCP HTTP apps.
  • AddedWireupTask support in FastAPI and Starlette integrations for dependency injection in background tasks.
  • Addedwireup.integration.fastapi.inject for injecting into any function during request lifetime.
  • Addedwireup.integration.django.inject_app for app-level Django callables (commands, signals, checks, scripts).
  • Added Strawberry integration documentation.
  • New migration guides:
    • FastAPI Depends to Wireup
    • Dependency Injector to Wireup
  • 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_type checks 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

21 Feb 11:10

Choose a tag to compare

  • 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

09 Feb 22:46

Choose a tag to compare

What's new

  • Added support for injecting into generator / async-generator functions
  • Added new opt-in concurrent_scoped_access parameter for locking scopes accessed concurrently on create_sync_container /
    create_async_container.
  • Function injection (inject_from_container and 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 def function 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