From 8debf09f94fc1d84b8f57d770f7ee0ae86e5ffbb Mon Sep 17 00:00:00 2001 From: Carlos Horn Date: Wed, 9 Aug 2023 23:40:08 +0200 Subject: [PATCH] Update providers.pyx allow string imports outside of packages --- src/dependency_injector/providers.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dependency_injector/providers.pyx b/src/dependency_injector/providers.pyx index 8208ad63..64a6bf3b 100644 --- a/src/dependency_injector/providers.pyx +++ b/src/dependency_injector/providers.pyx @@ -5034,7 +5034,7 @@ def _resolve_calling_module(): def _resolve_calling_package_name(): module = _resolve_calling_module() - return module.__package__ + return getattr(module, "__package__", None) cpdef _copy_parent(object from_, object to, dict memo):