[issue27419] Bugs in PyImport_ImportModuleLevelObject

2018-08-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it can. Thanks Berker for reminder. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27419] Bugs in PyImport_ImportModuleLevelObject

2018-08-02 Thread Berker Peksag
Berker Peksag added the comment: The workaround was removed in https://github.com/berkerpeksag/cpython/commit/133138a284be1985ebd9ec9014f1306b9a425d98 Can this issue be closed now? -- ___ Python tracker

[issue27419] Bugs in PyImport_ImportModuleLevelObject

2016-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 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. -- ___ Python tracker

[issue27419] Bugs in PyImport_ImportModuleLevelObject

2016-07-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4c07faa33915 by Serhiy Storchaka in branch '3.5': Issue #27419: Added temporary workaround for subinterpreters. https://hg.python.org/cpython/rev/4c07faa33915 New changeset 5540234ca517 by Serhiy Storchaka in branch 'default': Issue #27419: Added

[issue27419] Bugs in PyImport_ImportModuleLevelObject

2016-07-17 Thread Berker Peksag
Berker Peksag added the comment: 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 0x7fd5e401d700 (most recent call first): File

[issue27419] Bugs in PyImport_ImportModuleLevelObject

2016-07-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset c88ec1bb67d0 by Serhiy Storchaka in branch '3.5': Issue #27419: Standard __import__() no longer look up "__import__" in globals https://hg.python.org/cpython/rev/c88ec1bb67d0 New changeset d87f99e297d5 by Serhiy Storchaka in branch 'default': Issue

[issue27419] Bugs in PyImport_ImportModuleLevelObject

2016-07-04 Thread Brett Cannon
Brett Cannon added the comment: The semantics for looking up __import__ is to only grab it from builtins and to ignore globals() and locals() (see issue #25500), so any fix/change should follow those semantics. -- ___ Python tracker

[issue27419] Bugs in PyImport_ImportModuleLevelObject

2016-07-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 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 import os.path File "import_bug_2.py", line 4, in

[issue27419] Bugs in PyImport_ImportModuleLevelObject

2016-06-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 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): Aborted (core dumped) In Python 3.5: $ ./python import_bug_1.py 1709

[issue27419] Bugs in PyImport_ImportModuleLevelObject

2016-06-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: 1. If __package__ is None, and __spec__ is None or not set, and emitting ImportWarning raises an error, package is a borrowed reference to None, and it is decrefed. As result, the reference count of None is decremented. 2. __import__ is looked in globals