Skip to content
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
220 commits
Select commit Hold shift + click to select a range
d0c95ed
Export _Py_DumpTraceback and _Py_DumpTracebackThreads as PyUnstable_ …
alexmalyshev Mar 5, 2026
538a1cd
Add written docs, move decls to cpython/traceback.h to avoid modifyin…
alexmalyshev Mar 5, 2026
e497d2e
Move comments into Doc/c-api, fix documented string length
alexmalyshev Mar 6, 2026
50e6501
Address comments on C API docs, add whatsnew entry
alexmalyshev Mar 6, 2026
71c6fdd
📜🤖 Added by blurb_it.
blurb-it[bot] Mar 6, 2026
eb76a51
Fix missing :c:func:
alexmalyshev Mar 6, 2026
ce1980c
Updates to docs
alexmalyshev Mar 10, 2026
5594e75
Merge branch 'main' into dump-traceback
alexmalyshev Mar 11, 2026
cedb1f3
Returning const char* from PyUnstable_DumpTraceback, write errors to fd
alexmalyshev Mar 12, 2026
ec5b28c
Clarify these functions aren't that safe
alexmalyshev Mar 13, 2026
d216bc2
Merge branch 'main' into dump-traceback
alexmalyshev Mar 20, 2026
c2642e2
Fix incorrect doc for PyUnstable_DumpTraceback
alexmalyshev Mar 20, 2026
b36b87b
gh-145980: Fix copy/paste mistake in binascii.c (#146230)
vstinner Mar 20, 2026
1eff27f
gh-146227: Fix wrong type in _Py_atomic_load_uint16 in pyatomic_std.h…
colesbury Mar 20, 2026
b5e4c46
gh-146228: Better fork support in cached FastPath (#146231)
jaraco Mar 20, 2026
879c85f
GH-145667: Merge `GET_ITER` and `GET_YIELD_FROM_ITER` (GH-146120)
markshannon Mar 21, 2026
897fa23
GH-100108: Add async generators best practices section (#141885)
sergey-miryanov Mar 21, 2026
60fbc20
gh-140947: fix contextvars handling for server tasks in asyncio (#14…
kumaraditya303 Mar 21, 2026
8a531f8
gh-138234: clarify returncode behavior for subprocesses created with …
andreuu-tsai Mar 21, 2026
f6b5eed
gh-146153: Use `frozendict` in pure python fallback for `curses.has_k…
jonathandung Mar 21, 2026
83360b5
Docs: replace all `datetime` imports with `import datetime as dt` (#1…
hugovk Mar 21, 2026
3776aba
Update docs for gh-146056 (GH-146213)
serhiy-storchaka Mar 22, 2026
f0aeabc
gh-140049: Colorize exception notes in `traceback.py` (#140051)
StanFromIreland Mar 22, 2026
c30fae4
gh-146245: Fix reference and buffer leaks via audit hook in socket mo…
aisk Mar 22, 2026
97c725c
gh-143959: Fix test_datetime if _datetime is unavailable (GH-145248)
serhiy-storchaka Mar 22, 2026
161329c
gh-145144: Add more tests for UserList, UserDict, etc (GH-145145)
serhiy-storchaka Mar 22, 2026
1ceb1fb
gh-146261: Fix bug in `_Py_uop_sym_set_func_version` (GH-146291)
Sacul0457 Mar 22, 2026
e36f8db
gh-143414: Implement unique reference tracking for JIT, optimize unpa…
reidenong Mar 22, 2026
a17301a
gh-135953: Properly obtain main thread identifier in Gecko Collector …
flowln Mar 22, 2026
b4e5bc2
gh-146192: Add base32 support to binascii (GH-146193)
kangtastic Mar 22, 2026
ae6adc9
gh-146308: Fix error handling issues in _remote_debugging module (#14…
pablogsal Mar 22, 2026
4561f64
gh-145264: Do not ignore excess Base64 data after the first padded qu…
serhiy-storchaka Mar 22, 2026
fb8d8d9
Add a warning about untrusted input to `configparser` docs (#146276)
StanFromIreland Mar 22, 2026
90f9991
gh-146056: Rework ref counting in treebuilder_handle_end() (#146167)
vstinner Mar 23, 2026
91cd2e5
gh-146175: Soft-deprecate outdated macros; convert internal usage (GH…
encukou Mar 23, 2026
1114d7f
gh-108907: ctypes: Document _type_ codes (GH-145837)
encukou Mar 23, 2026
f5d47fc
gh-143387: Raise an exception instead of returning None when metadata…
jaraco Mar 23, 2026
c94048b
gh-146197: Add Emscripten to CI (#146198)
hoodmane Mar 23, 2026
0c83e8b
gh-146325: Use `test.support.requires_fork` in test_fastpath_cache_cl…
hoodmane Mar 23, 2026
a57209e
gh-146197: Run -m test.pythoninfo on the Emscripten CI (#146332)
vstinner Mar 23, 2026
821581a
gh-145719: Add `.efi` file detection in `mimetypes` (#145720)
clin1234 Mar 23, 2026
daa159f
gh-135871: Reload lock internal state while spinning in `PyMutex_Lock…
dpdani Mar 23, 2026
7dc2f52
gh-146197: Include a bit more information in sys._emscripten_info.run…
hoodmane Mar 23, 2026
e017971
gh-146199: Fix error handling in `code_richcompare` when `PyObject_Ri…
brijkapadia Mar 23, 2026
306c556
gh-144319: obtain SeLockMemoryPrivilege on Windows (#144928)
chris-eibl Mar 23, 2026
bcff99c
gh-146202: Create tmp_dir in regrtest worker (#146347)
vstinner Mar 23, 2026
fae5761
gh-140196: Added constructor behavior changes in ast.rst for python 3…
MannXo Mar 24, 2026
95340ef
Remove inactive CODEOWNERS (#145930)
StanFromIreland Mar 24, 2026
07a555d
gh-133879: Copyedit "What's new in Python 3.15" (#146345)
hugovk Mar 24, 2026
6d73bc2
gh-145866: Convert `DICT_MERGE` to leave its inputs on the stack to b…
NekoAsakura Mar 24, 2026
68c7fad
gh-138580: Add sys.float_info.iec_60559 boolean flag (#138811)
skirpichev Mar 24, 2026
951675c
gh-146306: JIT: Optimize float operations by mutating uniquely-refere…
eendebakpt Mar 24, 2026
119fce7
gh-144984: Skip test under tracerefs (GH-146218)
encukou Mar 24, 2026
1887a95
gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770)
befeleme Mar 24, 2026
535b09c
GH-126910: Allow most native profilers and debuggers to unwind throug…
brandtbucher Mar 24, 2026
6009309
gh-146041: Avoid lock in sys.intern() for already interned strings (g…
colesbury Mar 24, 2026
f4d1be4
gh-145633: Drop runtime checks for floatting-point formats in the arr…
skirpichev Mar 25, 2026
f2fcc49
gh-145633: Remove remnants of the "unknown_format" (floats) in the st…
skirpichev Mar 25, 2026
08f6b33
gh-146355: Fix `main_module` ref leak in `_PyRun_SimpleStringFlagsWit…
A0su Mar 25, 2026
3364e7e
gh-146207: Add support for OpenSSL 4.0.0 alpha1 (#146217)
vstinner Mar 25, 2026
2be147e
gh-146352: In Emscripten pyrepl test, pick port dynamically (#146375)
hoodmane Mar 25, 2026
d0e66ef
gh-146369: Ensure `PYTHON_LAZY_IMPORTS=none` overrides `__lazy_module…
hugovk Mar 25, 2026
4240c7d
gh-145098: Run Apple Silicon macOS CI on macos-26 (Tahoe) (#145099)
clintonsteiner Mar 25, 2026
04bd543
gh-146386: fix missing `va_end` in `_abiinfo_raise` in `modsupport.c`…
A0su Mar 25, 2026
0055140
gh-146358: Fix warnings.catch_warnings on Free Threading (#146374)
vstinner Mar 25, 2026
4447f23
Fix typo in 3.14 What's New tail call interpreter docs (GH-146425)
johnthagen Mar 25, 2026
9343518
gh-146244: Fix initconfig.c SET_ITEM macro leaks dict on expression f…
Wulian233 Mar 25, 2026
8e1469c
gh-138573: Filter out failing math tests on Solaris (#146402)
skirpichev Mar 25, 2026
495178a
gh-146453: fix `_PyType_LookupByVersion` for types with fixed pre-def…
kumaraditya303 Mar 26, 2026
f5364ae
gh-145866: Convert `_CALL_INTRINSIC_2` to leave its inputs on the sta…
KevinH15291 Mar 26, 2026
b5a27bd
gh-146410: Add --pythoninfo option to regrtest (#146413)
vstinner Mar 26, 2026
fc1f6b1
gh-GH-131798: optimize jit attribute loads on immutable types (#146449)
kumaraditya303 Mar 26, 2026
1038a3a
gh-146410: Run tests with with --pythoninfo on iOS (#146457)
vstinner Mar 26, 2026
8de70b3
gh-145633: Fix struct.pack('f') on s390x (#146422)
vstinner Mar 26, 2026
1516c26
gh-145866: Convert `DICT_UPDATE` to leave its inputs on the stack to …
Sacul0457 Mar 26, 2026
3a2b81e
gh-145616: Detect Android sysconfig ABI correctly on 32-bit ARM Andro…
robertkirkman Mar 26, 2026
e1d4823
gh-145650: Add `logging.{Formatter,Filter}.__repr__` (GH-145652)
JackDanger Mar 26, 2026
0e54305
gh-145876: Do not mask AttributeErrors raised during dictionary unpac…
serhiy-storchaka Mar 26, 2026
bfdaa3c
gh-131798: JIT: split call method and call builtin opcodes into small…
kumaraditya303 Mar 26, 2026
c68a194
gh-146151: memoryview supports 'F' and 'D' format types (complex) (#1…
skirpichev Mar 26, 2026
0e3b3b8
gh-146151: Add support for complex arrays in the array module (#146237)
skirpichev Mar 26, 2026
e44993a
gh-146318: Document that signal.SIGSTOP is Unix-only (#146319)
jonathandung Mar 26, 2026
5c0dcb3
gh-146059: Call fast_save_leave() in pickle save_frozenset() (#146173)
vstinner Mar 26, 2026
17070f4
gh-144837: Improve documentation for more collection methods (GH-144841)
serhiy-storchaka Mar 26, 2026
ca6dfa0
gh-146446: Miscellaneous improvements to iOS XCframework build script…
freakboy3742 Mar 26, 2026
c75d220
gh-146410: Add --pythoninfo to make testios (#146494)
vstinner Mar 26, 2026
5684b3a
gh-146498: Ensure binary content is correctly processed in multi-arch…
freakboy3742 Mar 27, 2026
36e4ffc
gh-146444: Move the Apple folder to the Platforms directory (#146497)
freakboy3742 Mar 27, 2026
0c7a75a
gh-146059: Cleanup pickle fast_save_enter() test (#146481)
vstinner Mar 27, 2026
256907d
gh-138580: Revert sys.float_info.iec_60559 boolean flag (#146501)
skirpichev Mar 27, 2026
d0061d5
gh-146440: Add array_hook parameter to JSON decoders (#146441)
jsbueno Mar 27, 2026
d4153a9
gh-146480: Override the exception in _PyErr_SetKeyError() (#146486)
vstinner Mar 27, 2026
2e64e36
GH-139922: update 3.15 whatsnew: Windows 64-bit binaries now use the …
chris-eibl Mar 27, 2026
6a94980
gh-142518: add thread safety docs on bytes C-API (#146415)
kumaraditya303 Mar 27, 2026
5466f57
gh-142518: add thread safety annotations for bytearray C-API (#146514)
kumaraditya303 Mar 27, 2026
0de4e08
gh-146250: Fix memory leak in re-initialization of `SyntaxError` (#14…
brijkapadia Mar 27, 2026
9214e3f
gh-123471: Make `itertools.zip_longest` safe in the FT build (#146033)
eendebakpt Mar 27, 2026
a209dd2
gh-85332: Support cross-compiling for GNU/Hurd (#146094)
thesamesam Mar 27, 2026
c8ee196
gh-146388: Add null check for `sym_new(ctx)` in `make_bottom` (GH-146…
A0su Mar 27, 2026
1417737
gh-146507: cache the buffer size for `SelectorTransport.get_write_buf…
moktamd Mar 27, 2026
a492d9f
gh-145866: Convert `LIST_EXTEND` to leave its inputs on the stack to …
NekoAsakura Mar 27, 2026
f89fafe
Mention _Float16 (type from Annex H of the C23) in the struct docs (#…
skirpichev Mar 27, 2026
6763d26
GH-126910: reserve FP on AArch64 when generating JIT stencils (GH-146…
diegorusso Mar 27, 2026
b60b926
GH-126910: avoid reading the FP for getting the SP (GH-146521)
diegorusso Mar 27, 2026
1384f02
gh-126910: Verify that JIT stencils preserve frame pointer (GH-146524)
Fidget-Spinner Mar 27, 2026
73cc1fd
gh-146310: Fix ensurepip to treat empty WHEEL_PKG_DIR as unset (#146357)
kimimgo Mar 27, 2026
69b08c3
gh-145057: Fix test names and comments to reflect `sys.lazy_modules` …
johnslavik Mar 27, 2026
a5b9d60
gh-145059: Record lazy modules without submodules in `sys.lazy_module…
johnslavik Mar 27, 2026
a933e9c
GH-145247: Use _PyTuple_FromPair[Steal] in Objects (#145884)
sergey-miryanov Mar 28, 2026
5992238
gh-146381: Constant-fold frozendict subscript lookups via REPLACE_OPC…
corona10 Mar 28, 2026
1efe441
gh-146004: propagate all -X options to multiprocessing child processe…
gpshead Mar 28, 2026
3ff5822
Docs: don't rely on implicit 'above' directions in socket docs (#146426)
nedbat Mar 28, 2026
578d726
gh-146544: Fix `asyncio.Queue` docstring ambiguity (#146545)
jonathandung Mar 28, 2026
087a5f6
`_pyrepl/pager.py`: call `less` with `--clear-screen` (#146382)
StanFromIreland Mar 28, 2026
5bf3a31
GH-146527: Add more data to GC statistics and add it to PyDebugOffset…
sergey-miryanov Mar 28, 2026
1fd66ea
gh-139003: Use frozenset for module level attributes in _pyrepl.utils…
eendebakpt Mar 28, 2026
1af025d
gh-146004: fix test_args_from_interpreter_flags on windows (#146580)
chris-eibl Mar 29, 2026
6932c3e
gh-145876: Do not mask KeyErrors raised during dictionary unpacking i…
serhiy-storchaka Mar 29, 2026
aa66807
gh-146090: fix memory management of internal `sqlite3` callback conte…
picnixz Mar 29, 2026
24db78c
gh-146080: fix a crash in SNI callbacks when the SSL object is gone (…
picnixz Mar 29, 2026
e39d84a
gh-146083: Upgrade bundled Expat to 2.7.5 (#146085)
StanFromIreland Mar 29, 2026
4d0e8ee
gh-146579: _zstd: Fix decompression options dict error message (#146577)
cuiweixie Mar 29, 2026
2cf6a68
gh-146556: Fix infinite loop in annotationlib.get_annotations() on ci…
raminfp Mar 30, 2026
7f0c4f6
gh-138577: Fix keyboard shortcuts in getpass with echo_char (#141597)
CuriousLearner Mar 30, 2026
382c043
gh-146444: Make Platforms/Apple/ compatible with Python 3.9 (#146624)
vstinner Mar 30, 2026
7b2495e
gh-138850: Add --disable-epoll to configure (GH-145768)
mtelka Mar 30, 2026
6420847
gh-146444: Don't package as part of iOS 'build hosts' target (#146628)
freakboy3742 Mar 30, 2026
6857de6
gh-146416: Emscripten: Improve standard stream handling in node_entry…
hoodmane Mar 30, 2026
f4d3c61
gh-138122: Add differential flame graph (#145785)
ivonastojanovic Mar 30, 2026
8e10bd7
gh-146587: fix type slot assignment incase of multiple slots for same…
kumaraditya303 Mar 30, 2026
adf2c47
gh-126835: Fix _PY_IS_SMALL_INT() macro (#146631)
vstinner Mar 30, 2026
76c554b
gh-139922: always run MSVC 64-bit tail-calling CI (GH-146570)
chris-eibl Mar 30, 2026
8e9d21c
gh-146558: JIT optimize dict access for objects with known hash (#146…
kumaraditya303 Mar 30, 2026
afd8113
gh-144270: Make SubElement parent and tag positional-only (GH-144845)
NekoAsakura Mar 30, 2026
a25e097
gh-139633: Run netrc file permission check only once per parse (GH-13…
cmaloney Mar 30, 2026
7278904
gh-145056: Fix merging of collections.OrderedDict and frozendict (GH-…
serhiy-storchaka Mar 30, 2026
ec2bc12
gh-145056: Add support for merging collections.UserDict and frozendic…
serhiy-storchaka Mar 30, 2026
e79fd60
gh-146238: Support half-floats in the array module (#146242)
skirpichev Mar 30, 2026
ca95e97
gh-146442: Fix various bugs in compiler pipeline (#146443)
A0su Mar 30, 2026
70d1b08
gh-146376: Reduce timeout in Emscripten GHA workflow (#146378)
hoodmane Mar 30, 2026
72d29ea
gh-146615: Fix crash in __get__() for METH_METHOD descriptors with in…
sunmy2019 Mar 31, 2026
1c396e1
gh-146615: Fix format specifiers in extension modules (GH-146617)
sunmy2019 Mar 31, 2026
b705553
gh-146615: Fix format specifiers in test cextensions (GH-146618)
sunmy2019 Mar 31, 2026
dcb260e
gh-146615: Fix format specifiers in Python/ directory (GH-146619)
sunmy2019 Mar 31, 2026
bbf7fb2
gh-146615: Fix format specifiers in Objects/ directory (GH-146620)
sunmy2019 Mar 31, 2026
b4fac15
gh-145458: use `self.skip_idle` consistently in the tachyon profiler …
KowalskiThomas Mar 31, 2026
67354b2
gh-145563: Add thread-safety annotation for PyCapsule C-API (#146612)
eendebakpt Mar 31, 2026
829e4d0
gh-141510: Support `frozendict` in `plistlib` (#145590)
hugovk Mar 31, 2026
db5936c
gh-143050: Correct PyLong_FromString() to use _PyLong_Negate() (#145901)
skirpichev Mar 31, 2026
362145c
gh-139109: Document the trace recording interpreter in internaldocs (…
Fidget-Spinner Mar 31, 2026
62a6e89
gh-147856: Allow the 'count' argument of `bytes.replace()` to be a ke…
StanFromIreland Mar 31, 2026
9e1f164
Docs: fill in descriptor C API docs (GH-146644)
Boyeep Mar 31, 2026
4497cf3
build(deps): bump qs from 6.14.0 to 6.15.0 in /Platforms/emscripten/b…
dependabot[bot] Apr 1, 2026
42825e6
gh-146431: Add the wrapcol and ignorechars parameters for more Base X…
serhiy-storchaka Apr 1, 2026
473d2a3
gh-147944: Increase range of bytes_per_sep (GH-147946)
serhiy-storchaka Apr 1, 2026
b38cfb7
gh-146479: Skip test_frame_pointer_unwind for gcc -O3 --enable-shared…
vstinner Apr 1, 2026
a504c0a
gh-146488: hash-pin all action references
woodruffw Apr 1, 2026
07d5d72
Increase dependabot interval to quarterly (#147959)
StanFromIreland Apr 1, 2026
08c5d3d
gh-145000: Run `check-html-ids.py` in CI (#145632)
StanFromIreland Apr 1, 2026
2452324
gh-146636: PEP 803: add Py_TARGET_ABI3T and .abi3t.so extension (GH-1…
encukou Apr 1, 2026
03f3b9a
gh-146907: Clarify ABI compatibility between debug and release builds…
konstin Apr 1, 2026
9e5b838
gh-146488: hash-pin check-html-ids action references (#147968)
hugovk Apr 1, 2026
255026d
GH-126910: Make `_Py_get_machine_stack_pointer` return the stack poin…
markshannon Apr 1, 2026
021ee7f
Docs: Use !r in __repr__ example (gh-146273)
petersuttondev Apr 1, 2026
4810bed
gh-147960: Fix memory leak in crossinterp _tuple_shared() on alloc fa…
hyongtao-code Apr 1, 2026
b456cb2
gh-143050: Add helper _PyLong_InitTag() (#147956)
skirpichev Apr 1, 2026
c32e264
gh-146656: properly raise `NotImplementedError` instead of `NotImplem…
Locked-chess-official Apr 1, 2026
7817651
gh-146444: Remove legacy iOS folder (#147993)
freakboy3742 Apr 2, 2026
97babb8
gh-143394: Skip pyrepl test_no_newline() basic REPL if readline is mi…
vstinner Apr 2, 2026
a86963b
gh-146636: Py_mod_abi mandatory for modules created from slots array …
encukou Apr 2, 2026
c1a4112
gh-147988: Initialize digits in long_alloc() in debug mode (#147989)
vstinner Apr 2, 2026
fc7a188
gh-146613: Fix re-entrant use-after-free in `itertools._grouper` (#14…
TheSkyC Apr 2, 2026
9b08f8c
GH-126910: Revert "Make `_Py_get_machine_stack_pointer` return the st…
encukou Apr 2, 2026
86b8617
Move root user checks to test.support (#146195)
kulikjak Apr 2, 2026
74a82a2
gh-139038: Update JIT results in preparation for 3.15a8 (GH-148018)
Fidget-Spinner Apr 2, 2026
0c10066
GH-145247: Use _PyTuple_FromPair in Modules (part 1) (#148000)
sergey-miryanov Apr 2, 2026
c1b20a6
GH-145247: Use _PyTuple_FromPair in Modules (part 2) (#148003)
sergey-miryanov Apr 2, 2026
617f4cc
gh-142533: Document CRLF injection vulnerabilities in http.server doc…
tadejmagajna Apr 2, 2026
9d087d6
GH-147985: Use lock-free lookup in `PySet_Contains` (#147986)
nascheme Apr 3, 2026
f3b74d6
gh-80642: timeit - make target time of autorange configurable (#140283)
miikka Apr 3, 2026
3908593
test_copy_dir_no_read_permission requires non root user (GH-148028)
kulikjak Apr 3, 2026
edab686
gh-148022: Add threat model to remote debugging docs (#148024)
pablogsal Apr 3, 2026
80ab6d9
gh-125895: Fix static asset location for `sphinx-notfound-page` (#147…
StanFromIreland Apr 3, 2026
48317fe
gh-146640: Optimize int operations by mutating uniquely-referenced op…
eendebakpt Apr 3, 2026
3681d47
gh-143930: Tweak the exception message and increase test coverage (GH…
ambv Apr 3, 2026
198b04b
gh-146073: Add fitness/exit quality mechanism for JIT trace frontend …
cocolato Apr 3, 2026
cb76ab3
gh-145098: Use `macos-15-intel` instead of unstable `macos-26-intel` …
hugovk Apr 3, 2026
80d0a85
gh-126676: Expand argparse docs for type=bool with warning and altern…
joshuaswanson Apr 3, 2026
dea4083
GH-146210: Fix building the jit stencils on Windows when the interpre…
chris-eibl Apr 3, 2026
848bbe9
gh-146541: Allow building the Android testbed for 32-bit targets (#14…
robertkirkman Apr 4, 2026
b8470de
gh-146450: Normalise feature set of Android build script with other p…
freakboy3742 Apr 4, 2026
7e275d4
gh-131798: JIT inline function addresses of builtin methods (#146906)
kumaraditya303 Apr 4, 2026
7bcc1c4
gh-131798: relax GUARD_CALLABLE checks for self type checks (#148069)
kumaraditya303 Apr 4, 2026
985216c
gh-148029: Fix error message for invalid number of Base32 characters …
serhiy-storchaka Apr 4, 2026
113038f
gh-148016: Improve "Leading padding not allowed" error in Base32 and …
serhiy-storchaka Apr 4, 2026
e7bf8ea
gh-131798: split recursion check to _CHECK_RECURSION_LIMIT and combin…
kumaraditya303 Apr 4, 2026
c50d6cd
gh-148078: Fix uses of sym_is_not_null in JIT optimizer (GH-148079)
Fidget-Spinner Apr 4, 2026
611d606
gh-148067: Fix typo in asyncio event loop docs: 'signals' -> 'signal'…
Herrtian Apr 4, 2026
328da67
gh-146073: Revert "gh-146073: Add fitness/exit quality mechanism for …
Fidget-Spinner Apr 4, 2026
fe9befc
gh-145883: Fix two heap-buffer-overflows in `_zoneinfo` (#145885)
StanFromIreland Apr 4, 2026
289f19a
gh-148083: Constant-fold _CONTAINS_OP_SET for frozenset (gh-148084)
corona10 Apr 4, 2026
c398490
gh-148074: Fix `typeobject.c` missing error return (#148075)
Wulian233 Apr 4, 2026
853dafe
gh-148083: Prevent constant folding when lhs is container types (gh-1…
corona10 Apr 4, 2026
fbdbea9
Regex HOWTO: invalid string literals result in `SyntaxWarning` (#148092)
hugovk Apr 4, 2026
b1d2d98
Docs: Fix a typo in the 'Non-ASCII characters in names' section (#148…
StanFromIreland Apr 4, 2026
21fb9dc
gh-146527: Heap-allocate gc_stats to avoid bloating PyInterpreterStat…
pablogsal Apr 4, 2026
75be902
Docs: Standardize documentation authors (#148102)
StanFromIreland Apr 4, 2026
8bf8bf9
gh-73613: Support Base32 and Base64 without padding (GH-147974)
serhiy-storchaka Apr 4, 2026
c43b490
gh-145000: Find correct merge base in `reusable-check-html-ids.yml` w…
StanFromIreland Apr 4, 2026
4ff8b07
gh-142927: Show self time in flamegraph tooltip (#147706)
ivonastojanovic Apr 4, 2026
1f36a51
Add `permissions: {}` to all reusable workflows (#148114)
ezio-melotti Apr 4, 2026
1c4408a
gh-130472: Integrate fancycompleter with the new repl, to get colored…
antocuni Apr 5, 2026
668c572
GH-139922: add interpreter types to InternalDocs/interpreter.md (GH-1…
chris-eibl Apr 5, 2026
77fc2f5
gh-144319: Fix huge page leak in datastack chunk allocator (#147963)
pablogsal Apr 5, 2026
a1cf443
gh-94632: document the subprocess need for extra_groups=() with user=…
gpshead Apr 5, 2026
d6e0445
Silence `unused-variable` warnings in `optimizer_cases.c.h` (#148127)
StanFromIreland Apr 5, 2026
c64baff
gh-69605: Add math.integer to PyREPL module completer hardcoded list …
loic-simon Apr 5, 2026
b07becb
gh-140870: PyREPL auto-complete module attributes in import statement…
loic-simon Apr 5, 2026
bce96a1
gh-145098: Use `macos-15-intel` instead of unstable `macos-26-intel` …
StanFromIreland Apr 5, 2026
d8bcff8
Merge branch 'main' into dump-traceback
alexmalyshev Apr 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1346,3 +1346,58 @@ Tracebacks

This function returns ``0`` on success, and returns ``-1`` with an
exception set on failure.

.. c:function:: void PyUnstable_DumpTraceback(int fd, PyThreadState *tstate)

Write a trace of the Python stack in *tstate* into the file *fd*. The format
looks like::

Traceback (most recent call first):
File "xxx", line xxx in <xxx>
File "xxx", line xxx in <xxx>
...
File "xxx", line xxx in <xxx>

This function is meant to debug situations such as segfaults, fatal errors,
and similar. The file and function names it outputs are encoded to ASCII with
backslashreplace and truncated to 500 characters. It writes only the first
100 frames; further frames are truncated with the line ``...``.

This function is safe to use from signal handlers.

The caller does not need to hold an :term:`attached thread state`, nor does
*tstate* need to be attached.

.. versionadded:: next

.. c:function:: const char* PyUnstable_DumpTracebackThreads(int fd, PyInterpreterState *interp, PyThreadState *current_tstate)

Write the traces of all Python threads in *interp* into the file *fd*.

If *interp* is ``NULL`` then this function will try to identify the current
interpreter using thread-specific storage. If it cannot, it will return an
error.

If *current_tstate* is not ``NULL`` then it will be used to identify what the
current thread is in the written output. If it is ``NULL`` then this function
will identify the current thread using thread-specific storage. It is not an
error if the function is unable to get the current Python thread state.

This function will return ``NULL`` on success, or an error message on error.

This function is meant to debug debug situations such as segfaults, fatal
errors, and similar. It calls :c:func:`PyUnstable_DumpTraceback` for each
thread. It only writes the tracebacks of the first 100 threads, further
output is truncated with the line ``...``.

This function is safe to use from signal handlers.

The caller does not need to hold an :term:`attached thread state`, nor does
*current_tstate* need to be attached.

.. warning::
On the :term:`free-threaded build`, this function is not thread-safe. If
another thread deletes its :term:`thread state` while this function is being
called, the process will likely crash.

.. versionadded:: next
5 changes: 5 additions & 0 deletions Doc/whatsnew/3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,11 @@ New features
Python 3.14.
(Contributed by Victor Stinner in :gh:`142417`.)

* Add :c:func:`PyUnstable_DumpTraceback` and
:c:func:`PyUnstable_DumpTracebackThreads` functions to safely output Python
stacktraces.
(Contributed by Alex Malyshev in :gh:`145559`.)

Changed C APIs
--------------

Expand Down
7 changes: 7 additions & 0 deletions Include/cpython/traceback.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ struct _traceback {
int tb_lasti;
int tb_lineno;
};

PyAPI_FUNC(void) PyUnstable_DumpTraceback(int fd, PyThreadState *tstate);

PyAPI_FUNC(const char*) PyUnstable_DumpTracebackThreads(
int fd,
PyInterpreterState *interp,
PyThreadState *current_tstate);
49 changes: 0 additions & 49 deletions Include/internal/pycore_traceback.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,55 +14,6 @@ PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int, int *, P
// Export for 'pyexact' shared extension
PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int);

/* Write the Python traceback into the file 'fd'. For example:

Traceback (most recent call first):
File "xxx", line xxx in <xxx>
File "xxx", line xxx in <xxx>
...
File "xxx", line xxx in <xxx>

This function is written for debug purpose only, to dump the traceback in
the worst case: after a segmentation fault, at fatal error, etc. That's why,
it is very limited. Strings are truncated to 100 characters and encoded to
ASCII with backslashreplace. It doesn't write the source code, only the
function name, filename and line number of each frame. Write only the first
100 frames: if the traceback is truncated, write the line " ...".

This function is signal safe. */

extern void _Py_DumpTraceback(
int fd,
PyThreadState *tstate);

/* Write the traceback of all threads into the file 'fd'. current_thread can be
NULL.

Return NULL on success, or an error message on error.

This function is written for debug purpose only. It calls
_Py_DumpTraceback() for each thread, and so has the same limitations. It
only write the traceback of the first 100 threads: write "..." if there are
more threads.

If current_tstate is NULL, the function tries to get the Python thread state
of the current thread. It is not an error if the function is unable to get
the current Python thread state.

If interp is NULL, the function tries to get the interpreter state from
the current Python thread state, or from
_PyGILState_GetInterpreterStateUnsafe() in last resort.

It is better to pass NULL to interp and current_tstate, the function tries
different options to retrieve this information.

This function is signal safe. */

extern const char* _Py_DumpTracebackThreads(
int fd,
PyInterpreterState *interp,
PyThreadState *current_tstate);

/* Write a Unicode object into the file descriptor fd. Encode the string to
ASCII using the backslashreplace error handler.

Expand Down
1 change: 0 additions & 1 deletion Include/traceback.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *);
PyAPI_DATA(PyTypeObject) PyTraceBack_Type;
#define PyTraceBack_Check(v) Py_IS_TYPE((v), &PyTraceBack_Type)


#ifndef Py_LIMITED_API
# define Py_CPYTHON_TRACEBACK_H
# include "cpython/traceback.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename ``_Py_DumpTraceback`` and ``_Py_DumpTracebackThreads`` to :c:func:`PyUnstable_DumpTraceback` and :c:func:`PyUnstable_DumpTracebackThreads`.
15 changes: 8 additions & 7 deletions Modules/faulthandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "pycore_runtime.h" // _Py_ID()
#include "pycore_signal.h" // Py_NSIG
#include "pycore_time.h" // _PyTime_FromSecondsObject()
#include "pycore_traceback.h" // _Py_DumpTracebackThreads
#include "pycore_traceback.h" // _Py_DumpStack()
#ifdef HAVE_UNISTD_H
# include <unistd.h> // _exit()
#endif
Expand Down Expand Up @@ -205,14 +205,15 @@ faulthandler_dump_traceback(int fd, int all_threads,
PyThreadState *tstate = PyGILState_GetThisThreadState();

if (all_threads == 1) {
(void)_Py_DumpTracebackThreads(fd, NULL, tstate);
(void)PyUnstable_DumpTracebackThreads(fd, NULL, tstate);
}
else {
if (all_threads == FT_IGNORE_ALL_THREADS) {
PUTS(fd, "<Cannot show all threads while the GIL is disabled>\n");
}
if (tstate != NULL)
_Py_DumpTraceback(fd, tstate);
if (tstate != NULL) {
PyUnstable_DumpTraceback(fd, tstate);
}
}

reentrant = 0;
Expand Down Expand Up @@ -273,7 +274,7 @@ faulthandler_dump_traceback_py_impl(PyObject *module, PyObject *file,
/* gh-128400: Accessing other thread states while they're running
* isn't safe if those threads are running. */
_PyEval_StopTheWorld(interp);
errmsg = _Py_DumpTracebackThreads(fd, NULL, tstate);
errmsg = PyUnstable_DumpTracebackThreads(fd, NULL, tstate);
_PyEval_StartTheWorld(interp);
if (errmsg != NULL) {
PyErr_SetString(PyExc_RuntimeError, errmsg);
Expand All @@ -282,7 +283,7 @@ faulthandler_dump_traceback_py_impl(PyObject *module, PyObject *file,
}
}
else {
_Py_DumpTraceback(fd, tstate);
PyUnstable_DumpTraceback(fd, tstate);
}
Py_XDECREF(file);

Expand Down Expand Up @@ -703,7 +704,7 @@ faulthandler_thread(void *unused)

(void)_Py_write_noraise(thread.fd, thread.header, (int)thread.header_len);

errmsg = _Py_DumpTracebackThreads(thread.fd, thread.interp, NULL);
errmsg = PyUnstable_DumpTracebackThreads(thread.fd, thread.interp, NULL);
ok = (errmsg == NULL);

if (thread.exit)
Expand Down
6 changes: 3 additions & 3 deletions Python/pylifecycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "pycore_setobject.h" // _PySet_NextEntry()
#include "pycore_stats.h" // _PyStats_InterpInit()
#include "pycore_sysmodule.h" // _PySys_ClearAttrString()
#include "pycore_traceback.h" // _Py_DumpTracebackThreads()
#include "pycore_traceback.h" // _Py_DumpTraceback_Init()
#include "pycore_typeobject.h" // _PyTypes_InitTypes()
#include "pycore_typevarobject.h" // _Py_clear_generic_types()
#include "pycore_unicodeobject.h" // _PyUnicode_InitTypes()
Expand Down Expand Up @@ -3208,9 +3208,9 @@ _Py_FatalError_DumpTracebacks(int fd, PyInterpreterState *interp,

/* display the current Python stack */
#ifndef Py_GIL_DISABLED
_Py_DumpTracebackThreads(fd, interp, tstate);
PyUnstable_DumpTracebackThreads(fd, interp, tstate);
#else
_Py_DumpTraceback(fd, tstate);
PyUnstable_DumpTraceback(fd, tstate);
#endif
}

Expand Down
8 changes: 4 additions & 4 deletions Python/traceback.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ dump_traceback(int fd, PyThreadState *tstate, int write_header)
The caller is responsible to call PyErr_CheckSignals() to call Python signal
handlers if signals were received. */
void
_Py_DumpTraceback(int fd, PyThreadState *tstate)
PyUnstable_DumpTraceback(int fd, PyThreadState *tstate)
{
dump_traceback(fd, tstate, 1);
}
Expand Down Expand Up @@ -1264,11 +1264,11 @@ write_thread_id(int fd, PyThreadState *tstate, int is_current)
The caller is responsible to call PyErr_CheckSignals() to call Python signal
handlers if signals were received. */
const char* _Py_NO_SANITIZE_THREAD
_Py_DumpTracebackThreads(int fd, PyInterpreterState *interp,
PyThreadState *current_tstate)
PyUnstable_DumpTracebackThreads(int fd, PyInterpreterState *interp,
PyThreadState *current_tstate)
{
if (current_tstate == NULL) {
/* _Py_DumpTracebackThreads() is called from signal handlers by
/* PyUnstable_DumpTracebackThreads() is called from signal handlers by
faulthandler.

SIGSEGV, SIGFPE, SIGABRT, SIGBUS and SIGILL are synchronous signals
Expand Down
2 changes: 1 addition & 1 deletion Tools/wasm/emscripten/node_entry.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ try {
// Show JavaScript exception and traceback
console.warn(e);
// Show Python exception and traceback
Module.__Py_DumpTraceback(2, Module._PyGILState_GetThisThreadState());
Module.PyUnstable_DumpTraceback(2, Module._PyGILState_GetThisThreadState());
process.exit(1);
}
2 changes: 1 addition & 1 deletion Tools/wasm/emscripten/web_example_pyrepl_jspi/src.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,6 @@ try {
// Show JavaScript exception and traceback
console.warn(e);
// Show Python exception and traceback
Module.__Py_DumpTraceback(2, Module._PyGILState_GetThisThreadState());
Module.PyUnstable_DumpTraceback(2, Module._PyGILState_GetThisThreadState());
process.exit(1);
}
2 changes: 1 addition & 1 deletion configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2357,7 +2357,7 @@ AS_CASE([$ac_sys_system],
dnl Include file system support
AS_VAR_APPEND([LINKFORSHARED], [" -sFORCE_FILESYSTEM -lidbfs.js -lnodefs.js -lproxyfs.js -lworkerfs.js"])
AS_VAR_APPEND([LINKFORSHARED], [" -sEXPORTED_RUNTIME_METHODS=FS,callMain,ENV,HEAPU32,TTY"])
AS_VAR_APPEND([LINKFORSHARED], [" -sEXPORTED_FUNCTIONS=_main,_Py_Version,__PyRuntime,_PyGILState_GetThisThreadState,__Py_DumpTraceback,__PyEM_EMSCRIPTEN_TRAMPOLINE_OFFSET"])
AS_VAR_APPEND([LINKFORSHARED], [" -sEXPORTED_FUNCTIONS=_main,_Py_Version,__PyRuntime,_PyGILState_GetThisThreadState,__PyEM_EMSCRIPTEN_TRAMPOLINE_OFFSET"])
AS_VAR_APPEND([LINKFORSHARED], [" -sSTACK_SIZE=5MB"])
dnl Avoid bugs in JS fallback string decoding path
AS_VAR_APPEND([LINKFORSHARED], [" -sTEXTDECODER=2"])
Expand Down
Loading