Releases: modern-python/that-depends
3.5.0
What's Changed
- Feature: State provider by @alexanderlazarev0 in #190
For more information regarding the new State
provider please consult the documentation.
Full Changelog: 3.4.1...3.5.0
3.4.1
3.4.0
What's Changed
- Allow entering scope when using @Inject. by @alexanderlazarev0 in #189
To enter scope when using @inject
:
@inject(scope=ContextScopes.APP, enter_scope=True)
async def foo(...) -> None:
assert get_current_scope() == ContextScopes.APP
For more details, please consult the documentation.
Full Changelog: 3.3.0...3.4.0
3.3.0
What's Changed
- Dependency injection by bound type. by @alexanderlazarev0 in #188
You can now inject without explicitly referencing the provider:
@Container.inject
async def foo(v: float = Provide()):
...
Please read the documentation for further details.
Full Changelog: 3.2.0...3.3.0
3.2.0
What's Changed
- Support injection for generators. by @alexanderlazarev0 in #187
Injection into generator functions is now supported:
@inject
async def my_generator(v: float = Provide[Container.factory]) -> typing.AsyncGenerator[float, None]:
yield v
For further information, please consult the documentation
Full Changelog: 3.1.0...3.2.0
3.1.0
What's Changed
- Added fastapi integration with route class. by @alexanderlazarev0 in #185
Full Changelog: 3.0.1...3.1.0
3.0.1
What's Changed
- Bugfix: Correct context initialization for parents of non-ContextResource providers when using the inject wrapper.
Full Changelog: 3.0.0...3.0.1
3.0.0
3.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
- Cleaned up and reworked the API (primarily name changes that are more consistent)
- Implemented a bidirectional dependency graph under the hood.
- Extended
tear_down()
andoverride()
functionality to allow propagation when relevant. - Changes to behavior of
@inject
regarding scopes (comes with significant performance improvements). - Changes to
container_context()
behavior (now requires you to be more explicit). - Minor utility improvements for
global_context
.
New Contributors
- @libstech-auto made their first contribution in #180
Full Changelog: 2.2.0...3.0.0
3.0.0-alpha.2
3.0.0-alpha.1
Full Changelog: 3.0.0-alpha...3.0.0-alpha.1