Releases: Neoteroi/rodi
Releases · Neoteroi/rodi
v2.0.6
- Fixes import for Protocols support regardless of Python version (partially
broken for Python 3.9), by @fennel-akunesh
v2.0.5
- 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
- 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
v2.0.2
- Ignores
ClassVar
properties when resolving dependencies by class annotations. - Marks
rodi
2 stable.
v2.0.1
- Removes the strict requirement for resolved classes to have
__init__
methods defined, to add support forProtocol
s that do not define an
__init__
method (thus using*args
,**kwargs
,
akhundMurad's contribution. - Corrects a code smell, replacing an
i
counter withenumerate
,
GLEF1X's contribution.
v2.0.0
- 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.
TheContainerProtocol
can be used through composition
to replacerodi
with alternative implementations of dependency injection in
those libraries that useDI
. - Simplifies the code API of the library to support using the
Container
class
toregister
andresolve
services. The classServices
is still used and
available, but it's no more necessary to use it directly. - Replaces
setup.py
withpyproject.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.
v0.0.2-alpha.1
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.
v1.1.3
- Corrects a bug that would cause false positives when raising exceptions
for circular dependencies. The code now let recursion errors happen if they
need to happen, re-raising a circular dependency error.
v1.1.2
- Adds
py.typed
file - Applies
isort
and enforcesisort
andblack
checks in CI pipeline - Corrects the type annotation for
FactoryCallableType