Skip to content

Releases: modern-python/that-depends

3.5.0

15 Jul 12:28
f946768
Compare
Choose a tag to compare

What's Changed

For more information regarding the new State provider please consult the documentation.

Full Changelog: 3.4.1...3.5.0

3.4.1

08 May 10:57
Compare
Choose a tag to compare

What's Changed

  • Bugfix: Add enter_scope in BaseContainer.inject()

Full Changelog: 3.4.0...3.4.1

3.4.0

06 May 22:29
fdcb515
Compare
Choose a tag to compare

What's Changed

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

05 May 20:33
8d7a24c
Compare
Choose a tag to compare

What's Changed

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

02 May 09:57
5c9a7a7
Compare
Choose a tag to compare

What's Changed

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

24 Apr 17:29
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.0.1...3.1.0

3.0.1

16 Apr 11:56
Compare
Choose a tag to compare

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

14 Apr 10:17
96c816f
Compare
Choose a tag to compare

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() and override() 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

Full Changelog: 2.2.0...3.0.0

3.0.0-alpha.2

11 Apr 09:54
96c816f
Compare
Choose a tag to compare
3.0.0-alpha.2 Pre-release
Pre-release

What's Changed

Full Changelog: 3.0.0-alpha.1...3.0.0-alpha.2

3.0.0-alpha.1

09 Apr 20:46
Compare
Choose a tag to compare
3.0.0-alpha.1 Pre-release
Pre-release