[issue40545] Expose _PyErr_GetTopmostException

2022-01-06 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Julien Danjou
Julien Danjou added the comment: I confirm what Victor wrote. :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: > Why do you need to specify a `PyThreadState`? >From past issues, I understood that Julien's use case is a profiler which >inspects memory without calling functions nor switching to other threads. It's >like "dump the state of all Python threads". I'm fine

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Mark Shannon
Mark Shannon added the comment: Why do you need to specify a `PyThreadState`? -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Julien Danjou
Julien Danjou added the comment: PyErr_GetExcInfo() does not allow to specify a PyThreadState as argument. -- ___ Python tracker ___ __

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Mark Shannon
Mark Shannon added the comment: What's wrong with `PyErr_GetExcInfo()` for accessing the current exception? Victor, would you revert https://github.com/python/cpython/pull/19978 until we decide what to do. Thanks. -- ___ Python tracker

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: > I would definitely love to have a public API for this. I'm not sure if it's a good idea. It's kind of semi-internal. Stephan Behnel and Mark Shannon: What do you think of exposing PyThreadState exception stack (exc_state)? Especially the "top" exception. I

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8963a7f1f84a05412178b56629508b660d38861b by Victor Stinner in branch 'master': bpo-40545: Export _PyErr_GetTopmostException() function (GH-19978) https://github.com/python/cpython/commit/8963a7f1f84a05412178b56629508b660d38861b -- ___

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Julien Danjou
Julien Danjou added the comment: I would definitely love to have a public API for this. Would `PyErr_GetTopmostException` be a good candidate for this? (I can open a different bug report if needed) -- ___ Python tracker

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: The function was added by: commit ae3087c6382011c47db82fea4d05f8bbf514265d Author: Mark Shannon Date: Sun Oct 22 22:41:51 2017 +0100 Move exc state to generator. Fixes bpo-25612 (#1773) Move exception state information from frame objects to co

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 1.0 -> 2.0 pull_requests: +19293 pull_request: https://github.com/python/cpython/pull/19978 ___ Python tracker ___ ___

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Julien Danjou
Change by Julien Danjou : -- keywords: +patch pull_requests: +19292 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19977 ___ Python tracker ___ __

[issue40545] Expose _PyErr_GetTopmostException

2020-05-07 Thread Julien Danjou
New submission from Julien Danjou : The function _PyErr_GetTopmostException() is not exported and is useful to get access to exceptions info from a PyThreadState. -- components: C API messages: 368327 nosy: jd priority: normal severity: normal status: open title: Expose _PyErr_GetTopmo