Skip to content

gh-145559: Add PyUnstable_DumpTraceback() and PyUnstable_DumpTracebackThreads()#148145

Open
alexmalyshev wants to merge 11 commits intopython:mainfrom
alexmalyshev:traceback
Open

gh-145559: Add PyUnstable_DumpTraceback() and PyUnstable_DumpTracebackThreads()#148145
alexmalyshev wants to merge 11 commits intopython:mainfrom
alexmalyshev:traceback

Conversation

@alexmalyshev
Copy link
Copy Markdown
Contributor

@alexmalyshev alexmalyshev commented Apr 5, 2026

These functions stopped being exported in #107215. However, they are the only way to print a Python stacktrace safely from a signal handler, making them very useful for extensions. Re-export them.

Regenerated from #145560 due to a bad merge.


📚 Documentation preview 📚: https://cpython-previews--148145.org.readthedocs.build/

Public versions of _Py_DumpTraceback() and _Py_DumpTracebackThreads().
@vstinner
Copy link
Copy Markdown
Member

@alexmalyshev: There are now merge conflicts, can you try to solve them? Moreover, a new max_threads parameter has been added. Can you update your PR to add it?

@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented May 1, 2026

Comment thread Doc/c-api/exceptions.rst Outdated
Comment thread Python/traceback.c Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants