diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 04f43f6..88506f3 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 3.4.2
+current_version = 3.4.3
[bumpversion:file:Makefile]
search = CURRENT_VERSION = {current_version}
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 8360bbd..810bed9 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,11 @@
Changelog
=========
+3.4.3 (2020-06-24)
+------------------
+
+* Fix Injectable failing to resolve complex/entangled imports
+
3.4.2 (2020-05-22)
------------------
diff --git a/Makefile b/Makefile
index c45171f..dab87b6 100644
--- a/Makefile
+++ b/Makefile
@@ -72,7 +72,7 @@ docs:
make html -B
cp -a build/html/. docs
-CURRENT_VERSION = 3.4.2
+CURRENT_VERSION = 3.4.3
.PHONY: bump-patch-version
bump-patch-version:
diff --git a/README.rst b/README.rst
index 63f236d..f24a167 100644
--- a/README.rst
+++ b/README.rst
@@ -5,6 +5,8 @@
Injectable: Dependency Injection for Humans™
============================================
+[**Examples**](https://injectable.readthedocs.io/en/latest/usage/index.html) | [**Developer Reference**](https://injectable.readthedocs.io/en/latest/reference/index.html) | [**Authors**](https://injectable.readthedocs.io/en/latest/authors.html)
+
.. start-badges
.. list-table::
diff --git a/docs/.buildinfo b/docs/.buildinfo
index e33ca6f..f2c2e84 100644
--- a/docs/.buildinfo
+++ b/docs/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: d46ac49617394230bc8a148ed1d42660
+config: 81e33e91f5acc49464cf2bfb9dac9397
tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/docs/_modules/index.html b/docs/_modules/index.html
index ad0bdc6..b01fbad 100644
--- a/docs/_modules/index.html
+++ b/docs/_modules/index.html
@@ -3,7 +3,7 @@
- Overview: module code — injectable 3.4.2 documentation
+ Overview: module code — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -106,7 +106,7 @@ Navigation
diff --git a/docs/_modules/injectable/autowiring/autowired_decorator.html b/docs/_modules/injectable/autowiring/autowired_decorator.html
index 5aae6a7..bcd2cb4 100644
--- a/docs/_modules/injectable/autowiring/autowired_decorator.html
+++ b/docs/_modules/injectable/autowiring/autowired_decorator.html
@@ -3,7 +3,7 @@
- injectable.autowiring.autowired_decorator — injectable 3.4.2 documentation
+ injectable.autowiring.autowired_decorator — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -173,7 +173,7 @@ Navigation
diff --git a/docs/_modules/injectable/autowiring/autowired_type.html b/docs/_modules/injectable/autowiring/autowired_type.html
index 40214e7..53ec234 100644
--- a/docs/_modules/injectable/autowiring/autowired_type.html
+++ b/docs/_modules/injectable/autowiring/autowired_type.html
@@ -3,7 +3,7 @@
- injectable.autowiring.autowired_type — injectable 3.4.2 documentation
+ injectable.autowiring.autowired_type — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -236,7 +236,7 @@ Navigation
diff --git a/docs/_modules/injectable/container/injectable.html b/docs/_modules/injectable/container/injectable.html
index 6d2a9b9..a318e64 100644
--- a/docs/_modules/injectable/container/injectable.html
+++ b/docs/_modules/injectable/container/injectable.html
@@ -3,7 +3,7 @@
- injectable.container.injectable — injectable 3.4.2 documentation
+ injectable.container.injectable — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -143,7 +143,7 @@ Navigation
diff --git a/docs/_modules/injectable/container/injection_container.html b/docs/_modules/injectable/container/injection_container.html
index 4116646..66ed71d 100644
--- a/docs/_modules/injectable/container/injection_container.html
+++ b/docs/_modules/injectable/container/injection_container.html
@@ -3,7 +3,7 @@
- injectable.container.injection_container — injectable 3.4.2 documentation
+ injectable.container.injection_container — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -47,13 +47,12 @@ Navigation
Source code for injectable.container.injection_container
import os
-import sys
import warnings
-from importlib.util import module_from_spec, spec_from_file_location
+from runpy import run_path
from typing import Dict, Optional, Callable
from typing import Set
-from pycollect import PythonFileCollector, find_module_name
+from pycollect import PythonFileCollector
from injectable.container.injectable import Injectable
from injectable.container.namespace import Namespace
@@ -190,7 +189,7 @@ Source code for injectable.container.injection_container
if
file.path in cls.LOADED_FILEPATHS:
continue
cls.LOADING_FILEPATH = file.path
-
cls._load_file(file)
+
run_path(file.path)
cls.LOADED_FILEPATHS.add(file.path)
cls.LOADING_FILEPATH = None
@@ -204,7 +203,7 @@
Source code for injectable.container.injection_container
if
file.path in cls.LOADED_FILEPATHS:
continue
cls.LOADING_FILEPATH = file.path
-
cls._load_file(file)
+
run_path(file.path)
cls.LOADED_FILEPATHS.add(file.path)
cls.LOADING_FILEPATH = None
cls.LOADING_DEFAULT_NAMESPACE = None
@@ -227,15 +226,7 @@
Source code for injectable.container.injection_container
"@injectable_factory",
"injectable_factory(",
]
- )
-
- @classmethod
- def _load_file(cls, file: os.DirEntry):
- module_name = find_module_name(file)
- spec = spec_from_file_location(module_name, file.path)
- module = module_from_spec(spec)
- sys.modules[module_name] = module
- spec.loader.exec_module(module)
+
)
@@ -284,7 +275,7 @@ Navigation
diff --git a/docs/_modules/injectable/container/load_injection_container.html b/docs/_modules/injectable/container/load_injection_container.html
index dfee66e..deb8079 100644
--- a/docs/_modules/injectable/container/load_injection_container.html
+++ b/docs/_modules/injectable/container/load_injection_container.html
@@ -3,7 +3,7 @@
- injectable.container.load_injection_container — injectable 3.4.2 documentation
+ injectable.container.load_injection_container — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -138,7 +138,7 @@ Navigation
diff --git a/docs/_modules/injectable/errors/autowiring_error.html b/docs/_modules/injectable/errors/autowiring_error.html
index af7de5d..0b834e3 100644
--- a/docs/_modules/injectable/errors/autowiring_error.html
+++ b/docs/_modules/injectable/errors/autowiring_error.html
@@ -3,7 +3,7 @@
- injectable.errors.autowiring_error — injectable 3.4.2 documentation
+ injectable.errors.autowiring_error — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -100,7 +100,7 @@ Navigation
diff --git a/docs/_modules/injectable/errors/injection_error.html b/docs/_modules/injectable/errors/injection_error.html
index dd405e9..7bee219 100644
--- a/docs/_modules/injectable/errors/injection_error.html
+++ b/docs/_modules/injectable/errors/injection_error.html
@@ -3,7 +3,7 @@
- injectable.errors.injection_error — injectable 3.4.2 documentation
+ injectable.errors.injection_error — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -100,7 +100,7 @@ Navigation
diff --git a/docs/_modules/injectable/injection/inject.html b/docs/_modules/injectable/injection/inject.html
index 2c07215..7fbfccd 100644
--- a/docs/_modules/injectable/injection/inject.html
+++ b/docs/_modules/injectable/injection/inject.html
@@ -3,7 +3,7 @@
- injectable.injection.inject — injectable 3.4.2 documentation
+ injectable.injection.inject — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -267,7 +267,7 @@ Navigation
diff --git a/docs/_modules/injectable/injection/injectable_decorator.html b/docs/_modules/injectable/injection/injectable_decorator.html
index 9e4d9ee..76de237 100644
--- a/docs/_modules/injectable/injection/injectable_decorator.html
+++ b/docs/_modules/injectable/injection/injectable_decorator.html
@@ -3,7 +3,7 @@
- injectable.injection.injectable_decorator — injectable 3.4.2 documentation
+ injectable.injection.injectable_decorator — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -153,7 +153,7 @@ Navigation
diff --git a/docs/_modules/injectable/injection/injectable_factory_decorator.html b/docs/_modules/injectable/injection/injectable_factory_decorator.html
index 288fa59..457625a 100644
--- a/docs/_modules/injectable/injection/injectable_factory_decorator.html
+++ b/docs/_modules/injectable/injection/injectable_factory_decorator.html
@@ -3,7 +3,7 @@
- injectable.injection.injectable_factory_decorator — injectable 3.4.2 documentation
+ injectable.injection.injectable_factory_decorator — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -170,7 +170,7 @@ Navigation
diff --git a/docs/_modules/injectable/testing/clear_injectables_util.html b/docs/_modules/injectable/testing/clear_injectables_util.html
index 28cbbd7..2434ada 100644
--- a/docs/_modules/injectable/testing/clear_injectables_util.html
+++ b/docs/_modules/injectable/testing/clear_injectables_util.html
@@ -3,7 +3,7 @@
- injectable.testing.clear_injectables_util — injectable 3.4.2 documentation
+ injectable.testing.clear_injectables_util — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -129,7 +129,7 @@ Navigation
diff --git a/docs/_modules/injectable/testing/register_injectables_util.html b/docs/_modules/injectable/testing/register_injectables_util.html
index 072a52e..c329c27 100644
--- a/docs/_modules/injectable/testing/register_injectables_util.html
+++ b/docs/_modules/injectable/testing/register_injectables_util.html
@@ -3,7 +3,7 @@
- injectable.testing.register_injectables_util — injectable 3.4.2 documentation
+ injectable.testing.register_injectables_util — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -150,7 +150,7 @@ Navigation
diff --git a/docs/_modules/injectable/testing/reset_injection_container_util.html b/docs/_modules/injectable/testing/reset_injection_container_util.html
index 5890158..9aadfa3 100644
--- a/docs/_modules/injectable/testing/reset_injection_container_util.html
+++ b/docs/_modules/injectable/testing/reset_injection_container_util.html
@@ -3,7 +3,7 @@
- injectable.testing.reset_injection_container_util — injectable 3.4.2 documentation
+ injectable.testing.reset_injection_container_util — injectable 3.4.3 documentation
@@ -28,7 +28,7 @@
Navigation
@@ -113,7 +113,7 @@ Navigation
diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js
index 21ba5bd..1b0ce2a 100644
--- a/docs/_static/documentation_options.js
+++ b/docs/_static/documentation_options.js
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
- VERSION: '3.4.2',
+ VERSION: '3.4.3',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',
diff --git a/docs/authors.html b/docs/authors.html
index 8c06b93..6bb7ebf 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -3,7 +3,7 @@
- Authors — injectable 3.4.2 documentation
+ Authors — injectable 3.4.3 documentation
@@ -30,7 +30,7 @@
Navigation
@@ -114,7 +114,7 @@ Navigation
diff --git a/docs/changelog.html b/docs/changelog.html
index 8d5137e..8e08d6e 100644
--- a/docs/changelog.html
+++ b/docs/changelog.html
@@ -3,7 +3,7 @@
- Changelog — injectable 3.4.2 documentation
+ Changelog — injectable 3.4.3 documentation
@@ -29,7 +29,7 @@
Navigation
@@ -48,19 +48,25 @@ Navigation
Changelog
-
3.4.2 (2020-05-22)
+
3.4.3 (2020-06-24)
-
3.4.1 (2020-05-11)
+
3.4.2 (2020-05-22)
-
3.4.0 (2020-05-09)
+
3.4.1 (2020-05-11)
+
+
+
-
-
3.3.0 (2020-04-20)
+
-
-
3.2.1 (2020-04-19)
+
+
3.2.1 (2020-04-19)
InjectionContainer::load
is more resilient against duplicated injectablesregistering
@@ -85,32 +91,32 @@ 3.2.1 (2020-04-19)