-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Bugs in PyImport_ImportModuleLevelObject #71606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
Here is a reproducer for the first bug. In Python 3.6: $ ./python import_bug_1.py
1738
738
Fatal Python error: deallocating None Current thread 0xb7552700 (most recent call first): In Python 3.5: $ ./python import_bug_1.py
1709
Traceback (most recent call last):
File "import_bug_1.py", line 10, in <module>
from .foo import bar
SystemError: Parent module '' not loaded, cannot perform relative import |
Here is a reproducer for the second bug. In Python 2.7 and Python 3.2 all works. In Python 3.3+: $ ./python import_bug_2.py
Traceback (most recent call last):
File "import_bug_2.py", line 6, in <module>
import os.path
File "import_bug_2.py", line 4, in __import__
raise AssertionError
AssertionError |
The semantics for looking up __import__ is to only grab it from builtins and to ignore globals() and locals() (see issue bpo-25500), so any fix/change should follow those semantics. |
New changeset c88ec1bb67d0 by Serhiy Storchaka in branch '3.5': New changeset d87f99e297d5 by Serhiy Storchaka in branch 'default': |
I'm getting a segfault after d87f99e297d5 (SubinterpreterTest.test_subinterps). $ ./python -m test test_capi
Run tests sequentially
0:00:00 [1/1] test_capi
Fatal Python error: Segmentation fault Current thread 0x00007fd5e401d700 (most recent call first): See also http://buildbot.python.org/all/builders/s390x%20RHEL%203.x/builds/1387/steps/test/logs/stdio for the same failure on buildbots. |
New changeset 4c07faa33915 by Serhiy Storchaka in branch '3.5': New changeset 5540234ca517 by Serhiy Storchaka in branch 'default': |
Added temporary workaround to make buildbots working. The bug is partially reappeared in __import__ in subinterpreter. I think this is better than reverting all patches. |
The workaround was removed in berkerpeksag@133138a Can this issue be closed now? |
I think it can. Thanks Berker for reminder. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: