Antidote

Latest version: v2.0.0

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

Scan your dependencies

Page 3 of 5

0.14.0

===================


Breaking Change
---------------

- :code:`LazyDependency` and :code:`WithWiringMixin` are not part of the public API anymore.
For the first just use :py:obj:`.world.lazy` instead, and the later was experimental.
- :py:func:`.world.scopes.new` argument :code:`name` is keyword-only now.

0.13.0

===================


Breaking Change
---------------

- :code:`_with_kwargs()` class method has been replaced by :py:meth:`.Service.parameterized` and
:py:meth:`.Factory.parameterized` with a cleaner design. Now parameters must be explicitly
defined in their respective configuration. Those will be verified to ensure they don't have
any injections or default values, as sanity checks. Otherwise passing the default value as a
parameter or relying on the actual default would not point to the same dependency value.

0.12.1

===================


Change
------

- Improved :py:func:`.world.test.clone` performance to be as fast as possible to avoid
any overhead in tests in the compiled version.

0.12.0

===================


Feature / Breaking Change
-------------------------

- Add runtime type checks when a type is explicitly defined with :py:obj:`.world.get`,
:py:obj:`.world.lazy` or :py:class:`.Constants`.

0.11.0

===================


Features
--------

- Add scope support.
- Add annotated type hints support (PEP-593).
- Add async injection support.
- Multiple factories can be defined for the same class.
- Cleaner testing support, by separating explicitly the case where test existing
dependencies or want to create new ones.
- All methods of :py:class:`.Service`, :py:class:`.Factory` and :py:class:`.Constants`
are automatically wired to support annotated type hints anywhere.


Breaking changes
----------------

- Remove :code:`public` configuration for :py:class:`.Factory` and :py:class:`.Constants`.
They didn't really bring any value, you hardly hide anything in Python.
- Removed tags. They didn't bring enough value.
- Reworked :py:func:`.inject`: it will only inject annotated type, nothing else anymore.
:code:`use_type_hint` has been replaced by :code:`auto_provide` and :code:`use_names`
has been removed.
- Reworked :py:class:`.Constants` to be more flexible.
- Removed :code:`world.singletons`. There was no way to track back where a singleton
was defined.
- Reworked :py:class:`.Wiring` to be simpler, not super class wiring

0.10.0

===================


Breaking change
---------------

- In :py:class:`.Wiring`, :code:`ignore_missing_methods` has been replaced by
:code:`attempt_methods`.


Bug fix
-------

- Using :py:meth:`.inject` on :code:`__init__()` of a :py:class:`.Service`, or any methods
injected by default by Antidote, will not raise a double injection error anymore.

Page 3 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.