- Fix injectable crashing when relative imports are used in files containing injectables.
- Fix
testing.register_injectables
not creating the namespace when it doesn't exist yet
- Fix opening of UTF-8 files & allow for user set encoding
- Fix
inject
return type hint
- Fix Injectable failing to resolve complex/entangled imports
- Fix optional injection bug when the namespace is empty
- Fix the use of named args by the caller breaking autowired functions injection
- Deprecate
InjectionContainer::load
in favor ofload_injection_container
. - Change default namespace name from
"_GLOBAL"
to"DEFAULT_NAMESPACE"
. - Fix minor quirks with Python 3.7 and 3.8.
- Add tons of unit tests.
- Add
reset_injection_container
utility toinjectable.testing
.
- Include the
injectable.testing
utilities to ease mocking injectables.
InjectionContainer::load
is more resilient against duplicated injectables registering
- Support for optional injection in declarative fashion:
Autowired(Optional[...])
- Fix
Autowired(List[...])
not working with qualifiers
- Fix Windows injectables not being loaded.
- Remove unused
inspect
imports.
- Fix bug of scanning the same module more than once when
InjectionContainer.load()
is called multiple times with different relative search paths.
- Added
@injectable_factory
decorator for declaring injectable factory methods - Include the console output in the examples
- Fix package content missing
- Drop support for autowiring without previous initialization of the InjectionContainer
- Refactor
@autowired
decorator for working with theAutowired
type annotation - Added
@injectable
decorator for registering injectables to the InjectionContainer - Support for qualifiers, groups and namespaces
- Added
Autowired
type annotation for marking parameters for autowiring - Added
inject
andinject_multiple
as service locators - Added InjectionContainer for registering injectables
- Official support for Python 3.7 and 3.8
- Official support for Ubuntu, Windows and MacOS
- Drop Python 3.4 and 3.5 official support
- General code refactoring
- Official documentation
- Added usage examples
- Drop Python 3.3 official support
- Support for dependencies of classes without signature
- Fix bug of builtin types not being accepted for injectable dependencies
- Statically infer dependency's constructor suitability for injection instead of using trial instantiation
- Fix bug of raising
TypeError
when injectable fails on the trial dependency instantiation which can happen when the dependency does provide a default constructor with no arguments but the running environment (possibly a test suite environment) will make the instantiation fail
- Enable the use of
@autowired
decorator without parenthesis
- Fixes required dependency
lazy_object_proxy
not being installed when installing injectable through pip
- First stable release
- Support for lazy dependency initialization
- Support for type annotations with strings
- Python 3.3 and 3.4 support
- First beta release