Repository navigation
Releases: amyasnikov/dimi
Releases · amyasnikov/dimi
Release list
v1.5.0
v1.4.0
New Features:
di.injectnow explicitly sets__signature__attribute of the underlying func. This new signature contains all the original function params except those havingAnnotated[...] type hint.
Example:
@di.inject
def func(p1: int, p2: Annnotated[str, some_dependency]): ...
assert inspect.signature(func).parameters.keys() == {"p1"}v1.3.0
New Features:
- Clear cache for cached values in case of override
add_return_aliasoption was added todi.dependency
v1.2.0
New Features:
- Postponed syntax now is available for
__getitem__as well:di["some_dependency"]
v1.1.3
Bug Fixes:
- Proper handling of non-type types (e.g.
typing.Callableor generics likeSomeType[int]) withintyping.Annotated
v1.1.2
Bug Fixes:
- Better handling of postponed annotations
- Raising descriptive error in case of dependencies with the same name
v1.1.1
Bug Fixes:
- Fix handling of postponed annotations
v1.1.0
New Features:
@di.injectnow supports lazy string Annotations