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):