Skip to content

Releases: modern-python/modern-di

2.2.0

24 Jan 18:46
ca5555a

Choose a tag to compare

What's Changed

  • allow setting context after container creation by @lesnik512 in #127

Full Changelog: 2.1.1...2.2.0

2.1.1

19 Jan 11:49
3ad8276

Choose a tag to compare

What's Changed

Full Changelog: 2.1.0...2.1.1

2.1.0

16 Jan 06:39
c52507b

Choose a tag to compare

What's Changed

Full Changelog: 2.0.0...2.1.0

2.0.0

15 Jan 10:30
41b9557

Choose a tag to compare

What's Changed

This release introduces significant improvements to the dependency injection framework with a focus on simplification and enhanced functionality:

Key Enhancements

  • Unified Container: Replaced separate AsyncContainer and SyncContainer with a single Container class supporting both paradigms
  • Simplified Provider API: All providers now use keyword-only arguments for better clarity
  • Consolidated Provider Types: Removed Singleton, Resource, Dict, and List providers, consolidating functionality into the Factory provider with CacheSettings
  • Improved Caching: Enhanced caching mechanism through explicit CacheSettings in Factory providers

Breaking Changes

  • Container initialization now uses Container() instead of AsyncContainer()/SyncContainer()
  • Provider definitions require keyword arguments and updated caching patterns
  • Container building no longer uses context managers
  • Integration packages (FastAPI, LiteStar, FastStream) updated with simplified APIs
  • Override mechanism changed to be more explicit with dependency names/types

Migration

Existing code requires updates to container initialization, provider definitions, and integration patterns.

For details refer to the migration guide.

Full Changelog: 1.1.0...2.0.0

2.0.0-alpha.5

14 Jan 13:57
7dfb09f

Choose a tag to compare

2.0.0-alpha.5 Pre-release
Pre-release

What's Changed

Full Changelog: 2.0.0-alpha.4...2.0.0-alpha.5

2.0.0-alpha.4

14 Jan 11:10
b1efa9c

Choose a tag to compare

2.0.0-alpha.4 Pre-release
Pre-release

What's Changed

Full Changelog: 2.0.0-alpha.3...2.0.0-alpha.4

2.0.0-alpha.3

13 Jan 12:32
f65792b

Choose a tag to compare

2.0.0-alpha.3 Pre-release
Pre-release

What's Changed

Full Changelog: 2.0.0-alpha.2...2.0.0-alpha.3

2.0.0-alpha.2

13 Jan 11:59
c94029d

Choose a tag to compare

2.0.0-alpha.2 Pre-release
Pre-release

What's Changed

  • enhance parsing signature, remove dict and list providers by @lesnik512 in #115

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

2.0.0-alpha.1

13 Jan 06:45
932a0c2

Choose a tag to compare

2.0.0-alpha.1 Pre-release
Pre-release

What's Changed

Full Changelog: 2.0.0-alpha...2.0.0-alpha.1

2.0.0-alpha

05 Jan 08:32
c3248a6

Choose a tag to compare

2.0.0-alpha Pre-release
Pre-release

What's Changed

Full Changelog: 1.1.0...2.0.0-alpha