This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients jd, vstinner
Date 2020-05-07.09:43:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588844624.08.0.76985048312.issue40545@roundup.psfhosted.org>
In-reply-to
Content
The function was added by:

commit ae3087c6382011c47db82fea4d05f8bbf514265d
Author: Mark Shannon <mark@hotpy.org>
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 coroutine (generator/thread) object where it belongs.

Python 3.9 is now built with -fvisibility=hidden, bpo-11410:

commit 0b60f64e4343913b4931dc27379d9808e5b78fe1
Author: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Date:   Tue Oct 15 08:26:12 2019 +0100

    bpo-11410: Standardize and use symbol visibility attributes across POSIX and Windows. (GH-16347)

It means that functions which are not explicitly exported are no longer exported.

So yeah, _PyErr_GetTopmostException() symbol is not properly exported.

But the function remains private. IMHO if someone wants to add a *public* function, it should return a *strong* reference to the 3 variables (exc type, exc value, exc tb).

See also bpo-39947: "[C API] Make the PyThreadState structure opaque (move it to the internal C API)". I added multiple public getters for PyThreadState structure in Python 3.9.
History
Date User Action Args
2020-05-07 09:43:44vstinnersetrecipients: + vstinner, jd
2020-05-07 09:43:44vstinnersetmessageid: <1588844624.08.0.76985048312.issue40545@roundup.psfhosted.org>
2020-05-07 09:43:44vstinnerlinkissue40545 messages
2020-05-07 09:43:43vstinnercreate