Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-128049: Fix type confusion bug with the return value of a custom ExceptionGroup split function#128079
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
gh-128049: Fix type confusion bug with the return value of a custom ExceptionGroup split function#128079
Changes from1 commit
fb869d47a482a4723a6a6a360e605444a9105d809bd13f32aFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -2095,8 +2095,15 @@ _PyEval_ExceptionGroupMatch(PyObject* exc_value, PyObject *match_type, | ||
| if (pair == NULL) { | ||
| return -1; | ||
| } | ||
| if (!PyTuple_CheckExact(pair) || PyTuple_Size(pair) != 2) { | ||
| PyErr_Format(PyExc_TypeError, | ||
| "%s.split must return a 2-tuple", | ||
| Py_TYPE(exc_value)->tp_name); | ||
iritkatriel marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| Py_DECREF(pair); | ||
| return -1; | ||
| } | ||
| *match = Py_NewRef(PyTuple_GET_ITEM(pair, 0)); | ||
| *rest = Py_NewRef(PyTuple_GET_ITEM(pair, 1)); | ||
| Py_DECREF(pair); | ||
iritkatriel marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
Uh oh!
There was an error while loading.Please reload this page.