Releases: Tinche/incant
Releases · Tinche/incant
v23.2.0
Incanter.(a)invoke()
has been renamed toIncanter.(a)compose_and_call()
for clarity.
Incanter.(a)invoke()
is still present as an alias for backwards compatibility.Incanter.prepare()
has been renamed toIncanter.compose()
for clarity.
Incanter.prepare()
is still present as an alias for backwards compatibility.- Introduce
Incanter.adapt
. - Dependency factories of constants (
lambda: 1
) are now folded to just the constants in the generated source code, avoiding unnecessary function calls. Incanter.register_by_type()
now also triggers on type equality (in addition to subclasses).
This makes it usable with types such asCallable
.- Python 3.12 support.
v23.1.0
v22.2.2
v22.2.1
v22.2.0
v22.1.0
- Breaking change: due to limitations in autodetecting context managers (both sync and async), context manager dependencies must be explicitly registered by passing
is_context_manager="sync"
(orasync
) to the registration functions. - Injection can be customized on a per-parameter basis by annotating a parameter with
Annotated[type, incant.Override(...)]
. - Implement support for forced dependencies.
- Sync context managers may now be dependencies.
incanter.a/incant()
now handles unfulfilled parameters with defaults properly.- Switched to CalVer.