mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.13] gh-140633: AppleFrameworkLoader: Ignore AttributeError when setting __file__ (GH-140635) (GH-140659)
(cherry picked from commit 3416e7c8dc)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
134e2f8d7f
commit
0e3b47b839
2 changed files with 9 additions and 1 deletions
|
|
@ -1762,7 +1762,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
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
Ignore :exc:`AttributeError` when setting a module's ``__file__`` attribute
|
||||
when loading an extension module packaged as Apple Framework.
|
||||
Loading…
Add table
Add a link
Reference in a new issue