Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8debf09

Browse files
authoredAug 9, 2023
Update providers.pyx
allow string imports outside of packages
1 parent cc2304e commit 8debf09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/dependency_injector/providers.pyx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5034,7 +5034,7 @@ def _resolve_calling_module():
50345034

50355035
def _resolve_calling_package_name():
50365036
module = _resolve_calling_module()
5037-
return module.__package__
5037+
return getattr(module, "__package__", None)
50385038

50395039

50405040
cpdef _copy_parent(object from_, object to, dict memo):

0 commit comments

Comments
 (0)
Please sign in to comment.