]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 weeks agogh-146151: Add support for complex arrays in the array module (#146237)
Sergey B Kirpichev [Thu, 26 Mar 2026 14:45:20 +0000 (17:45 +0300)] 
gh-146151: Add support for complex arrays in the array module (#146237)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agogh-146151: memoryview supports 'F' and 'D' format types (complex) (#146241)
Sergey B Kirpichev [Thu, 26 Mar 2026 14:26:34 +0000 (17:26 +0300)] 
gh-146151: memoryview supports 'F' and 'D' format types (complex) (#146241)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agogh-131798: JIT: split call method and call builtin opcodes into smaller uops (#146463)
Kumar Aditya [Thu, 26 Mar 2026 14:20:57 +0000 (19:50 +0530)] 
gh-131798: JIT: split call method and call builtin opcodes into smaller uops (#146463)

2 weeks agogh-145876: Do not mask AttributeErrors raised during dictionary unpacking (GH-145906)
Serhiy Storchaka [Thu, 26 Mar 2026 13:48:57 +0000 (15:48 +0200)] 
gh-145876: Do not mask AttributeErrors raised during dictionary unpacking (GH-145906)

AttributeErrors raised in keys() or __getitem__() during
dictionary unpacking ({**mymapping} or func(**mymapping)) are
no longer masked by TypeError.

2 weeks agogh-145650: Add `logging.{Formatter,Filter}.__repr__` (GH-145652)
Jack Danger [Thu, 26 Mar 2026 12:41:14 +0000 (05:41 -0700)] 
gh-145650: Add `logging.{Formatter,Filter}.__repr__` (GH-145652)

2 weeks agogh-145616: Detect Android sysconfig ABI correctly on 32-bit ARM Android on 64-bit...
Robert Kirkman [Thu, 26 Mar 2026 12:27:36 +0000 (07:27 -0500)] 
gh-145616: Detect Android sysconfig ABI correctly on 32-bit ARM Android on 64-bit ARM kernel (GH-145617)

When Python is running on 32-bit ARM Android on a 64-bit ARM kernel, `os.uname().machine` is `armv8l`. Such devices run the same userspace code as `armv7l` devices, so apply the same `armeabi_v7a` Android ABI to them, which works.

2 weeks agogh-145866: Convert `DICT_UPDATE` to leave its inputs on the stack to be cleaned up...
Sacul [Thu, 26 Mar 2026 11:38:44 +0000 (19:38 +0800)] 
gh-145866: Convert `DICT_UPDATE` to leave its inputs on the stack to be cleaned up by `_POP_TOP` (GH-146190)

2 weeks agogh-145633: Fix struct.pack('f') on s390x (#146422)
Victor Stinner [Thu, 26 Mar 2026 11:12:49 +0000 (12:12 +0100)] 
gh-145633: Fix struct.pack('f') on s390x (#146422)

Use PyFloat_Pack4() to raise OverflowError.
Add more tests on packing/unpacking floats.

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2 weeks agogh-146410: Run tests with with --pythoninfo on iOS (#146457)
Victor Stinner [Thu, 26 Mar 2026 10:44:51 +0000 (11:44 +0100)] 
gh-146410: Run tests with with --pythoninfo on iOS (#146457)

Add --pythoninfo option to dump build information.

2 weeks agogh-GH-131798: optimize jit attribute loads on immutable types (#146449)
Kumar Aditya [Thu, 26 Mar 2026 10:12:10 +0000 (15:42 +0530)] 
gh-GH-131798: optimize jit attribute loads on immutable types (#146449)

2 weeks agogh-146410: Add --pythoninfo option to regrtest (#146413)
Victor Stinner [Thu, 26 Mar 2026 09:56:38 +0000 (10:56 +0100)] 
gh-146410: Add --pythoninfo option to regrtest (#146413)

* Android now runs tests with --pythoninfo to dump build information.
* Add display_title() function.

2 weeks agogh-145866: Convert `_CALL_INTRINSIC_2` to leave its inputs on the stack to be cleaned...
Kevin Huai [Thu, 26 Mar 2026 09:41:07 +0000 (03:41 -0600)] 
gh-145866: Convert `_CALL_INTRINSIC_2` to leave its inputs on the stack to be cleaned up by `_POP_TOP`  (GH-146262)

2 weeks agogh-146453: fix `_PyType_LookupByVersion` for types with fixed pre-defined version...
Kumar Aditya [Thu, 26 Mar 2026 09:06:55 +0000 (14:36 +0530)] 
gh-146453: fix `_PyType_LookupByVersion` for types with fixed pre-defined version tags (#146454)

2 weeks agogh-138573: Filter out failing math tests on Solaris (#146402)
Sergey B Kirpichev [Wed, 25 Mar 2026 23:11:20 +0000 (02:11 +0300)] 
gh-138573: Filter out failing math tests on Solaris (#146402)

2 weeks agogh-146244: Fix initconfig.c SET_ITEM macro leaks dict on expression failure (GH-146246)
Wulian233 [Wed, 25 Mar 2026 19:09:56 +0000 (03:09 +0800)] 
gh-146244: Fix initconfig.c SET_ITEM macro leaks dict on expression failure (GH-146246)

2 weeks agoFix typo in 3.14 What's New tail call interpreter docs (GH-146425)
johnthagen [Wed, 25 Mar 2026 18:53:25 +0000 (14:53 -0400)] 
Fix typo in 3.14 What's New tail call interpreter docs (GH-146425)

2 weeks agogh-146358: Fix warnings.catch_warnings on Free Threading (#146374)
Victor Stinner [Wed, 25 Mar 2026 13:34:50 +0000 (14:34 +0100)] 
gh-146358: Fix warnings.catch_warnings on Free Threading (#146374)

catch_warnings now also overrides warnings.showwarning() on Free
Threading to support custom warnings.showwarning().

2 weeks agogh-146386: fix missing `va_end` in `_abiinfo_raise` in `modsupport.c` (#146387)
Brandon [Wed, 25 Mar 2026 12:54:08 +0000 (07:54 -0500)] 
gh-146386: fix missing `va_end` in `_abiinfo_raise` in `modsupport.c` (#146387)

2 weeks agogh-145098: Run Apple Silicon macOS CI on macos-26 (Tahoe) (#145099)
clintonsteiner [Wed, 25 Mar 2026 11:15:46 +0000 (06:15 -0500)] 
gh-145098: Run Apple Silicon macOS CI on macos-26 (Tahoe) (#145099)

2 weeks agogh-146369: Ensure `PYTHON_LAZY_IMPORTS=none` overrides `__lazy_modules__` (#146371)
Hugo van Kemenade [Wed, 25 Mar 2026 11:08:45 +0000 (13:08 +0200)] 
gh-146369: Ensure `PYTHON_LAZY_IMPORTS=none` overrides `__lazy_modules__` (#146371)

2 weeks agogh-146352: In Emscripten pyrepl test, pick port dynamically (#146375)
Hood Chatham [Wed, 25 Mar 2026 10:38:11 +0000 (11:38 +0100)] 
gh-146352: In Emscripten pyrepl test, pick port dynamically (#146375)

Dynamically allocates the port for the pyrepl browser test, so that multiple
tests can run at the same time. Also allows the pyrepl test to honor the
CROSS_BUILD_DIR environment variable.

2 weeks agogh-146207: Add support for OpenSSL 4.0.0 alpha1 (#146217)
Victor Stinner [Wed, 25 Mar 2026 06:44:47 +0000 (07:44 +0100)] 
gh-146207: Add support for OpenSSL 4.0.0 alpha1 (#146217)

OpenSSL 4.0.0 alpha1 removed these functions:

* SSLv3_method()
* TLSv1_method()
* TLSv1_1_method()
* TLSv1_2_method()

Other changes:

* Update test_openssl_version().
* Update multissltests.py for OpenSSL 4.
* Add const qualifier to fix compiler warnings.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 weeks agogh-146355: Fix `main_module` ref leak in `_PyRun_SimpleStringFlagsWithName` (#146356)
Brandon [Wed, 25 Mar 2026 06:36:59 +0000 (01:36 -0500)] 
gh-146355: Fix `main_module` ref leak in `_PyRun_SimpleStringFlagsWithName` (#146356)

2 weeks agogh-145633: Remove remnants of the "unknown_format" (floats) in the struct module...
Sergey B Kirpichev [Wed, 25 Mar 2026 06:23:44 +0000 (09:23 +0300)] 
gh-145633: Remove remnants of the "unknown_format" (floats) in the struct module (#146189)

2 weeks agogh-145633: Drop runtime checks for floatting-point formats in the array module (...
Sergey B Kirpichev [Wed, 25 Mar 2026 06:06:38 +0000 (09:06 +0300)] 
gh-145633: Drop runtime checks for floatting-point formats in the array module (#146162)

2 weeks agogh-146041: Avoid lock in sys.intern() for already interned strings (gh-146072)
Sam Gross [Tue, 24 Mar 2026 18:29:37 +0000 (14:29 -0400)] 
gh-146041: Avoid lock in sys.intern() for already interned strings (gh-146072)

Fix free-threading scaling bottleneck in sys.intern and `PyObject_SetAttr` by
avoiding the interpreter-wide lock when the string is already interned and
immortalized.

2 weeks agoGH-126910: Allow most native profilers and debuggers to unwind through JIT frames...
Brandt Bucher [Tue, 24 Mar 2026 18:09:35 +0000 (11:09 -0700)] 
GH-126910: Allow most native profilers and debuggers to unwind through JIT frames (GH-143548)

2 weeks agogh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770)
Karolina Surma [Tue, 24 Mar 2026 17:47:55 +0000 (18:47 +0100)] 
gh-128341: Use _Py_ABI_SLOT in stdlib modules (#145770)

Rename from _Py_INTERNAL_ABI_SLOT to _Py_ABI_SLOT
and define the macro using _PyABIInfo_DEFAULT.

Use the ABI slot in stdlib extension modules to enable running
a check of ABI version compatibility.

_tkinter, _tracemalloc and readline don't use the slots, hence they need
explicit handling.

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agogh-144984: Skip test under tracerefs (GH-146218)
Petr Viktorin [Tue, 24 Mar 2026 16:34:12 +0000 (17:34 +0100)] 
gh-144984: Skip test under tracerefs (GH-146218)

2 weeks agogh-146306: JIT: Optimize float operations by mutating uniquely-referenced operands...
Pieter Eendebak [Tue, 24 Mar 2026 13:16:02 +0000 (14:16 +0100)] 
gh-146306: JIT: Optimize float operations by mutating uniquely-referenced operands in place (GH-146307)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 weeks agogh-138580: Add sys.float_info.iec_60559 boolean flag (#138811)
Sergey B Kirpichev [Tue, 24 Mar 2026 11:36:15 +0000 (14:36 +0300)] 
gh-138580: Add sys.float_info.iec_60559 boolean flag (#138811)

This value indicating support the IEC 60559 floating-point standard (the
Annex F of C99).  If enabled, the float type characteristics matches the
IEC 60559 double format and exceptional cases for the math's functions
follow to the section F.10 of the C99 standard.

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2 weeks agogh-145866: Convert `DICT_MERGE` to leave its inputs on the stack to be cleaned up...
Neko Asakura [Tue, 24 Mar 2026 10:31:41 +0000 (06:31 -0400)] 
gh-145866: Convert `DICT_MERGE` to leave its inputs on the stack to be cleaned up by `_POP_TOP` (GH-146329)

2 weeks agogh-133879: Copyedit "What's new in Python 3.15" (#146345)
Hugo van Kemenade [Tue, 24 Mar 2026 09:01:26 +0000 (11:01 +0200)] 
gh-133879: Copyedit "What's new in Python 3.15" (#146345)

2 weeks agoRemove inactive CODEOWNERS (#145930)
Stan Ulbrych [Tue, 24 Mar 2026 01:09:49 +0000 (01:09 +0000)] 
Remove inactive CODEOWNERS (#145930)

2 weeks agogh-140196: Added constructor behavior changes in ast.rst for python 3.13 (GH-140243)
Parman Mohammadalizadeh [Tue, 24 Mar 2026 00:51:31 +0000 (00:51 +0000)] 
gh-140196: Added constructor behavior changes in ast.rst for python 3.13 (GH-140243)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2 weeks agogh-146202: Create tmp_dir in regrtest worker (#146347)
Victor Stinner [Mon, 23 Mar 2026 23:47:47 +0000 (00:47 +0100)] 
gh-146202: Create tmp_dir in regrtest worker (#146347)

Create tmp_dir in libregrtest.worker since the directory can be
different than the --tempdir directory.

2 weeks agogh-144319: obtain SeLockMemoryPrivilege on Windows (#144928)
Chris Eibl [Mon, 23 Mar 2026 23:00:26 +0000 (00:00 +0100)] 
gh-144319: obtain SeLockMemoryPrivilege on Windows (#144928)

2 weeks agogh-146199: Fix error handling in `code_richcompare` when `PyObject_RichCompareBool...
Brij Kapadia [Mon, 23 Mar 2026 22:41:53 +0000 (18:41 -0400)] 
gh-146199: Fix error handling in `code_richcompare` when `PyObject_RichCompareBool` fails (#146200)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agogh-146197: Include a bit more information in sys._emscripten_info.runtime (#146346)
Hood Chatham [Mon, 23 Mar 2026 21:57:23 +0000 (22:57 +0100)] 
gh-146197: Include a bit more information in sys._emscripten_info.runtime (#146346)

2 weeks agogh-135871: Reload lock internal state while spinning in `PyMutex_LockTimed` (gh-146064)
Daniele Parmeggiani [Mon, 23 Mar 2026 20:55:06 +0000 (21:55 +0100)] 
gh-135871: Reload lock internal state while spinning in `PyMutex_LockTimed` (gh-146064)

Add atomic loads in the slow path of PyMutex to increase the number
of lock acquisitions per second that threads can make on a shared mutex.

2 weeks agogh-145719: Add `.efi` file detection in `mimetypes` (#145720)
Charlie Lin [Mon, 23 Mar 2026 20:16:41 +0000 (16:16 -0400)] 
gh-145719: Add `.efi` file detection in `mimetypes` (#145720)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks agogh-146197: Run -m test.pythoninfo on the Emscripten CI (#146332)
Victor Stinner [Mon, 23 Mar 2026 17:23:25 +0000 (18:23 +0100)] 
gh-146197: Run -m test.pythoninfo on the Emscripten CI (#146332)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks agogh-146325: Use `test.support.requires_fork` in test_fastpath_cache_cleared_in_forked_...
Hood Chatham [Mon, 23 Mar 2026 14:56:11 +0000 (15:56 +0100)] 
gh-146325: Use `test.support.requires_fork` in test_fastpath_cache_cleared_in_forked_child (#146330)

2 weeks agogh-146197: Add Emscripten to CI (#146198)
Hood Chatham [Mon, 23 Mar 2026 14:34:53 +0000 (15:34 +0100)] 
gh-146197: Add Emscripten to CI (#146198)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks agogh-143387: Raise an exception instead of returning None when metadata file is missing...
Jason R. Coombs [Mon, 23 Mar 2026 13:12:36 +0000 (09:12 -0400)] 
gh-143387: Raise an exception instead of returning None when metadata file is missing. (#146234)

2 weeks agogh-108907: ctypes: Document _type_ codes (GH-145837)
Petr Viktorin [Mon, 23 Mar 2026 12:41:38 +0000 (13:41 +0100)] 
gh-108907: ctypes: Document _type_ codes (GH-145837)

Add `_SimpleCData._type_` docs.

Add type codes to the summary table.

Cross-link `struct`, `array`, and `ctypes`; throw in `numpy` too.
(Anyone wanting to add a code should be aware of those.)

Add `py_object`, and `VARIANT_BOOL` for completeness.

2 weeks agogh-146175: Soft-deprecate outdated macros; convert internal usage (GH-146178)
Petr Viktorin [Mon, 23 Mar 2026 11:42:09 +0000 (12:42 +0100)] 
gh-146175: Soft-deprecate outdated macros; convert internal usage (GH-146178)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agogh-146056: Rework ref counting in treebuilder_handle_end() (#146167)
Victor Stinner [Mon, 23 Mar 2026 11:17:54 +0000 (12:17 +0100)] 
gh-146056: Rework ref counting in treebuilder_handle_end() (#146167)

Use more regular code to handle reference counting in
treebuilder_handle_end().

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks agoAdd a warning about untrusted input to `configparser` docs (#146276)
Stan Ulbrych [Sun, 22 Mar 2026 23:58:31 +0000 (23:58 +0000)] 
Add a warning about untrusted input to `configparser` docs (#146276)

2 weeks agogh-145264: Do not ignore excess Base64 data after the first padded quad (GH-145267)
Serhiy Storchaka [Sun, 22 Mar 2026 21:12:58 +0000 (23:12 +0200)] 
gh-145264: Do not ignore excess Base64 data after the first padded quad (GH-145267)

Base64 decoder (see binascii.a2b_base64(), base64.b64decode(), etc)
no longer ignores excess data after the first padded quad in non-strict
(default) mode.  Instead, in conformance with RFC 4648, it ignores the
pad character, "=", if it is present before the end of the encoded data.

2 weeks agogh-146308: Fix error handling issues in _remote_debugging module (#146309)
Pablo Galindo Salgado [Sun, 22 Mar 2026 21:12:02 +0000 (21:12 +0000)] 
gh-146308: Fix error handling issues in _remote_debugging module (#146309)

2 weeks agogh-146192: Add base32 support to binascii (GH-146193)
kangtastic [Sun, 22 Mar 2026 21:10:28 +0000 (14:10 -0700)] 
gh-146192: Add base32 support to binascii (GH-146193)

Add base32 encoder and decoder functions implemented in
C to the binascii module and use them to greatly improve the
performance and reduce the memory usage of the existing
base32 codec functions in the base64 module.

2 weeks agogh-135953: Properly obtain main thread identifier in Gecko Collector (#146045)
flow [Sun, 22 Mar 2026 18:53:00 +0000 (15:53 -0300)] 
gh-135953: Properly obtain main thread identifier in Gecko Collector (#146045)

2 weeks agogh-143414: Implement unique reference tracking for JIT, optimize unpacking of such...
reiden [Sun, 22 Mar 2026 16:57:23 +0000 (00:57 +0800)] 
gh-143414: Implement unique reference tracking for JIT, optimize unpacking of such tuples (GH-144300)

Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2 weeks agogh-146261: Fix bug in `_Py_uop_sym_set_func_version` (GH-146291)
Sacul [Sun, 22 Mar 2026 16:11:37 +0000 (00:11 +0800)] 
gh-146261: Fix bug in `_Py_uop_sym_set_func_version` (GH-146291)

2 weeks agogh-145144: Add more tests for UserList, UserDict, etc (GH-145145)
Serhiy Storchaka [Sun, 22 Mar 2026 14:22:25 +0000 (16:22 +0200)] 
gh-145144: Add more tests for UserList, UserDict, etc (GH-145145)

2 weeks agogh-143959: Fix test_datetime if _datetime is unavailable (GH-145248)
Serhiy Storchaka [Sun, 22 Mar 2026 14:15:35 +0000 (16:15 +0200)] 
gh-143959: Fix test_datetime if _datetime is unavailable (GH-145248)

2 weeks agogh-146245: Fix reference and buffer leaks via audit hook in socket module (GH-146248)
AN Long [Sun, 22 Mar 2026 11:29:34 +0000 (19:29 +0800)] 
gh-146245: Fix reference and buffer leaks via audit hook in socket module (GH-146248)

2 weeks agogh-140049: Colorize exception notes in `traceback.py` (#140051)
Stan Ulbrych [Sun, 22 Mar 2026 08:54:43 +0000 (08:54 +0000)] 
gh-140049: Colorize exception notes in `traceback.py` (#140051)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks agoUpdate docs for gh-146056 (GH-146213)
Serhiy Storchaka [Sun, 22 Mar 2026 07:29:04 +0000 (09:29 +0200)] 
Update docs for gh-146056 (GH-146213)

2 weeks agoDocs: replace all `datetime` imports with `import datetime as dt` (#145640)
Hugo van Kemenade [Sat, 21 Mar 2026 16:02:06 +0000 (18:02 +0200)] 
Docs: replace all `datetime` imports with `import datetime as dt` (#145640)

2 weeks agogh-146153: Use `frozendict` in pure python fallback for `curses.has_key` (#146154)
Jonathan Dung [Sat, 21 Mar 2026 13:06:07 +0000 (21:06 +0800)] 
gh-146153: Use `frozendict` in pure python fallback for `curses.has_key` (#146154)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 weeks agogh-138234: clarify returncode behavior for subprocesses created with `shell=True...
andreuu-tsai [Sat, 21 Mar 2026 12:32:28 +0000 (20:32 +0800)] 
gh-138234: clarify returncode behavior for subprocesses created with `shell=True` (#138536)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks agogh-140947: fix contextvars handling for server tasks in asyncio (#141158)
Kumar Aditya [Sat, 21 Mar 2026 12:14:08 +0000 (17:44 +0530)] 
gh-140947: fix contextvars handling for server tasks in asyncio  (#141158)

2 weeks agoGH-100108: Add async generators best practices section (#141885)
Sergey Miryanov [Sat, 21 Mar 2026 11:59:15 +0000 (16:59 +0500)] 
GH-100108: Add async generators best practices section (#141885)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks agoGH-145667: Merge `GET_ITER` and `GET_YIELD_FROM_ITER` (GH-146120)
Mark Shannon [Sat, 21 Mar 2026 10:48:13 +0000 (10:48 +0000)] 
GH-145667: Merge `GET_ITER` and `GET_YIELD_FROM_ITER` (GH-146120)

* Merge GET_ITER and GET_YIELD_FROM_ITER. Modify SEND to make it a bit more like FOR_ITER

2 weeks agogh-146228: Better fork support in cached FastPath (#146231)
Jason R. Coombs [Fri, 20 Mar 2026 20:10:50 +0000 (16:10 -0400)] 
gh-146228: Better fork support in cached FastPath (#146231)

* Apply changes from importlib_metadata 8.9.0
* Suppress deprecation warning in fork.

2 weeks agogh-146227: Fix wrong type in _Py_atomic_load_uint16 in pyatomic_std.h (gh-146229)
Sam Gross [Fri, 20 Mar 2026 19:38:35 +0000 (15:38 -0400)] 
gh-146227: Fix wrong type in _Py_atomic_load_uint16 in pyatomic_std.h (gh-146229)

Also fix a few related issues in the pyatomic headers:

* Fix _Py_atomic_store_uint_release in pyatomic_msc.h to use __stlr32
  on ARM64 instead of a plain volatile store (which is only relaxed on
  ARM64).

* Add missing _Py_atomic_store_uint_release to pyatomic_gcc.h.

* Fix pseudo-code comment for _Py_atomic_store_ptr_release in
  pyatomic.h.

2 weeks agogh-145980: Fix copy/paste mistake in binascii.c (#146230)
Victor Stinner [Fri, 20 Mar 2026 18:12:10 +0000 (19:12 +0100)] 
gh-145980: Fix copy/paste mistake in binascii.c (#146230)

2 weeks agogh-146092: Raise MemoryError on allocation failure in _zoneinfo (#146165)
Victor Stinner [Fri, 20 Mar 2026 16:17:22 +0000 (17:17 +0100)] 
gh-146092: Raise MemoryError on allocation failure in _zoneinfo (#146165)

2 weeks agogh-91279: Note `SOURCE_DATE_EPOCH` support in `ZipFile.writestr()` doc (#139396)
Wulian233 [Fri, 20 Mar 2026 16:14:25 +0000 (00:14 +0800)] 
gh-91279: Note `SOURCE_DATE_EPOCH` support in `ZipFile.writestr()` doc (#139396)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agogh-146196: Fix Undefined Behavior in _PyUnicodeWriter_WriteASCIIString() (#146201)
Shamil [Fri, 20 Mar 2026 15:58:41 +0000 (18:58 +0300)] 
gh-146196: Fix Undefined Behavior in _PyUnicodeWriter_WriteASCIIString() (#146201)

Avoid calling memcpy(data + writer->pos, NULL, 0)
which has an undefined behavior.

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agogh-143930: Reject leading dashes in webbrowser URLs
Seth Michael Larson [Fri, 20 Mar 2026 14:47:13 +0000 (09:47 -0500)] 
gh-143930: Reject leading dashes in webbrowser URLs

2 weeks agogh-145916: Soft-deprecate ctypes.util.find_library (GH-145919)
Petr Viktorin [Fri, 20 Mar 2026 14:00:10 +0000 (15:00 +0100)] 
gh-145916: Soft-deprecate ctypes.util.find_library (GH-145919)

* Put the "Loading shared libraries" section first
  * Adjust formatting at the end of the section
* In "Finding shared libraries", add more text about what's going on
* Move the stub function doc for find_library into "Finding shared libraries"
  * Also move the sister function, find_msvcrt. That's on the chopping block,
    but not removed now.

2 weeks agogh-146205: Check the errno with != 0 in close impls in select module (#146206)
AN Long [Fri, 20 Mar 2026 13:44:01 +0000 (21:44 +0800)] 
gh-146205: Check the errno with != 0 in close impls in select module (#146206)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 weeks agogh-146171: Fix nested AttributeError suggestions (#146188)
Pablo Galindo Salgado [Fri, 20 Mar 2026 12:47:59 +0000 (12:47 +0000)] 
gh-146171: Fix nested AttributeError suggestions (#146188)

2 weeks agogh-146099: Optimize _GUARD_CODE_VERSION+IP via function version symbols (GH-146101)
Ken Jin [Fri, 20 Mar 2026 12:26:41 +0000 (20:26 +0800)] 
gh-146099: Optimize _GUARD_CODE_VERSION+IP via function version symbols (GH-146101)

2 weeks agogh-145980: Add support for alternative alphabets in the binascii module (GH-145981)
Serhiy Storchaka [Fri, 20 Mar 2026 11:07:00 +0000 (13:07 +0200)] 
gh-145980: Add support for alternative alphabets in the binascii module (GH-145981)

* Add the alphabet parameter in functions b2a_base64(), a2b_base64(),
  b2a_base85(), and a2b_base85().
* And a number of "*_ALPHABET" constants.
* Remove b2a_z85() and a2b_z85().

3 weeks agogh-145754: Update signature retrieval in unittest.mock to use forwardref annotation...
Matthias Schoettle [Fri, 20 Mar 2026 02:39:41 +0000 (22:39 -0400)] 
gh-145754: Update signature retrieval in unittest.mock to use forwardref annotation format (#145756)

3 weeks agogh-145177: Add emscripten run --test, uses test args from config.toml (#146160)
Hood Chatham [Thu, 19 Mar 2026 22:14:13 +0000 (23:14 +0100)] 
gh-145177: Add emscripten run --test, uses test args from config.toml (#146160)

This allows us to change the test arguments from the python repo rather
than having to change buildmaster-config.

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
3 weeks agogh-131798: JIT: optimize _LOAD_COMMON_CONSTANT (GH-146104)
Mingzhu Yan [Thu, 19 Mar 2026 21:55:22 +0000 (05:55 +0800)] 
gh-131798: JIT: optimize _LOAD_COMMON_CONSTANT (GH-146104)

3 weeks agogh-145177: Add make-dependencies command to emscripten build script (#146158)
Hood Chatham [Thu, 19 Mar 2026 21:40:01 +0000 (22:40 +0100)] 
gh-145177: Add make-dependencies command to emscripten build script (#146158)

Adds a standalone target for building all dependencies so that the buildbot
script is independent of a specific dependency list.

3 weeks agoImprove tests for the PyUnicodeWriter C API (GH-146157)
Serhiy Storchaka [Thu, 19 Mar 2026 17:15:30 +0000 (19:15 +0200)] 
Improve tests for the PyUnicodeWriter C API (GH-146157)

Add tests for corner cases: NULL pointers and out of range values.

3 weeks agogh-145866 : Update JIT contributor list (GH-146170)
Sacul [Thu, 19 Mar 2026 13:40:09 +0000 (21:40 +0800)] 
gh-145866 : Update JIT contributor list (GH-146170)

3 weeks agogh-145633: Refine notes on non-IEEE platforms (#145845)
Sergey B Kirpichev [Thu, 19 Mar 2026 11:42:25 +0000 (14:42 +0300)] 
gh-145633: Refine notes on non-IEEE platforms (#145845)

* We don't specify what happens on non-IEEE platforms.
* Use rather PY_LITTLE_ENDIAN to get native endianness.
* Mention that unpack functions don't fail in CPython.
* Mention that PyFloat_Pack8 doesn't fail in CPython.

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks agoGH-146096: Fix segfault in BaseExceptionGroup repr (#146141)
Sergey Miryanov [Thu, 19 Mar 2026 11:25:15 +0000 (16:25 +0500)] 
GH-146096: Fix segfault in BaseExceptionGroup repr (#146141)

3 weeks agogh-137696: Rename 'fort' parameter to 'order' in PyBuffer_* functions (#137866)
Carlos Sousa [Thu, 19 Mar 2026 11:24:27 +0000 (08:24 -0300)] 
gh-137696: Rename 'fort' parameter to 'order' in PyBuffer_* functions (#137866)

3 weeks agogh-145866: Convert `SET_UPDATE` to leave its inputs on the stack to be cleaned up...
Sacul [Thu, 19 Mar 2026 11:17:58 +0000 (19:17 +0800)] 
gh-145866: Convert `SET_UPDATE` to leave its inputs on the stack to be cleaned up by `_POP_TOP` (GH-145979)

3 weeks agogh-145394: Remove duplicated `isearch_add_character` in `_pyrepl/historical_reader...
Tan Long [Thu, 19 Mar 2026 11:08:01 +0000 (19:08 +0800)] 
gh-145394: Remove duplicated `isearch_add_character` in `_pyrepl/historical_reader.py` (#145396)

3 weeks agogh-145254: Fix formatting of thread safety annotations (#146111)
Lysandros Nikolaou [Thu, 19 Mar 2026 11:01:24 +0000 (12:01 +0100)] 
gh-145254: Fix formatting of thread safety annotations (#146111)

- Add leading space so that the spacing between the previous annotation
  and the thread safety annotation looks correct.
- Remove trailing period from the link to the thread safety level.

3 weeks agogh-146091: Fix NULL check in termios.tcsetwinsize (#146147)
Okiemute Enato [Thu, 19 Mar 2026 10:50:18 +0000 (03:50 -0700)] 
gh-146091: Fix NULL check in termios.tcsetwinsize (#146147)

3 weeks agogh-145177: Put node version into emscripten/config.toml. (#146156)
Hood Chatham [Thu, 19 Mar 2026 09:38:22 +0000 (10:38 +0100)] 
gh-145177: Put node version into emscripten/config.toml. (#146156)

Configure node version as part of the emscripten build script, and install
that node version if it isn't available.

3 weeks agogh-146143: Fix the PyUnicodeWriter_WriteUCS4() signature (GH-146144)
Serhiy Storchaka [Thu, 19 Mar 2026 08:23:01 +0000 (10:23 +0200)] 
gh-146143: Fix the PyUnicodeWriter_WriteUCS4() signature (GH-146144)

It now accepts a pointer to constant buffer of Py_UCS4.

3 weeks agogh-146056: Fix list.__repr__() for lists containing NULLs (GH-146129)
Serhiy Storchaka [Thu, 19 Mar 2026 07:59:48 +0000 (09:59 +0200)] 
gh-146056: Fix list.__repr__() for lists containing NULLs (GH-146129)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks agogh-145805: Add `python Platforms/emscripten run` subcommand (#146051)
Hood Chatham [Thu, 19 Mar 2026 01:06:17 +0000 (02:06 +0100)] 
gh-145805: Add `python Platforms/emscripten run` subcommand (#146051)

Provides a `run` command in the Emscripten build tooling, and adds
environment variable configuration for EMSDK_CACHE, CROSS_BUILD_DIR
and QUIET.

3 weeks agogh-145410: Add _sysconfig.get_platform() function (#146145)
Victor Stinner [Wed, 18 Mar 2026 23:28:21 +0000 (00:28 +0100)] 
gh-145410: Add _sysconfig.get_platform() function (#146145)

On Windows, sysconfig.get_platform() now gets the platform from the
_sysconfig module instead of parsing sys.version string.

3 weeks agogh-141510: Document isinstance change for frozendict in What's New (#146107)
Victor Stinner [Wed, 18 Mar 2026 22:09:18 +0000 (23:09 +0100)] 
gh-141510: Document isinstance change for frozendict in What's New (#146107)

3 weeks agogh-146121: `pkgutil.get_data()` reject invalid resource arguments (#146122)
Stan Ulbrych [Wed, 18 Mar 2026 17:31:01 +0000 (17:31 +0000)] 
gh-146121: `pkgutil.get_data()` reject invalid resource arguments (#146122)

3 weeks agogh-146092: Handle _PyFrame_GetFrameObject() failures properly (#146124)
Victor Stinner [Wed, 18 Mar 2026 17:27:52 +0000 (18:27 +0100)] 
gh-146092: Handle _PyFrame_GetFrameObject() failures properly (#146124)

* Fix _PyFrame_GetLocals() and _PyFrame_GetLocals() error handling.
* _PyEval_ExceptionGroupMatch() now fails on _PyFrame_GetLocals()
  error.

3 weeks agogh-146093: Fix csv _set_str(): check if PyUnicode_DecodeASCII() failed (#146113)
Victor Stinner [Wed, 18 Mar 2026 17:20:35 +0000 (18:20 +0100)] 
gh-146093: Fix csv _set_str(): check if PyUnicode_DecodeASCII() failed (#146113)

The function can fail on a memory allocation failure.

Bug reported by devdanzin.