Rodi

Latest version: v2.0.6

Safety actively analyzes 688903 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

2.0.0

- Introduces a `ContainerProtocol` to improve interoperability between
libraries and alternative implementations of DI containers. The protocol is
inspired by [punq](https://github.com/bobthemighty/punq), since its code API
is the most user-friendly and intelligible of those that were reviewed.
The `ContainerProtocol` can be used through [composition](https://en.wikipedia.org/wiki/Composition_over_inheritance)
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](https://github.com/MaximZayats)' contribution.
- Adds typehints to GetServiceContext init params; [guscardvs](https://github.com/guscardvs)' contribution.

1.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.

1.1.2

- Adds `py.typed` file.
- Applies `isort` and enforces `isort` and `black` checks in CI pipeline.
- Corrects the type annotation for `FactoryCallableType`.

1.1.1

- Adds support for Generics and GenericAlias `Mapping[X, Y]`, `Iterable[T]`,
`List[T]`, `Set[T]`, `Tuple[T, ...]`, Python 3.9 `list[T]`, etc. ([fixes
9](https://github.com/Neoteroi/rodi/issues/9)).
- Improves typing-friendliness making the `ServiceProvider.get` method
returning a value of the input type.
- Adds support for Python 3.10.0a5 ✨. However, when classes and functions
require locals, they need to be decorated. See [PEP
563](https://www.python.org/dev/peps/pep-0563/).

1.1.0

- Adds support to resolve class attributes annotations.
- Changes how classes without an `__init__` method are handled.
- Updates links to the GitHub organization, [Neoteroi](https://github.com/Neoteroi).

1.0.9

- Completely migrates to GitHub Workflows.
- Improves build to test Python 3.6 and 3.9.
- Adds a changelog.
- Improves badges.

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.