Skip to content

v0.2.0

Compare
Choose a tag to compare
@FasterSpeeding FasterSpeeding released this 29 Apr 21:16
· 54 commits to master since this release
d0d4c51

0.2.0 - 2024-04-29

Added

  • Transparent auto injection methods on Client at Client.auto_inject and Client.auto_inject_async. These wrap functions to make calls to them automatically inject dependencies and are transparent replacements for the self injecting system.
    More information on these can be found here.
  • A system for setting the injection client for a local scope (as defined by contextvars) and making dependency injection calls based on said context.
    More information on this can be found here.
  • alluka.abc.Client.make_context method for creating a client bound context.

Changed

  • get_type_dependency and get_cached_value both now raise a KeyError when no value is found and no default was provided.
  • alluka.abc.Client.call_with_di and alluka.abc.Client.call_with_async_di now provide default implementations which use Client.make_context.
  • alluka.abc.Context.call_with_di and alluka.abc.Context.call_with_async_di now provide default implementations which use Context.injection_client.

Deprecated

  • Client.as_self_injecting in favour of Client.auto_inject.
  • Client.as_async_self_injecting in favour of Client.auto_inject_async.
  • alluka.SelfInjecting in favour of Client.auto_inject.
  • alluka.AsyncSelfInjecting in favour of Client.auto_inject_async.

Removed

  • alluka.abc.UNDEFINED and alluka.abc.Undefined.