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
bpo-39164: errors: add and expose _PyErr_GetExcInfo #17752
Conversation
|
@vstinner just in case you missed it 👋 :) |
Misc/NEWS.d/next/C API/2019-12-30-10-43-52.bpo-39164.WEV0uu.rst
Outdated
Show resolved
Hide resolved
This adds a new function named _PyErr_GetExcInfo that is a variation of the original PyErr_GetExcInfo taking a PyThreadState as its first argument. That function allows to retrieve the exceptions information of any Python thread — not only the current one.
76d6cbf
to
1b19a83
Compare
|
Failure looks unrelated 🤔 |
|
test_ttk_guionly failed twice on Azure Pipelines "Tests / Ubuntu": |
|
Thanks @jd, I merged your PR. I made minor changes on your commit message. |
|
Thank you @vstinner 🙇 |
| PyErr_GetExcInfo(PyObject **p_type, PyObject **p_value, PyObject **p_traceback) | ||
| { | ||
| PyThreadState *tstate = _PyThreadState_GET(); | ||
| return _PyErr_GetExcInfo(tstate, p_type, p_value, p_traceback); |
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.
Should this have a return? I think this introduced a warning on the windows build: https://github.com/python/cpython/runs/390021032#step:3:572
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.
You're right. I wrote PR #18010 to fix the warning.
This adds a new function named _PyErr_GetExcInfo() that is a variation of the original PyErr_GetExcInfo() taking a PyThreadState as its first argument. That function allows to retrieve the exceptions information of any Python thread -- not only the current one.
This adds a new function named _PyErr_GetExcInfo that is a variation of the
original PyErr_GetExcInfo taking a PyThreadState as its first argument.
That function allows to retrieve the exceptions information of any Python
thread — not only the current one.
https://bugs.python.org/issue39164