[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Created a new issue + fix in issue43517. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: After analysis, it may not need reversal. There is a simple logic error it seems. Will check. -- ___ Python tracker ___

[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: fixed -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.10, Python 3.9 -Python 3.7, Python 3.8 ___ Python tracker

[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, going through other open issues including on third-party projects, I think these changes should unfortunately be reverted. The regressions produced are far from trivial and most developers seem at a loss how to fix them. --

[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note the conjunction of this change + issue32596 produces import fragility: https://bugs.python.org/issue43515 -- ___ Python tracker ___

[issue35943] PyImport_GetModule() can return partially-initialized module

2020-12-28 Thread Cebtenzzre
Change by Cebtenzzre : -- nosy: +cebtenzzre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35943] PyImport_GetModule() can return partially-initialized module

2020-12-20 Thread Big Stone
Big Stone added the comment: Is this bug causing the Dask-Jupyterlab failure ? https://github.com/dask/distributed/issues/4168 -- nosy: +Big Stone ___ Python tracker ___

[issue35943] PyImport_GetModule() can return partially-initialized module

2020-10-23 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: After this fix, some functions like multiprocessing.Pool cannot be used in threaded code(https://bugs.python.org/issue41567). importerror-sample.tgz contains simplified code to reproduce the same error without multiprocessing module. Is this an expected

[issue35943] PyImport_GetModule() can return partially-initialized module

2020-02-20 Thread Geoffrey Bache
Geoffrey Bache added the comment: @Valentyn Tymofieiev - true, and thanks for the tip, though the symptoms described there are somewhat different from what I'm observing. Also, my problem seems to be dependent on zipping the Python code, which that one isn't. --

[issue35943] PyImport_GetModule() can return partially-initialized module

2020-02-20 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: @gjb1002: see also https://bugs.python.org/issue38884, which demonstrates that concurrent imports are not thread-safe on Python 3. -- ___ Python tracker

[issue35943] PyImport_GetModule() can return partially-initialized module

2020-02-20 Thread Geoffrey Bache
Geoffrey Bache added the comment: Oops, I mean we call PyImport_ImportModule and get these issues when the files are zipped. Unless that calls PyImport_GetModule internally I guess it's not related to this then. -- ___ Python tracker

[issue35943] PyImport_GetModule() can return partially-initialized module

2020-02-19 Thread Geoffrey Bache
Geoffrey Bache added the comment: I have been experiencing what I thought was this issue in my embedded Python code. We have been using Python 3.7, so I thought upgrading to 3.8.1 would fix it, but it doesn't seem to have made any difference. My C++ code essentially can call

[issue35943] PyImport_GetModule() can return partially-initialized module

2020-01-21 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: > Do you mean that there is a risk that the backport introduces a regression in > another part of the code? If yes, I would suggest to not backport the change > to *stable* branches. My worry are the many changes that are required to ceval to make this

[issue35943] PyImport_GetModule() can return partially-initialized module

2020-01-15 Thread STINNER Victor
STINNER Victor added the comment: > The changes required to successfully do this backport are many and affect > critical areas. I am not in a hurry to do this. If anyone else wants to take > this up quickly, please do. Do you mean that there is a risk that the backport introduces a

[issue35943] PyImport_GetModule() can return partially-initialized module

2020-01-15 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: The changes required to successfully do this backport are many and affect critical areas. I am not in a hurry to do this. If anyone else wants to take this up quickly, please do. -- ___ Python tracker

[issue35943] PyImport_GetModule() can return partially-initialized module

2019-11-21 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: Thanks. Is it possible that this issue and https://bugs.python.org/issue38884 are duplicates? -- ___ Python tracker ___

[issue35943] PyImport_GetModule() can return partially-initialized module

2019-11-19 Thread Brett Cannon
Brett Cannon added the comment: I've assigned this to Joannah to decide if she wants to backport this. -- assignee: -> nanjekyejoannah nosy: +nanjekyejoannah ___ Python tracker

[issue35943] PyImport_GetModule() can return partially-initialized module

2019-11-18 Thread Valentyn Tymofieiev
Valentyn Tymofieiev added the comment: Do we plan to backport the change by nanjekyejoannah to 3.7 branch? -- nosy: +Valentyn Tymofieiev ___ Python tracker ___

[issue35943] PyImport_GetModule() can return partially-initialized module

2019-09-11 Thread Brett Cannon
Brett Cannon added the comment: New changeset 37c22206981f52ae35c28b39f7530f8438afbfdb by Brett Cannon (Joannah Nanjekye) in branch 'master': bpo-35943: Prevent PyImport_GetModule() from returning a partially-initialized module (GH-15057)

[issue35943] PyImport_GetModule() can return partially-initialized module

2019-09-11 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35943] PyImport_GetModule() can return partially-initialized module

2019-07-31 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- keywords: +patch pull_requests: +14806 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15057 ___ Python tracker

[issue35943] PyImport_GetModule() can return partially-initialized module

2019-02-22 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35943] PyImport_GetModule() can return partially-initialized module

2019-02-08 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35943] PyImport_GetModule() can return partially-initialized module

2019-02-08 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35943] PyImport_GetModule() can return partially-initialized module

2019-02-08 Thread Eric Snow
Eric Snow added the comment: Yeah, that makes sense. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35943] PyImport_GetModule() can return partially-initialized module

2019-02-08 Thread Antoine Pitrou
New submission from Antoine Pitrou : PyImport_GetModule() returns whatever is in sys.modules, even if the module is still importing and therefore only partially initialized. One possibility is to reuse the optimization already done in PyImport_ImportModuleLevelObject(): /*