GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-145559: Add PyUnstable_DumpTraceback() and PyUnstable_DumpTracebackThreads() by alexmalyshev · Pull Request #148145 · python/cpython

Conversation

@alexmalyshev

@alexmalyshev alexmalyshev commented Apr 5, 2026 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

  • Issue: Expose signal-safe way to print stacktraces #145559

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@alexmalyshev
Add PyUnstable_DumpTraceback() and PyUnstable_DumpTracebackThreads()
fc1d6ad
Public versions of _Py_DumpTraceback() and _Py_DumpTracebackThreads().
@bedevere-app bedevere-app Bot mentioned this pull request Apr 5, 2026
Expose signal-safe way to print stacktraces #145559
Closed
alexmalyshev added 5 commits April 5, 2026 18:19
@alexmalyshev
Generate NEWS.d entry with blurb
d7c02c5
@alexmalyshev
Run make regen-configure
d7d4720
@alexmalyshev
Use backticks and roles properly in NEWS.d entry
7809d9c
@alexmalyshev
Fix missing colon
0e03292
@alexmalyshev
More sphinx-lint fixes
4bcd445
@alexmalyshev
alexmalyshev marked this pull request as ready for review April 6, 2026 20:09
@alexmalyshev
alexmalyshev requested review from AA-Turner, FFY00, ZeroIntensity, corona10, emmatyping, ericsnowcurrently and erlend-aasland as code owners April 6, 2026 20:09
@bedevere-app bedevere-app Bot added the awaiting review label Apr 6, 2026
@vstinner

vstinner commented Apr 30, 2026

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?

alexmalyshev reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner mentioned this pull request Apr 30, 2026
gh-148925: Add non-allocating PyUnstable_* APIs for call-stack iteration #148930
Open
alexmalyshev added 3 commits April 30, 2026 23:27
@alexmalyshev
Merge branch 'main' into traceback
aaa13b5
@alexmalyshev
Add back max_threads argument to decl after merge
5448a45
@alexmalyshev
Document max_threads argument
1ec0367
@read-the-docs-community

read-the-docs-community Bot commented May 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32564237 | 📁 Comparing cbfc410 against main (c0e0640)

  🔍 Preview build  

36 files changed · ± 36 modified

± Modified

  • glossary.html
  • c-api/exceptions.html
  • c-api/perfmaps.html
  • deprecations/index.html
  • deprecations/pending-removal-in-3.18.html
  • deprecations/pending-removal-in-3.19.html
  • deprecations/pending-removal-in-3.20.html
  • faq/programming.html
  • howto/descriptor.html
  • howto/perf_profiling.html
  • and 26 more...
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou
Merge branch 'main' into traceback
116b58a
vstinner
vstinner reviewed May 4, 2026
View reviewed changes
Comment thread Doc/c-api/exceptions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/traceback.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner mentioned this pull request May 4, 2026
Add PyUnstable_DumpTraceback() and PyUnstable_DumpTracebackThreads() capi-workgroup/decisions#101
Closed
4 of 5 tasks
@alexmalyshev
dump_error() and writing return values to fd
0e82438
vstinner
vstinner approved these changes May 6, 2026
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if my suggestions are applied :-)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

alexmalyshev reacted with heart emoji
All reactions
  • ❤️ 1 reaction
Comment thread Doc/c-api/exceptions.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/faulthandler.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.15.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels May 6, 2026
@vstinner
Apply suggestions from code review
cbfc410
Co-authored-by: Victor Stinner <[email protected]>
@vstinner
vstinner enabled auto-merge (squash) May 6, 2026 14:32
@vstinner
vstinner merged commit 646853d into python:main May 6, 2026
56 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label May 6, 2026
@alexmalyshev
alexmalyshev deleted the traceback branch May 6, 2026 15:28
@alexmalyshev

alexmalyshev commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for all the help @vstinner, I really appreciate it!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented May 6, 2026

Copy link
Copy Markdown
Member

You're welcome. Thanks for your contribution.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented May 6, 2026

Copy link
Copy Markdown
Member

There is no tests on the newly added C APIs. These functions are tested indirectly by test_faulthandler.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hoodmane hoodmane mentioned this pull request Jul 19, 2026
gh-145559: Make PyUnstable_DumpTraceback return void again #154131
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@ZeroIntensity ZeroIntensity Awaiting requested review from ZeroIntensity ZeroIntensity is a code owner
@FFY00 FFY00 Awaiting requested review from FFY00 FFY00 is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner
@erlend-aasland erlend-aasland Awaiting requested review from erlend-aasland erlend-aasland is a code owner
@corona10 corona10 Awaiting requested review from corona10 corona10 is a code owner
@emmatyping emmatyping Awaiting requested review from emmatyping emmatyping is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@alexmalyshev @vstinner @encukou
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.