Skip to content

Releases: modern-python/modern-di

2.10.0

15 Apr 19:45
5f466fe

Choose a tag to compare

What's Changed

  • Add context manager support, repr, and skip_creator_parsing warning by @lesnik512 in #165

Full Changelog: 2.9.0...2.10.0

2.9.0

07 Apr 14:20
f4e8007

Choose a tag to compare

What's Changed

Code fixes:

  • Replaced all private typing._* internals with public get_origin() / get_args() / hasattr(metadata) API — future-proof across Python versions
  • Silent NameError on unresolvable forward references now emits a UserWarning naming the creator and the missing annotation
  • Removed misleading frozen=True from CacheRegistry, ContextRegistry, OverridesRegistry — all three mutate their dict fields in place
  • ContainerProvider no longer requires post-construction mutation by the container — added ProvidersRegistry.register(type, provider) to map the container type directly, keeping bound_type=None permanently on the singleton
  • Finalizer exceptions no longer abort remaining cleanup — both close_async() and close_sync() now run all finalizers, collect failures, and raise a combined RuntimeError at the end

Tooling:

  • Migrated all 8 # type: ignore[...] suppressions to # ty: ignore[rule] after mypy was replaced by ty

Documentation:

  • use_lock=False documented under Cached Factories
  • Union resolution order documented in factories and resolving pages
  • Override global scope behavior documented in testing fixtures
  • Async finalizers vs sync-only resolution distinction added to migration guide

Tests:

  • Added test_sync_finalizer_exception_does_not_abort_remaining_cleanup
  • Added test_async_finalizer_exception_does_not_abort_remaining_cleanu

Full Changelog: 2.8.4...2.9.0

2.8.4

22 Mar 08:52
b7a9a7c

Choose a tag to compare

What's Changed

Full Changelog: 2.8.3...2.8.4

2.8.3

20 Mar 12:35
2b61158

Choose a tag to compare

What's Changed

Full Changelog: 2.8.2...2.8.3

2.8.2

20 Mar 11:03
4aa72b7

Choose a tag to compare

What's Changed

Full Changelog: 2.8.1...2.8.2

2.8.1

16 Mar 10:28
6d84f56

Choose a tag to compare

What's Changed

Full Changelog: 2.8.0...2.8.1

2.8.0

23 Feb 11:46
1705d74

Choose a tag to compare

What's Changed

Full Changelog: 2.7.1...2.8.0

2.7.1

14 Feb 12:01
2b9f2a1

Choose a tag to compare

Fix publishing

Full Changelog: 2.7.0...2.7.1

2.7.0

14 Feb 11:58
5e2721d

Choose a tag to compare

What's Changed

Full Changelog: 2.6.4...2.7.0

2.6.4

08 Feb 08:44
f3699d8

Choose a tag to compare

What's Changed

Full Changelog: 2.6.3...2.6.4