Skip to content
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

The callback signature for PY_THROW is inconsistent with the other exception handling callbacks #107724

Closed
markshannon opened this issue Aug 7, 2023 · 1 comment
Labels
3.12 bugs and security fixes release-blocker type-bug An unexpected behavior, bug, or error

Comments

@markshannon
Copy link
Member

markshannon commented Aug 7, 2023

The callbacks for RAISE, RERAISE, EXCEPTION_HANDLED, PY_UNWIND and STOP_ITERATION all take the exception as their third argument.
PY_THROW is the odd one out, but it should be consistent with the others.
PY_THROW is a rare event, so this got overlooked. We should fix it before the next release of 3.12.

Fortunately it is very easy to fix.

Linked PRs

@markshannon markshannon added type-bug An unexpected behavior, bug, or error 3.12 bugs and security fixes release-blocker labels Aug 7, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 9, 2023
…ythonGH-107725)

(cherry picked from commit 52fbcf6)

Co-authored-by: Mark Shannon <mark@hotpy.org>
Yhg1s pushed a commit that referenced this issue Aug 11, 2023
…GH-107725) (#107802)

GH-107724: Fix the signature of `PY_THROW` callback functions. (GH-107725)
(cherry picked from commit 52fbcf6)

Co-authored-by: Mark Shannon <mark@hotpy.org>
@kumaraditya303
Copy link
Contributor

Closed as backport is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes release-blocker type-bug An unexpected behavior, bug, or error
Projects
Development

No branches or pull requests

2 participants