]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 months agogh-145036: Fix data race for list capacity in free-threading (#145365)
bkap123 [Tue, 10 Mar 2026 16:30:11 +0000 (12:30 -0400)] 
gh-145036: Fix data race for list capacity in free-threading (#145365)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 months agogh-145743: Fix inconsistency after calling Struct.__init__() with invalid format...
Serhiy Storchaka [Tue, 10 Mar 2026 16:29:23 +0000 (18:29 +0200)] 
gh-145743: Fix inconsistency after calling Struct.__init__() with invalid format (GH-145744)

Only set the format attribute after successful (re-)initialization.

2 months agogh-125053: Document that ob_mutex must only be used via critical section API (#144599)
Farhan Saif [Tue, 10 Mar 2026 16:23:39 +0000 (11:23 -0500)] 
gh-125053: Document that ob_mutex must only be used via critical section API (#144599)

Add a warning in the free-threading extensions howto explaining that
PyObject.ob_mutex is reserved for the critical section API and must not
be locked directly with PyMutex_Lock, as this can cause deadlocks.
Extension authors who need their own lock should add a separate PyMutex
field to their object struct.

Also add an ob_mutex member entry under PyObject in the C API reference
(Doc/c-api/structures.rst) with a cross-reference to the howto.

Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-85277: Fix building without `stropts.h` or empty `stropts.h` (#143521)
Alexander Shadchin [Tue, 10 Mar 2026 16:02:57 +0000 (19:02 +0300)] 
gh-85277: Fix building without `stropts.h` or empty `stropts.h` (#143521)

2 months agogh-145591: Move slicing note to __getitem__ (GH-145606)
Ali Towaiji [Tue, 10 Mar 2026 15:48:41 +0000 (11:48 -0400)] 
gh-145591: Move slicing note to __getitem__ (GH-145606)

2 months agogh-145697: Add `.sql` and `.sqlite3` recognition in `mimetypes` (GH-145698)
Charlie Lin [Tue, 10 Mar 2026 15:21:33 +0000 (11:21 -0400)] 
gh-145697: Add `.sql` and `.sqlite3` recognition in `mimetypes` (GH-145698)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Benedikt Johannes <benedikt.johannes.hofer@gmail.com>
2 months agoDocs: Improve the C API documentation involving threads (GH-145520)
Peter Bierma [Tue, 10 Mar 2026 14:57:13 +0000 (10:57 -0400)] 
Docs: Improve the C API documentation involving threads (GH-145520)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2 months agoMerge branch 'main' of https://github.com/python/cpython
Hugo van Kemenade [Tue, 10 Mar 2026 14:41:02 +0000 (16:41 +0200)] 
Merge branch 'main' of https://github.com/python/cpython

2 months agoPost 3.15.0a7
Hugo van Kemenade [Tue, 10 Mar 2026 14:40:10 +0000 (16:40 +0200)] 
Post 3.15.0a7

2 months agogh-106318: Add examples for str.isspace() docs (#145399)
Adorilson Bezerra [Tue, 10 Mar 2026 14:19:24 +0000 (14:19 +0000)] 
gh-106318: Add examples for str.isspace() docs (#145399)

2 months agogh-145035: Allows removing the _pyrepl module to completely disable the modern REPL...
Steve Dower [Tue, 10 Mar 2026 13:58:32 +0000 (13:58 +0000)] 
gh-145035: Allows removing the _pyrepl module to completely disable the modern REPL (GH-145159)

2 months agogh-145492: Fix defaultdict __repr__ infinite recursion (GH-145659)
Matt Van Horn [Tue, 10 Mar 2026 13:20:42 +0000 (06:20 -0700)] 
gh-145492: Fix defaultdict __repr__ infinite recursion (GH-145659)

Co-Authored-By: Thomas Kowalski <thom.kowa@gmail.com>
2 months agoPython 3.15.0a7 v3.15.0a7
Hugo van Kemenade [Tue, 10 Mar 2026 12:30:46 +0000 (14:30 +0200)] 
Python 3.15.0a7

2 months agogh-142651: use `NonCallableMock._lock` for thread safety of `call_count` (#142922)
Kumar Aditya [Tue, 10 Mar 2026 12:11:12 +0000 (17:41 +0530)] 
gh-142651: use `NonCallableMock._lock` for thread safety of `call_count` (#142922)

2 months agogh-142927: Detect system theme in flame graph like in heatmap (#144885)
Hugo van Kemenade [Tue, 10 Mar 2026 11:38:48 +0000 (13:38 +0200)] 
gh-142927: Detect system theme in flame graph like in heatmap (#144885)

2 months agogh-133879: Copyedit "What's new in Python 3.15" (#145737)
Hugo van Kemenade [Tue, 10 Mar 2026 11:11:43 +0000 (13:11 +0200)] 
gh-133879: Copyedit "What's new in Python 3.15" (#145737)

2 months agoGH-145247: Implement _PyTuple_FromPair() (#145325)
Sergey Miryanov [Tue, 10 Mar 2026 10:44:20 +0000 (15:44 +0500)] 
GH-145247: Implement _PyTuple_FromPair() (#145325)

Implement _PyTuple_FromPair() and _PyTuple_FromPairSteal().

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 months agogh-145376: Fix refleaks and double decref for code in Python/ (#145666)
Pieter Eendebak [Tue, 10 Mar 2026 09:46:13 +0000 (10:46 +0100)] 
gh-145376: Fix refleaks and double decref for code in Python/ (#145666)

2 months agogh-145607: Ensure BIG_DATA has two compressed blocks in test_bz2 (#145730)
Emma Smith [Tue, 10 Mar 2026 09:21:57 +0000 (02:21 -0700)] 
gh-145607: Ensure BIG_DATA has two compressed blocks in test_bz2 (#145730)

2 months agogh-103997: Remove incorrect statements about `-c` dedenting (gh-138624)
Stan Ulbrych [Tue, 10 Mar 2026 08:56:00 +0000 (08:56 +0000)] 
gh-103997: Remove incorrect statements about `-c` dedenting (gh-138624)

2 months agogh-145731: Fix negative timestamp during DST on Windows (GH-145728)
Hugo van Kemenade [Tue, 10 Mar 2026 08:45:07 +0000 (10:45 +0200)] 
gh-145731: Fix negative timestamp during DST on Windows (GH-145728)

2 months agogh-144681: Fix JIT trace builder assertion failure when conditional branch jump targe...
Hai Zhu [Tue, 10 Mar 2026 04:12:48 +0000 (12:12 +0800)] 
gh-144681: Fix JIT trace builder assertion failure when conditional branch jump target coincides with fallthrough target (GH-144742)

2 months agoVary compiler flags in `fuzz_pycompile` (#145236)
Stan Ulbrych [Mon, 9 Mar 2026 22:51:00 +0000 (22:51 +0000)] 
Vary compiler flags in `fuzz_pycompile` (#145236)

* Vary compiler flags in fuzz_pycompile

* Drop `PyCF_SOURCE_IS_UTF8`

2 months agogh-145685: Stop the world when updating MRO of existing types (gh-145707)
Sam Gross [Mon, 9 Mar 2026 22:41:07 +0000 (18:41 -0400)] 
gh-145685: Stop the world when updating MRO of existing types (gh-145707)

We already have a stop-the-world pause elsewhere in this code path
(type_set_bases) and this makes will make it easier to avoid contention
on the TYPE_LOCK when looking up names in the MRO hierarchy.

Also use deferred reference counting for non-immortal MROs.

2 months agogh-145701: Fix `__classdict__` & `__conditional_annotations__` in class-scope inlined...
Stan Ulbrych [Mon, 9 Mar 2026 19:56:41 +0000 (19:56 +0000)] 
gh-145701: Fix `__classdict__` & `__conditional_annotations__` in class-scope inlined comprehensions (GH-145702)

2 months agoRemove the `distutils-sig@python.org` email in 'Installing Python Modules' (#145613)
Stan Ulbrych [Mon, 9 Mar 2026 19:43:13 +0000 (19:43 +0000)] 
Remove the `distutils-sig@python.org` email in 'Installing Python Modules' (#145613)

2 months agoGH-145273: don't skip missing platstdlib warning if stdlib_zip is found (#145544)
Filipe Laíns [Mon, 9 Mar 2026 19:37:33 +0000 (19:37 +0000)] 
GH-145273: don't skip missing platstdlib warning if stdlib_zip is found (#145544)

2 months agoDocs: Update programming FAQ (#144573)
Hugo van Kemenade [Mon, 9 Mar 2026 18:23:11 +0000 (20:23 +0200)] 
Docs: Update programming FAQ (#144573)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@ulbrych.org>
2 months agogh-145278: Revert "freeze encodings (partially) and linecache (#145279)" (#145689)
Petr Viktorin [Mon, 9 Mar 2026 18:18:14 +0000 (19:18 +0100)] 
gh-145278: Revert "freeze encodings (partially) and linecache (#145279)" (#145689)

2 months agogh-143055: Fix crash in AST unparser when unparsing dict comprehension unpacking...
Stan Ulbrych [Mon, 9 Mar 2026 17:37:23 +0000 (17:37 +0000)] 
gh-143055: Fix crash in AST unparser when unparsing dict comprehension unpacking (#145556)

2 months agogh-145615: Fix mimalloc page leak in the free-threaded build (gh-145626)
Sam Gross [Mon, 9 Mar 2026 17:24:34 +0000 (13:24 -0400)] 
gh-145615: Fix mimalloc page leak in the free-threaded build (gh-145626)

Fix three issues that caused mimalloc pages to be leaked until the
owning thread exited:

1. In _PyMem_mi_page_maybe_free(), move pages out of the full queue
   when relying on QSBR to defer freeing the page. Pages in the full
   queue are never searched by mi_page_queue_find_free_ex(), so a page
   left there is unusable for allocations.

2. Move _PyMem_mi_page_clear_qsbr() from _mi_page_free_collect() to
   _mi_page_thread_free_collect() where it only fires when all blocks
   on the page are free (used == 0). The previous placement was too
   broad: it cleared QSBR state whenever local_free was non-NULL, but
   _mi_page_free_collect() is called from non-allocation paths (e.g.,
   page visiting in mi_heap_visit_blocks) where the page is not being
   reused.

3. In _PyMem_mi_page_maybe_free(), use the page's heap tld to find the
   correct thread state for QSBR list insertion instead of
   PyThreadState_GET(). During stop-the-world pauses, the function may
   process pages belonging to other threads, so the current thread
   state is not necessarily the owner of the page.

2 months agogh-141617: clarify `concurrent.futures.ThreadPoolExecutor` deadlock example (#141620)
Yashraj [Mon, 9 Mar 2026 16:30:00 +0000 (22:00 +0530)] 
gh-141617: clarify `concurrent.futures.ThreadPoolExecutor` deadlock example (#141620)

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 months agogh-139588: Docs: fix PDF build (#145480)
Maciej Olko [Mon, 9 Mar 2026 16:19:02 +0000 (12:19 -0400)] 
gh-139588: Docs: fix PDF build (#145480)

2 months agoGH-144688: Fix refleaks in JIT when optimization fails (GH-145420)
Mark Shannon [Mon, 9 Mar 2026 15:21:33 +0000 (15:21 +0000)] 
GH-144688: Fix refleaks in JIT when optimization fails (GH-145420)

2 months agogh-141510: Optimize frozendict(frozendict) (#145592)
Victor Stinner [Mon, 9 Mar 2026 14:47:02 +0000 (15:47 +0100)] 
gh-141510: Optimize frozendict(frozendict) (#145592)

Return the same object unmodified if it's exactly the frozendict
type.

Optimize also PyFrozenDict_New(frozendict).

2 months agogh-145541: Fix `InvalidStateError` in `BaseSubprocessTransport._call_connection_lost...
Daan De Meyer [Mon, 9 Mar 2026 14:07:23 +0000 (15:07 +0100)] 
gh-145541: Fix `InvalidStateError` in `BaseSubprocessTransport._call_connection_lost()` (#145554)

2 months agogh-78773: Improve ctypes dynamic library loading docs (GH-145313)
Petr Viktorin [Mon, 9 Mar 2026 14:02:06 +0000 (15:02 +0100)] 
gh-78773: Improve ctypes dynamic library loading docs  (GH-145313)

2 months agogh-145376: Fix _cursesmodule.c build on FreeBSD/macOS (#145669)
Victor Stinner [Mon, 9 Mar 2026 13:53:52 +0000 (14:53 +0100)] 
gh-145376: Fix _cursesmodule.c build on FreeBSD/macOS (#145669)

2 months agoDocument that PyType_GetModule returns a borrowed ref (GH-145612)
Petr Viktorin [Mon, 9 Mar 2026 13:32:28 +0000 (14:32 +0100)] 
Document that PyType_GetModule returns a borrowed ref (GH-145612)

2 months agoGH-145278: freeze encodings (partially) and linecache (#145279)
Filipe Laíns [Mon, 9 Mar 2026 13:28:00 +0000 (13:28 +0000)] 
GH-145278: freeze encodings (partially) and linecache (#145279)

2 months agogh-145376: Fix various reference leaks in Objects/ and Modules/ (#145385)
Pieter Eendebak [Mon, 9 Mar 2026 13:19:36 +0000 (14:19 +0100)] 
gh-145376: Fix various reference leaks in Objects/ and Modules/ (#145385)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 months agogh-145376: Fix various refleaks in Objects/ (#145609)
Pieter Eendebak [Mon, 9 Mar 2026 13:17:27 +0000 (14:17 +0100)] 
gh-145376: Fix various refleaks in Objects/ (#145609)

2 months agogh-145376: Fix reference leaks in _lprof.c (#145539)
Pieter Eendebak [Mon, 9 Mar 2026 12:50:45 +0000 (13:50 +0100)] 
gh-145376: Fix reference leaks in _lprof.c (#145539)

2 months agoFix intermittent `test_ci_fuzz_stdlib` failures (GH-145641)
Chris Eibl [Mon, 9 Mar 2026 09:23:34 +0000 (10:23 +0100)] 
Fix intermittent `test_ci_fuzz_stdlib` failures (GH-145641)

2 months agogh-145219: Add Emscripten cross-build and clean configurability (#145581)
Hood Chatham [Mon, 9 Mar 2026 02:25:21 +0000 (03:25 +0100)] 
gh-145219: Add Emscripten cross-build and clean configurability (#145581)

Modifies the Emscripten build script to allow for custom cross-build directory
names, and to only clean Emscripten-specific paths (optionally including the
build python).

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2 months agogh-145642: Docs: Avoid warning for invalid escape sequence in tutorial (#145643)
James [Sun, 8 Mar 2026 22:41:47 +0000 (18:41 -0400)] 
gh-145642: Docs: Avoid warning for invalid escape sequence in tutorial (#145643)

* Match tutorial output to real interpreter output

* Avoid invalid escape sequence in example

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
---------

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2 months agoFix bug notifier for issues with no body text (#145603)
Hugo van Kemenade [Sat, 7 Mar 2026 14:53:13 +0000 (16:53 +0200)] 
Fix bug notifier for issues with no body text (#145603)

2 months agogh-145623: Fix crashes on uninitialized struct.Struct objects (gh-145624)
Ramin Farajpour Cami [Sat, 7 Mar 2026 13:31:45 +0000 (17:01 +0330)] 
gh-145623: Fix crashes on uninitialized struct.Struct objects (gh-145624)

2 months agogh-145376: Fix refleak in `queuemodule.c` out-of-memory path (#145543)
Pieter Eendebak [Sat, 7 Mar 2026 09:05:08 +0000 (10:05 +0100)] 
gh-145376: Fix refleak in `queuemodule.c` out-of-memory path (#145543)

2 months agogh-116738: Make mmap.set_name thread-safe (#145555)
AN Long [Sat, 7 Mar 2026 08:14:44 +0000 (17:14 +0900)] 
gh-116738: Make mmap.set_name thread-safe (#145555)

* Add critical section around mmap.set_name to make it thread-safe

* Add news entry

* Apply suggestion from @aisk

2 months agogh-144175: Add PyArg_ParseArray() function (#144283)
Victor Stinner [Fri, 6 Mar 2026 21:57:44 +0000 (22:57 +0100)] 
gh-144175: Add PyArg_ParseArray() function (#144283)

Add PyArg_ParseArray() and PyArg_ParseArrayAndKeywords()
functions to parse arguments of functions using the METH_FASTCALL
calling convention.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 months agogh-145376: Fix crashes in `md5module.c` and `hmacmodule.c` (#145422)
Pieter Eendebak [Fri, 6 Mar 2026 20:00:06 +0000 (21:00 +0100)] 
gh-145376: Fix crashes in `md5module.c` and `hmacmodule.c` (#145422)

Fix a possible NULL pointer dereference in `md5module.c` and a double-free in `hmacmodule.c`.
Those crashes only occur in error paths taken when the interpreter fails to allocate memory.

2 months agogh-145566: Skip stop-the-world when reassigning `__class__` on newly created objects...
Sam Gross [Fri, 6 Mar 2026 17:01:06 +0000 (12:01 -0500)] 
gh-145566: Skip stop-the-world when reassigning `__class__` on newly created objects (gh-145567)

2 months agogh-69223: Document that add_argument() returns an Action object (#145538)
Andrew Barnes [Fri, 6 Mar 2026 16:10:12 +0000 (11:10 -0500)] 
gh-69223: Document that add_argument() returns an Action object (#145538)

2 months agogh-145548: Use VMADDR_CID_LOCAL in VSOCK socket tests (#145589)
Victor Stinner [Fri, 6 Mar 2026 15:51:36 +0000 (16:51 +0100)] 
gh-145548: Use VMADDR_CID_LOCAL in VSOCK socket tests (#145589)

Prefer VMADDR_CID_LOCAL instead of VMADDR_CID_ANY for bind() in the
server. Skip the test if bind() fails with EADDRNOTAVAIL.

Log vsock CID in test.pythoninfo.

2 months agogh-144370: Disallow usage of control characters in status in wsgiref.handlers for...
Benedikt Johannes [Fri, 6 Mar 2026 12:22:21 +0000 (13:22 +0100)] 
gh-144370: Disallow usage of control characters in status in wsgiref.handlers for security (#144371)

Disallow usage of control characters in status in wsgiref.handlers
to prevent HTTP header injections.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agoDocs: `import datetime as dt` in examples (#145315)
Hugo van Kemenade [Fri, 6 Mar 2026 11:18:11 +0000 (13:18 +0200)] 
Docs: `import datetime as dt` in examples (#145315)

2 months agogh-141510: Use frozendict in the stdlib (#144909)
Victor Stinner [Fri, 6 Mar 2026 09:25:09 +0000 (10:25 +0100)] 
gh-141510: Use frozendict in the stdlib (#144909)

Co-authored-by: Donghee Na <donghee.na@python.org>
2 months agogh-141510: Change marshal version to 6 (#145551)
Victor Stinner [Fri, 6 Mar 2026 09:23:11 +0000 (10:23 +0100)] 
gh-141510: Change marshal version to 6 (#145551)

Fix SliceTestCase: test also that version 4 fails with ValueError.

2 months agogh-145177: Support multiple Emscripten versions for Emscripten buildbot (#145180)
Hood Chatham [Fri, 6 Mar 2026 00:42:41 +0000 (01:42 +0100)] 
gh-145177: Support multiple Emscripten versions for Emscripten buildbot (#145180)

Adds an `--emsdk-cache` argument to the Emscripten build script and an
emscripten_version.txt file. If the `--emsdk-cache` argument is passed, the build script
will look in `emscripten_version.txt` to get the expected emsdk version is installed in
a folder called e.g., 4.0.12 in the directory indicated by the `--emsdk-cache` argument,
and run the build with that Emscripten tooling activated.

2 months agogh-145557: Check ctypes is available in test_external_inspection (#145558)
Alex Malyshev [Thu, 5 Mar 2026 19:03:30 +0000 (14:03 -0500)] 
gh-145557: Check ctypes is available in test_external_inspection (#145558)

Currently TestGetStackTrace.test_self_trace_after_ctypes_import() will fail if
the _ctypes extension is not built.  Make it match test_ctypes by skipping
the test in that case.

2 months agodoc: Clarify logger creation example in logging HOWTO (GH-145540)
Yash Kaushik [Thu, 5 Mar 2026 17:48:48 +0000 (23:18 +0530)] 
doc: Clarify logger creation example in logging HOWTO (GH-145540)

2 months agogh-141510: Complete What's New in Python 3.15 for frozendict (#145537)
Victor Stinner [Thu, 5 Mar 2026 16:44:58 +0000 (17:44 +0100)] 
gh-141510: Complete What's New in Python 3.15 for frozendict (#145537)

Mention updated stdlib modules and built-in functions.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2 months agogh-141510: No longer accept frozendict in PyDict_Copy() (#145542)
Victor Stinner [Thu, 5 Mar 2026 14:26:54 +0000 (15:26 +0100)] 
gh-141510: No longer accept frozendict in PyDict_Copy() (#145542)

Rename _PyDict_Copy() to anydict_copy().

Replace PyObject_IsInstance(op, &PyFrozenDict_Type) with
PyFrozenDict_Check().

2 months agogh-145417: Do not preserve SELinux context when copying venv scripts (#145454)
Shrey Naithani [Thu, 5 Mar 2026 14:19:49 +0000 (19:49 +0530)] 
gh-145417: Do not preserve SELinux context when copying venv scripts (#145454)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-141510: Fix frozendict.items() ^ frozendict.items() (#145535)
Victor Stinner [Thu, 5 Mar 2026 13:14:04 +0000 (14:14 +0100)] 
gh-141510: Fix frozendict.items() ^ frozendict.items() (#145535)

Add non-regression tests.

2 months agogh-140681: Freeze pre-commit hooks and update zizmor links (#140682)
Xianpeng Shen [Thu, 5 Mar 2026 12:23:06 +0000 (14:23 +0200)] 
gh-140681: Freeze pre-commit hooks and update zizmor links (#140682)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 months agogh-145056: Accept frozendict in xml.etree (#145508)
Victor Stinner [Thu, 5 Mar 2026 11:55:28 +0000 (12:55 +0100)] 
gh-145056: Accept frozendict in xml.etree (#145508)

Element and SubElement of xml.etree.ElementTree now also accept
frozendict for attrib.

Export _PyDict_CopyAsDict() function.

2 months agogh-145055: Accept frozendict for globals in exec() and eval() (#145072)
Victor Stinner [Thu, 5 Mar 2026 11:35:43 +0000 (12:35 +0100)] 
gh-145055: Accept frozendict for globals in exec() and eval() (#145072)

2 months agogh-141510: Use frozendict in the _opcode_metadata (#144910)
Victor Stinner [Thu, 5 Mar 2026 11:33:13 +0000 (12:33 +0100)] 
gh-141510: Use frozendict in the _opcode_metadata (#144910)

Enhance py_metadata_generator.py to skip duplicates.

Co-authored-by: Donghee Na <donghee.na@python.org>
2 months agogh-82626: Schedule removal of bool used as file descriptor (#145469)
Victor Stinner [Thu, 5 Mar 2026 11:32:32 +0000 (12:32 +0100)] 
gh-82626: Schedule removal of bool used as file descriptor (#145469)

2 months agogh-141510: Don't accept frozendict in PyDict_Watch() (#145529)
Victor Stinner [Thu, 5 Mar 2026 11:31:29 +0000 (12:31 +0100)] 
gh-141510: Don't accept frozendict in PyDict_Watch() (#145529)

Don't accept frozendict in PyDict_Watch() and PyDict_Unwatch().
A frozendict cannot be modified, so it's not useful to watch for
modifications.

2 months agogh-145335: Skip Emscripten for os.execve() test (#145528)
Hood Chatham [Thu, 5 Mar 2026 11:29:34 +0000 (12:29 +0100)] 
gh-145335: Skip Emscripten for os.execve() test (#145528)

Emscripten's os.execve() always fails with ENOEXEC.

Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-145376: Fix refleak and null pointer deref in unusual error path of datetime modul...
Pieter Eendebak [Thu, 5 Mar 2026 10:21:49 +0000 (11:21 +0100)] 
gh-145376: Fix refleak and null pointer deref in unusual error path of datetime module (GH-145476)

2 months agogh-145301: Fix double-free in hashlib and hmac module initialization (GH-145321)
krylosov-aa [Thu, 5 Mar 2026 03:48:25 +0000 (06:48 +0300)] 
gh-145301: Fix double-free in hashlib and hmac module initialization (GH-145321)

gh-145301: Fix double-free in hashlib and hmac initialization

2 months agogh-144991: Use runtime JIT threshold in _testinternalcapi (gh-145496)
Donghee Na [Thu, 5 Mar 2026 00:07:47 +0000 (09:07 +0900)] 
gh-144991: Use runtime JIT threshold in _testinternalcapi (gh-145496)

2 months agogh-141510: Add frozendict support to python-gdb.py (#145511)
Victor Stinner [Wed, 4 Mar 2026 23:57:54 +0000 (00:57 +0100)] 
gh-141510: Add frozendict support to python-gdb.py (#145511)

2 months agogh-145376: Fix reference leaks in deque (#145421)
Pieter Eendebak [Wed, 4 Mar 2026 22:45:43 +0000 (23:45 +0100)] 
gh-145376: Fix reference leaks in deque (#145421)

Fix a reference leak if newblock() fails in _collections.deque.

2 months agoUse bytecodealliance/setup-wasi-sdk-action to install the WASI SDK (#145445)
Brett Cannon [Wed, 4 Mar 2026 21:27:47 +0000 (13:27 -0800)] 
Use bytecodealliance/setup-wasi-sdk-action to install the WASI SDK (#145445)

2 months agoRefactor `Platforms/WASI/__main__.py` for lazy importing and future new subcommands...
Brett Cannon [Wed, 4 Mar 2026 21:27:23 +0000 (13:27 -0800)] 
Refactor `Platforms/WASI/__main__.py` for lazy importing and future new subcommands (#145404)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 months agoFix bugs in `compute-changes.py` logic for CIFuzz (#145232)
Stan Ulbrych [Wed, 4 Mar 2026 20:43:44 +0000 (20:43 +0000)] 
Fix bugs in `compute-changes.py` logic for CIFuzz (#145232)

2 months agogh-145506: Fixes CVE-2026-2297 by ensuring SourcelessFileLoader uses io.open_code...
Steve Dower [Wed, 4 Mar 2026 19:55:52 +0000 (19:55 +0000)] 
gh-145506: Fixes CVE-2026-2297 by ensuring SourcelessFileLoader uses io.open_code (GH-145507)

2 months agogh-141510: Optimize PyDict_Copy() for frozendict (#145509)
Victor Stinner [Wed, 4 Mar 2026 19:49:20 +0000 (20:49 +0100)] 
gh-141510: Optimize PyDict_Copy() for frozendict (#145509)

Implement fast-path for frozendict in PyDict_Copy().

2 months agogh-141510: Return frozendict unmodified in PyDict_Copy() (#145505)
Victor Stinner [Wed, 4 Mar 2026 19:11:00 +0000 (20:11 +0100)] 
gh-141510: Return frozendict unmodified in PyDict_Copy() (#145505)

Add also the internal _PyDict_CopyAsDict() function.

2 months agogh-145500: Delete _PyType_GetMRO (gh-145501)
Sam Gross [Wed, 4 Mar 2026 18:32:43 +0000 (13:32 -0500)] 
gh-145500: Delete _PyType_GetMRO (gh-145501)

2 months agogh-122941: Fix test_launcher sporadic failures via py.ini isolation (GH-145090)
Itamar Oren [Wed, 4 Mar 2026 18:06:49 +0000 (10:06 -0800)] 
gh-122941: Fix test_launcher sporadic failures via py.ini isolation (GH-145090)

Adds _PYLAUNCHER_INIDIR as a private variable since the launcher is deprecated and not getting new features.

2 months agogh-144741: Fix test_frame_pointer_unwind for libpython (#145499)
Victor Stinner [Wed, 4 Mar 2026 17:29:02 +0000 (18:29 +0100)] 
gh-144741: Fix test_frame_pointer_unwind for libpython (#145499)

Fix test_frame_pointer_unwind when Python is built with
--enable-shared. Classify also libpython frames as "python".

2 months agogh-145376: Fix refleak in unusual error path in BaseExceptionGroup_new (GH-145474)
Pieter Eendebak [Wed, 4 Mar 2026 13:34:24 +0000 (14:34 +0100)] 
gh-145376: Fix refleak in unusual error path in BaseExceptionGroup_new (GH-145474)

2 months agogh-145376: Avoid reference leaks in failure path of _functoolsmodule.c method partial...
Pieter Eendebak [Wed, 4 Mar 2026 13:32:14 +0000 (14:32 +0100)] 
gh-145376: Avoid reference leaks in failure path of _functoolsmodule.c method partial_new (GH-145423)

2 months agogh-145376: Fix refleak in error path of time_tzset (GH-145477)
Pieter Eendebak [Wed, 4 Mar 2026 13:21:10 +0000 (14:21 +0100)] 
gh-145376: Fix refleak in error path of time_tzset (GH-145477)

2 months agoGH-144739: Skip test_pyexpat.MemoryProtectionTest based on expat compile-time version...
Miro Hrončok [Wed, 4 Mar 2026 12:59:50 +0000 (13:59 +0100)] 
GH-144739: Skip test_pyexpat.MemoryProtectionTest based on expat compile-time version, not runtime (#144740)

2 months agogh-142417: Restore private _Py_InitializeMain() function (#145472)
Victor Stinner [Wed, 4 Mar 2026 10:00:08 +0000 (11:00 +0100)] 
gh-142417: Restore private _Py_InitializeMain() function (#145472)

This reverts commit 07c3518ffb27875b14a0f1637aa85f773ff2f9ff.

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2 months agoFix incorrect statement about argparse.ArgumentParser.add_argument() (#145479)
Justin Kunimune [Tue, 3 Mar 2026 21:41:26 +0000 (16:41 -0500)] 
Fix incorrect statement about argparse.ArgumentParser.add_argument() (#145479)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
2 months agoDocs: use a Sphinx extension to eliminate excessive links (#145130)
Ned Batchelder [Tue, 3 Mar 2026 20:48:43 +0000 (15:48 -0500)] 
Docs: use a Sphinx extension to eliminate excessive links (#145130)

2 months agogh-135883: Fix sqlite3 CLI history scrolling with colored prompts (#135884)
Tan Long [Tue, 3 Mar 2026 18:48:03 +0000 (02:48 +0800)] 
gh-135883: Fix sqlite3 CLI history scrolling with colored prompts (#135884)

2 months agogh-145452: Initialize `PyLazyImport_Type` during interpreter startup (#145453)
Bartosz Sławecki [Tue, 3 Mar 2026 16:14:12 +0000 (17:14 +0100)] 
gh-145452: Initialize `PyLazyImport_Type` during interpreter startup (#145453)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agoReference `memoryview.tolist` as a method (#145412)
Victorien [Tue, 3 Mar 2026 16:05:14 +0000 (16:05 +0000)] 
Reference `memoryview.tolist` as a method (#145412)

2 months agogh-145376: Fix various reference leaks (GH-145377)
Jelle Zijlstra [Tue, 3 Mar 2026 15:23:30 +0000 (07:23 -0800)] 
gh-145376: Fix various reference leaks (GH-145377)

2 months agoAdd myself to initialization and import machinery codeowners (#145473)
Filipe Laíns [Tue, 3 Mar 2026 14:35:48 +0000 (14:35 +0000)] 
Add myself to initialization and import machinery codeowners (#145473)

2 months agogh-144475: Fix reference management in partial_repr (GH-145362)
bkap123 [Tue, 3 Mar 2026 13:46:02 +0000 (08:46 -0500)] 
gh-144475: Fix reference management in partial_repr (GH-145362)