Skip to content

Commit

Permalink
buildsys: Add comments explaining why _PyTraceback_Add is no longer u…
Browse files Browse the repository at this point in the history
…sed.
  • Loading branch information
heinezen committed Oct 12, 2024
1 parent ce1f7f8 commit 98908b0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions openage/cppinterface/exctranslate.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,22 @@ from ..log import info
cdef extern from "Python.h":
int PyException_SetTraceback(PyObject *ex, PyObject *tb)

# _PyTraceback_Add has been made private in Python 3.13
# see https://github.com/python/cpython/pull/108453
# TODO: Find another solution to add tracebacks
# 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
Note: Currently does nothing, because _PyTraceback_Add is no longer
accessible since Python 3.13.
TODO: Find another solution to add tracebacks.
"""
# _PyTraceback_Add(functionname, filename, lineno)


Expand Down

0 comments on commit 98908b0

Please sign in to comment.