Issue 27911: Unnecessary error checks in exec_builtin_or_dynamic (original ) (raw ) This issue has been migrated to GitHub: https://github.com/python/cpython/issues/72098
classification
process
Created on 2016-08-31 11:22 by xiang.zhang , last changed 2022-04-11 14:58 by admin . This issue is now closed .
Messages (5)
msg274015 - (view)
Author: Xiang Zhang (xiang.zhang) *
Date: 2016-08-31 11:22
The two PyErr_Occurred check in exec_builtin_or_dynamic are unnecessary. The PyModule_Check at the beginning of exec_builtin_or_dynamic has eliminated the possibility for PyModule_GetDef/State to fail.
msg274043 - (view)
Author: Brett Cannon (brett.cannon) *
Date: 2016-08-31 17:25
Patch LGTM. Thanks for catching that, Xiang! I'll commit your fix when I can (might not be until after 3.6b1 since feature improvements are taking priority on my time to make the feature freeze deadline).
msg274044 - (view)
Author: Xiang Zhang (xiang.zhang) *
Date: 2016-08-31 17:27
It's okay. Glad that you spare some time to reply. :)
msg274923 - (view)
Author: Roundup Robot (python-dev)
Date: 2016-09-08 00:01
New changeset 96c6816825dc by Brett Cannon in branch 'default': Issue #27911 : Remove some unnecessary error checks in import.c. https://hg.python.org/cpython/rev/96c6816825dc
msg274924 - (view)
Author: Brett Cannon (brett.cannon) *
Date: 2016-09-08 00:01
Thanks for the patch!
History
Date
User
Action
Args
2022-04-11 14:58:35
admin
set
github: 72098
2016-09-08 00:01:37
brett.cannon
set
status: open -> closedresolution: fixedmessages: + stage: resolved
2016-09-08 00:01:12
python-dev
set
nosy: + python-dev messages: +
2016-08-31 17:27:57
xiang.zhang
set
messages: +
2016-08-31 17:25:16
brett.cannon
set
assignee: brett.cannon messages: +
2016-08-31 11:22:37
xiang.zhang
create