Skip to content

Commit

Permalink
Update providers.pyx
Browse files Browse the repository at this point in the history
allow string imports outside of packages
  • Loading branch information
carloshorn committed Nov 19, 2024
1 parent abf2a25 commit 7bed1ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dependency_injector/providers.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7bed1ae

Please sign in to comment.