-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Remove asserts that confuse enum _framestate
with enum _frameowner
#124148
Conversation
The owner field of _PyInterpreterFrame is supposed to be a member of enum _frameowner, but FRAME_CLEARED is a member of enum _framestate. At present, it happens that FRAME_CLEARED is not numerically equal to any member of enum _frameowner, but that could change in the future. The code that incorrectly assigned owner = FRAME_CLEARED was deleted in commit a53cc3f (pythonGH-116687). Remove the incorrect checks for owner != FRAME_CLEARED as well. Signed-off-by: Anders Kaseorg <[email protected]>
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
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.
Yup, makes sense. Nice catch.
Thanks @andersk for the PR, and @colesbury for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
Sorry, @andersk and @colesbury, I could not cleanly backport this to
|
Sorry, @andersk and @colesbury, I could not cleanly backport this to
|
Backports didn't apply cleanly and we didn't backport #116687, so I figure it's probably not worth backporting this after all. |
pythonGH-124148) The `owner` field of `_PyInterpreterFrame` is supposed to be a member of `enum _frameowner`, but `FRAME_CLEARED` is a member of `enum _framestate`. At present, it happens that `FRAME_CLEARED` is not numerically equal to any member of `enum _frameowner`, but that could change in the future. The code that incorrectly assigned `owner = FRAME_CLEARED` was deleted in commit a53cc3f (pythonGH-116687). Remove the incorrect checks for `owner != FRAME_CLEARED` as well.
The
owner
field of_PyInterpreterFrame
is supposed to be a member ofenum _frameowner
, butFRAME_CLEARED
is a member ofenum _framestate
. At present, it happens thatFRAME_CLEARED
is not numerically equal to any member ofenum _frameowner
, but that could change in the future. The code that incorrectly assignedowner = FRAME_CLEARED
was deleted in commit a53cc3f (GH-116687). Remove the incorrect checks forowner != FRAME_CLEARED
as well.