Skip to content

_PyTraceback_Add is no longer exposed by Python 3.13 #1696

@heinezen

Description

@heinezen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBehaving differently as it should behavelang: cythonImplemented using Cython code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions