mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 17:47:02 +03:00
Merge branch 'release/4.20.1' into master
This commit is contained in:
commit
a9fd206aae
|
@ -7,6 +7,10 @@ that were made in every particular version.
|
||||||
From version 0.7.6 *Dependency Injector* framework strictly
|
From version 0.7.6 *Dependency Injector* framework strictly
|
||||||
follows `Semantic versioning`_
|
follows `Semantic versioning`_
|
||||||
|
|
||||||
|
4.20.1
|
||||||
|
------
|
||||||
|
- Refactor containers module.
|
||||||
|
|
||||||
4.20.0
|
4.20.0
|
||||||
------
|
------
|
||||||
- Add container "self" injections.
|
- Add container "self" injections.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""Top-level package."""
|
"""Top-level package."""
|
||||||
|
|
||||||
__version__ = '4.20.0'
|
__version__ = '4.20.1'
|
||||||
"""Version number.
|
"""Version number.
|
||||||
|
|
||||||
:type: str
|
:type: str
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -560,15 +560,6 @@ class DeclarativeContainer(Container):
|
||||||
for provider in six.itervalues(cls.providers):
|
for provider in six.itervalues(cls.providers):
|
||||||
provider.reset_override()
|
provider.reset_override()
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def resolve_provider_name(cls, provider_to_resolve):
|
|
||||||
"""Try to resolve provider name by its instance."""
|
|
||||||
for provider_name, container_provider in cls.providers.items():
|
|
||||||
if container_provider is provider_to_resolve:
|
|
||||||
return provider_name
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def override(object container):
|
def override(object container):
|
||||||
""":py:class:`DeclarativeContainer` overriding decorator.
|
""":py:class:`DeclarativeContainer` overriding decorator.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user