Skip to content

Commit 50e6501

Browse files
committed
Address comments on C API docs, add whatsnew entry
1 parent e497d2e commit 50e6501

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Doc/c-api/exceptions.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,9 +1359,9 @@ Tracebacks
13591359
File "xxx", line xxx in <xxx>
13601360
13611361
This function is meant to debug situations such as segfaults, fatal errors,
1362-
.etc. The file and function names it outputs are encoded to ASCII with
1362+
and similar. The file and function names it outputs are encoded to ASCII with
13631363
backslashreplace and truncated to 500 characters. It writes only the first
1364-
100 frames, further frames are truncated with the line " ...".
1364+
100 frames; further frames are truncated with the line ``...``.
13651365
13661366
This function is safe to use from signal handlers.
13671367
@@ -1386,9 +1386,9 @@ Tracebacks
13861386
This function will return ``NULL`` on success, or an error message on error.
13871387
13881388
This function is meant to debug debug situations such as segfaults, fatal
1389-
errors, .etc. It calls :c:func:`PyUnsafe_DumpTraceback` for each thread. It
1390-
only writes the tracebacks of the first 100 threads, further output is
1391-
truncated with the line " ...".
1389+
errors, and similar. It calls :c:func:`PyUnstable_DumpTraceback` for each
1390+
thread. It only writes the tracebacks of the first 100 threads, further
1391+
output is truncated with the line ``...``.
13921392
13931393
This function is safe to use from signal handlers.
13941394

Doc/whatsnew/3.15.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,6 +1668,11 @@ New features
16681668
Python 3.14.
16691669
(Contributed by Victor Stinner in :gh:`142417`.)
16701670

1671+
* Add :c:func:`PyUnstable_DumpTraceback` and `PyUnstable_DumpTracebackThreads`
1672+
functions to safely output Python stacktraces. These were previously internal
1673+
functions ``_Py_DumpTraceback`` and ``_Py_DumpTracebackThreads``.
1674+
(Contributed by Alex Malyshev in :gh:`145559`.)
1675+
16711676
Changed C APIs
16721677
--------------
16731678

0 commit comments

Comments
 (0)