-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
gh-116326: Handler errors correctly in getwindowsversion in sysmodule
#116339
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
Conversation
colesbury
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Thanks! I would like to wait for a bit for @ericsnowcurrently's review as a code owner :) |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PyErr_Clear() calls in this function looks suspicious too. In good code it should only be called for expected exceptions, the others should be reported as errors.
I think that this is a side-effect of using |
|
Yes, one of |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
getwindowsversion in `sysmodulegetwindowsversion in sysmodule
|
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
…sysmodule` (pythonGH-116339) (cherry picked from commit c91bdf8) Co-authored-by: Nikita Sobolev <[email protected]>
|
Sorry, @sobolevn, I could not cleanly backport this to |
|
GH-116354 is a backport of this pull request to the 3.12 branch. |
|
@serhiy-storchaka what is the best way to do backports here? I forgot that |
|
Explicitly check for AttributeError. |
|
|
This failure also happened on a previous PR: https://buildbot.python.org/all/#/builders/1102/builds/751/steps/5/logs/stdio Plus, it is a debian failure for a windows-only change. |
…n` in `sysmodule` (pythonGH-116339) (cherry picked from commit c91bdf8) Co-authored-by: Nikita Sobolev <[email protected]>
|
GH-116388 is a backport of this pull request to the 3.11 branch. |
PyErr_Occurredis no longer needed, because we check for allNULLvaluesPy_BuildValue("(kkk)", ...)can failsys_getwindowsversion_implmight potentially swallow errors insysmodule.c#116326