Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Lib/importlib/_bootstrap_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,13 @@ def create_module(self, spec):
)

# Ensure that the __file__ points at the .fwork location
module.__file__ = path
try:
module.__file__ = path
except AttributeError:
# Not important enough to report.
# (The error is also ignored in _bootstrap._init_module_attrs or
# import_run_extension in import.c)
pass

return module

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Ignore :exc:`AttributeError` when setting a module's ``__file__`` attribute
when loading an extension module packaged as Apple Framework.
Loading