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

_PyTraceback_Add is no longer exposed by Python 3.13 #1696

Closed
heinezen opened this issue Oct 11, 2024 · 0 comments · Fixed by #1697
Closed

_PyTraceback_Add is no longer exposed by Python 3.13 #1696

heinezen opened this issue Oct 11, 2024 · 0 comments · Fixed by #1697
Labels
bug Behaving differently as it should behave lang: cython Implemented using Cython code

Comments

@heinezen
Copy link
Member

Python 3.13 moved a bunch of previously exposed functionality to its private C API, see the Python 3.13 release notes. Of these functions, we currently use _PyTraceback_Add to append the C++ backtrace to our Python wrapper code in

cdef extern from "traceback.h":
void _PyTraceback_Add(const char *funcname, const char *filename, int lineno)
cdef void PyTraceback_Add(const char *functionname, const char *filename, int lineno) noexcept with gil:
"""
Add a new traceback stack frame.
Redirects to Python's internal _PyTraceback_Add function.
"""
# possible since 3.4.3 due to http://bugs.python.org/issue24436.
# the function will likely remain internal due to https://bugs.python.org/issue24743
_PyTraceback_Add(functionname, filename, lineno)

When Python 3.13 is used for building, the code no longer compiles.

We should probably remove _PyTraceback_Add and find a better solution for the backtraces.

@heinezen heinezen added bug Behaving differently as it should behave lang: cython Implemented using Cython code labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Behaving differently as it should behave lang: cython Implemented using Cython code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant