Merge branch 'release/4.20.1' into master

This commit is contained in:
Roman Mogylatov 2021-02-07 14:17:53 -05:00
commit a9fd206aae
4 changed files with 193 additions and 550 deletions

View File

@ -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.

View File

@ -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

View File

@ -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.