Merge branch 'release/4.3.5' into master

This commit is contained in:
Roman Mogylatov 2020-11-05 12:27:48 -05:00
commit 02acaba034
3 changed files with 11 additions and 3 deletions

View File

@ -7,6 +7,13 @@ that were made in every particular version.
From version 0.7.6 *Dependency Injector* framework strictly
follows `Semantic versioning`_
4.3.5
-----
- Fix a bug in ``wiring`` module that caused multiple imports of the modules
when ``.wire(packages=[...])`` is used
(See issue `#320 <https://github.com/ets-labs/python-dependency-injector/issues/320>`_). Thanks
to `Federico iskorini <iskorini>`_ for reporting the issue.
4.3.4
-----
- Fix a bug in ``Configuration`` provider that resulted in not working ``.reset_override()``

View File

@ -1,6 +1,6 @@
"""Top-level package."""
__version__ = '4.3.4'
__version__ = '4.3.5'
"""Version number.
:type: str

View File

@ -2,6 +2,7 @@
import functools
import inspect
import importlib
import pkgutil
import sys
from types import ModuleType
@ -289,11 +290,11 @@ def _resolve_injections(
def _fetch_modules(package):
modules = [package]
for loader, module_name, is_pkg in pkgutil.walk_packages(
for module_info in pkgutil.walk_packages(
path=package.__path__,
prefix=package.__name__ + '.',
):
module = loader.find_module(module_name).load_module(module_name)
module = importlib.import_module(module_info.name)
modules.append(module)
return modules