This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: _imp_create_dynamic_impl() does not clear error.
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BTaskaya, brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2018-12-12 19:21 by eric.snow, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 14738 closed BTaskaya, 2019-07-13 12:16
Messages (6)
msg331717 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2018-12-12 19:21
In _imp_create_dynamic_impl() [1] the case where _PyImport_FindExtensionObject() returns NULL may leave an error set.  Either the error should be raised (like _imp_create_builtin() does) or it should be cleared (via PyErr_Clear()).
msg347809 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python committer) Date: 2019-07-13 12:49
Can you give me the case so i can reproduce this and test it.
msg348200 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2019-07-19 21:49
Why would was want to swallow an exception? I think it would be better to let the exception propagate.
msg348212 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2019-07-20 11:06
Agreed, raising the exception properly would be the way to go.
msg348493 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2019-07-26 15:36
Hmm, looks like this was already fixed by Serhiy (for bpo-35454) the day before I opened this issue. :)

3.8/master: GH-11077 8905fcc85a6fc3ac394bc89b0bbf40897e9497a6
3.7: GH-11105 62674f3a36ec55f86a5f20ee028a37fbd549bd6c
3.6: GH-11106 8855d9339858683c9b4fcd50b02a7bca526d4726

That's what I get for not keeping my local clone up-to-date.
msg348494 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2019-07-26 15:39
Sorry, @Batuhan.  We appreciate your effort and would be glad to see more contributions from you.  I hope you at least learned something positive while working on this. :)
History
Date User Action Args
2022-04-11 14:59:09adminsetgithub: 79657
2019-07-26 15:39:35eric.snowsetmessages: + msg348494
2019-07-26 15:36:56eric.snowsetstatus: open -> closed

nosy: + serhiy.storchaka
messages: + msg348493

resolution: fixed
stage: patch review -> resolved
2019-07-20 11:06:09ncoghlansetnosy: + ncoghlan
messages: + msg348212
2019-07-19 21:49:52brett.cannonsetnosy: + brett.cannon
messages: + msg348200
2019-07-13 12:49:10BTaskayasetnosy: + BTaskaya
messages: + msg347809
2019-07-13 12:16:09BTaskayasetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request14533
2018-12-12 19:21:19eric.snowcreate