From 7bed1aed5d17d3342bcafa5d9b59c104d73704fe 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 402b513a..7af4d43d 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):