Skip to content

Releases: Neoteroi/rodi

v2.0.8

12 Apr 09:09
1b9367b

Choose a tag to compare

  • Add the link to the documentation.
  • Remove the UnsupportedUnionTypeException as Rodi supports union types,
    they only require proper handling.

v2.0.7

28 Mar 05:54
560ff8e

Choose a tag to compare

  • Add the possibility to specify the ActivationScope class when instantiating
    the Container or the Services object. This class will be used when
    creating scopes. For the issue #55.
  • Add an experimental class, TrackingActivationScope to support nested
    scopes transparently, using contextvars.ContextVar. For more context, see
    the tests test_nested_scope_1, test_nested_scope_2,
    test_nested_scope_async_1. For the issue #55.
  • Raise a TypeError if trying to obtain a service from a disposed scope.
  • Remove Python 3.8 from the build matrix, add Python 3.13.
  • Handle setuptools warning: SetuptoolsDeprecationWarning: License classifiers are deprecated.

v2.0.6

09 Dec 22:17
f6d6fbc

Choose a tag to compare

  • Fixes import for Protocols support regardless of Python version (partially
    broken for Python 3.9), by @fennel-akunesh

v2.0.5

25 Nov 14:19
2f9d7a1

Choose a tag to compare

  • Adds support for resolving Protocol classes even when they don't define an
    __init__ method, by @lucas-labs
  • Fixes bug in service provider build logic causing singletons to be instantiated
    n times when they are registered after its dependant, by @lucas-labs
  • Changes the "ignore attributes" logic so that if a class variable has already
    been initialized externally, rodi doesn't attempt to reinitialize it (and to
    also prevent overriding it if the initialized class variable is also a
    registered object), by @lucas-labs

v2.0.4

28 Oct 09:53
de16370

Choose a tag to compare

  • Fix bug in Singleton implementation: stop singleton provider from recreating
    objects implementing __len__, by @Klavionik
  • Add Python 3.12 and remove Python 3.7 from the build matrix.

v2.0.3

14 Aug 18:44
a037c55

Choose a tag to compare

  • Checks scoped_services before resolving from map when in a scope, by @StummeJ.
  • Allows getting from scope context without needing to provide scope, by @StummeJ.

v2.0.2

31 Mar 05:40
b26f1be

Choose a tag to compare

  • Ignores ClassVar properties when resolving dependencies by class annotations.
  • Marks rodi 2 stable.

v2.0.1

14 Mar 19:36
ee55453

Choose a tag to compare

  • Removes the strict requirement for resolved classes to have __init__
    methods defined, to add support for Protocols that do not define an
    __init__ method (thus using *args, **kwargs,
    akhundMurad's contribution.
  • Corrects a code smell, replacing an i counter with enumerate,
    GLEF1X's contribution.

v2.0.0

07 Jan 20:39

Choose a tag to compare

  • Introduces a ContainerProtocol to improve interoperability between
    libraries and alternative implementations of DI containers. The protocol is
    inspired by punq, since its code API
    is the most user-friendly and intelligible of those that were reviewed.
    The ContainerProtocol can be used through composition
    to replace rodi with alternative implementations of dependency injection in
    those libraries that use DI.
  • Simplifies the code API of the library to support using the Container class
    to register and resolve services. The class Services is still used and
    available, but it's no more necessary to use it directly.
  • Replaces setup.py with pyproject.toml.
  • Renames context classes: "GetServiceContext" to "ActivationScope",
    "ResolveContext" to "ResolutionContext".
  • The "add_exact*" methods have been made private, to simplify the public API.
  • Improves type annotations; MaximZayats' contribution.
  • Adds typehints to GetServiceContext init params; guscardvs' contribution.
  • Adds examples in a dedicated folder. Examples are tested.

⚠️ Contains breaking changes

v0.0.2-alpha.1

27 Dec 22:17
c514d3d

Choose a tag to compare

v0.0.2-alpha.1 Pre-release
Pre-release

Test release for the new package (v2) using the new name neoteroi-di and the new namespace.
Please refer to the CHANGELOG for more information.