]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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.

3 weeks agogh-144888: JIT executor bloom filter wide-type optimization and function Inlining...
Hai Zhu [Wed, 18 Mar 2026 16:58:14 +0000 (00:58 +0800)] 
gh-144888:  JIT executor bloom filter wide-type optimization and function Inlining (GH-146114)

3 weeks agodocs: fix f-string in ExceptionGroup example (#146108)
Bartosz Grabowski [Wed, 18 Mar 2026 16:49:15 +0000 (17:49 +0100)] 
docs: fix f-string in ExceptionGroup example (#146108)

3 weeks agogh-142518: Annotate PyList_* C APIs for thread safety (#146109)
Lysandros Nikolaou [Wed, 18 Mar 2026 16:42:20 +0000 (17:42 +0100)] 
gh-142518: Annotate PyList_* C APIs for thread safety (#146109)

3 weeks agogh-146092: Fix error handling in _BINARY_OP_ADD_UNICODE opcode (#146117)
Victor Stinner [Wed, 18 Mar 2026 16:23:05 +0000 (17:23 +0100)] 
gh-146092: Fix error handling in _BINARY_OP_ADD_UNICODE opcode (#146117)

Fix also error handling in _BINARY_OP_ADD_FLOAT,
_BINARY_OP_SUBTRACT_FLOAT and _BINARY_OP_MULTIPLY_FLOAT opcodes.
PyStackRef_FromPyObjectSteal() must not be called with a NULL
pointer.

3 weeks agogh-66419: Make optional arguments with nargs=REMAINDER consume all arguments (GH...
Serhiy Storchaka [Wed, 18 Mar 2026 15:04:11 +0000 (17:04 +0200)] 
gh-66419: Make optional arguments with nargs=REMAINDER consume all arguments (GH-124509)

It no longer stops at the first '--'.

3 weeks agogh-142518: Add thread safety notes for the buffer protocol (#145911)
Lysandros Nikolaou [Wed, 18 Mar 2026 13:18:28 +0000 (14:18 +0100)] 
gh-142518: Add thread safety notes for the buffer protocol (#145911)

3 weeks agogh-146076: Fix crash when a `ZoneInfo` subclass is missing a `_weak_cache` (#146082)
Stan Ulbrych [Wed, 18 Mar 2026 12:58:08 +0000 (12:58 +0000)] 
gh-146076: Fix crash when a `ZoneInfo` subclass is missing a `_weak_cache` (#146082)

3 weeks agoGH-60729: Add IEEE format wave audio support (GH-145931)
Michiel W. Beijen [Wed, 18 Mar 2026 12:46:26 +0000 (13:46 +0100)] 
GH-60729: Add IEEE format wave audio support (GH-145931)

(this re-applies reverted commit 61f2a1a5993967ed4b97ba93a4477c37fe68cf59,
with a test fix)

Co-authored-by: Lionel Koenig <lionelk@google.com>
3 weeks agogh-146075: Prevent crash in `functools.partial()` from malformed `str` subclass ...
bkap123 [Wed, 18 Mar 2026 12:46:01 +0000 (08:46 -0400)] 
gh-146075: Prevent crash in `functools.partial()` from malformed `str` subclass (GH-146078)

In `partial_vectorcall`, an error returned by `PyDict_Contains` was
considered to be a truthy value. Now, the error is handled
appropriately.

3 weeks agoFix entry in `fuzz_pycompile.dict` (GH-146069)
Stan Ulbrych [Wed, 18 Mar 2026 12:43:55 +0000 (12:43 +0000)] 
Fix entry in `fuzz_pycompile.dict` (GH-146069)

3 weeks agogh-145779: Improve classmethod/staticmethod scaling in free-threaded build (#145826)
Sam Gross [Tue, 17 Mar 2026 18:24:44 +0000 (14:24 -0400)] 
gh-145779: Improve classmethod/staticmethod scaling in free-threaded build (#145826)

Add special cases for classmethod and staticmethod descriptors in
_PyObject_GetMethodStackRef() to avoid calling tp_descr_get, which
avoids reference count contention on the bound method and underlying
callable. This improves scaling when calling classmethods and
staticmethods from multiple threads.

Also refactor method_vectorcall in classobject.c into a new _PyObject_VectorcallPrepend() helper so that it can be used by
PyObject_VectorcallMethod as well.

3 weeks agogh-146058: Fix _GUARD_CODE_VERSION_* (GH-146060)
Ken Jin [Tue, 17 Mar 2026 17:19:44 +0000 (01:19 +0800)] 
gh-146058: Fix _GUARD_CODE_VERSION_* (GH-146060)

3 weeks agogh-144975: Fix wave.Wave_write.setframerate() validation order (GH-144976)
Michiel W. Beijen [Tue, 17 Mar 2026 17:01:18 +0000 (18:01 +0100)] 
gh-144975: Fix wave.Wave_write.setframerate() validation order (GH-144976)

Validate the frame rate after rounding to an integer, not before.
This prevents values like 0.5 from passing validation (0.5 > 0)
but then rounding to 0, which would cause a confusing delayed error
"sampling rate not specified" when writing frames.

With this fix, setframerate(0.5) immediately raises "bad frame rate",
providing clear feedback at the point of the error.

3 weeks agogh-145966: Fix _csv DIALECT_GETATTR macro silently masking non-AttributeError excepti...
Ramin Farajpour Cami [Tue, 17 Mar 2026 15:08:53 +0000 (18:38 +0330)] 
gh-145966: Fix _csv DIALECT_GETATTR macro silently masking non-AttributeError exceptions (GH-145974)

The DIALECT_GETATTR macro in dialect_new() unconditionally called
PyErr_Clear() when PyObject_GetAttrString() failed, which suppressed
all exceptions including MemoryError, KeyboardInterrupt, and
RuntimeError. Now only AttributeError is cleared; other exceptions
propagate via the existing error handling path.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
3 weeks agogh-131798: Optimize `_ITER_CHECK_RANGE` and `_ITER_CHECK_LIST` in the JIT (GH-144583)
Sacul [Tue, 17 Mar 2026 14:07:17 +0000 (22:07 +0800)] 
gh-131798: Optimize `_ITER_CHECK_RANGE` and `_ITER_CHECK_LIST` in the JIT (GH-144583)

3 weeks agogh-146054: Limit the growth of `encodings.search_function` cache (GH-146055)
Stan Ulbrych [Tue, 17 Mar 2026 14:02:59 +0000 (14:02 +0000)] 
gh-146054: Limit the growth of `encodings.search_function` cache (GH-146055)

3 weeks agogh-144545: Improve handling of default values in Argument Clinic (GH-146016)
Serhiy Storchaka [Tue, 17 Mar 2026 10:16:35 +0000 (12:16 +0200)] 
gh-144545: Improve handling of default values in Argument Clinic (GH-146016)

* Add the c_init_default attribute which is used to initialize the C variable
  if the default is not explicitly provided.
* Add the c_default_init() method which is used to derive c_default from
  default if c_default is not explicitly provided.
* Explicit c_default and py_default are now almost always have precedence
  over the generated value.
* Add support for bytes literals as default values.
* Improve support for str literals as default values (support non-ASCII
  and non-printable characters and special characters like backslash or quotes).
* Fix support for str and bytes literals containing trigraphs, "/*" and "*/".
* Improve support for default values in converters "char" and "int(accept={str})".
* Converter "int(accept={str})" now requires 1-character string instead of
  integer as default value.
* Add support for non-None default values in converter "Py_buffer": NULL,
  str and bytes literals.
* Improve error handling for invalid default values.
* Rename Null to NullType for consistency.

3 weeks agoDocs: a brief note in the sets tutorial about order (#145984)
Ned Batchelder [Tue, 17 Mar 2026 09:03:11 +0000 (05:03 -0400)] 
Docs: a brief note in the sets tutorial about order (#145984)

Docs: a brief note in the sets tut about order

3 weeks agogh-145176 Move Emscripten files into Platforms/emscripten (#145806)
Hood Chatham [Tue, 17 Mar 2026 01:39:45 +0000 (02:39 +0100)] 
gh-145176 Move Emscripten files into Platforms/emscripten (#145806)

Moves Emscripten build files into Platforms/emscripten.

3 weeks agogh-142927: Move hotspots up flamegraph sidebar (#145428)
Hugo van Kemenade [Mon, 16 Mar 2026 23:01:41 +0000 (00:01 +0100)] 
gh-142927: Move hotspots up flamegraph sidebar (#145428)

3 weeks agoDocs: remove unmatched parenthesis for `asyncio.TaskGroup` note (#146035)
trag1c [Mon, 16 Mar 2026 19:55:29 +0000 (20:55 +0100)] 
Docs: remove unmatched parenthesis for `asyncio.TaskGroup` note (#146035)

3 weeks agogh-145870: Fix Format.SOURCE reference in get_annotations docstring (#145889)
wavebyrd [Mon, 16 Mar 2026 19:25:31 +0000 (15:25 -0400)] 
gh-145870: Fix Format.SOURCE reference in get_annotations docstring (#145889)

The get_annotations() docstring incorrectly referred to the SOURCE
format, which was renamed to STRING during PEP 749 development.

Co-authored-by: Carson Jones <carson@Carsons-MacBook-Pro.local>
3 weeks agobuild(deps): bump hypothesis from 6.135.26 to 6.151.9 in /Tools (#145948)
dependabot[bot] [Mon, 16 Mar 2026 18:07:07 +0000 (19:07 +0100)] 
build(deps): bump hypothesis from 6.135.26 to 6.151.9 in /Tools (#145948)

Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.135.26 to 6.151.9.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.135.26...hypothesis-python-6.151.9)

---
updated-dependencies:
- dependency-name: hypothesis
  dependency-version: 6.151.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 weeks agogh-127958: Trace from RESUME in the JIT (GH-145905)
Ken Jin [Mon, 16 Mar 2026 16:18:59 +0000 (00:18 +0800)] 
gh-127958: Trace from RESUME in the JIT (GH-145905)

3 weeks ago gh-144888: Replace bloom filter linked lists with continuous arrays to optimize...
Hai Zhu [Mon, 16 Mar 2026 15:58:18 +0000 (23:58 +0800)] 
 gh-144888: Replace bloom filter linked lists with continuous arrays to optimize executor invalidating performance (GH-145873)

3 weeks agogh-135329: Remove flaky test_repl_eio test (gh-145932)
Sam Gross [Mon, 16 Mar 2026 15:08:07 +0000 (11:08 -0400)] 
gh-135329: Remove flaky test_repl_eio test (gh-145932)

The test doesn't actually test any pyrepl code (it runs Python with -S)
and has a race condition that causes intermittent timeouts on CI.

3 weeks agogh-146018: Disable over-aggressive optimization for _GUARD_CODE_VERSION (GH-145923)
Ken Jin [Mon, 16 Mar 2026 13:52:56 +0000 (21:52 +0800)] 
gh-146018: Disable over-aggressive optimization for _GUARD_CODE_VERSION (GH-145923)

3 weeks agoGH-145247: Use _PyTuple_FromPair in exceptions.c (GH-145910)
Sergey Miryanov [Mon, 16 Mar 2026 13:50:26 +0000 (18:50 +0500)] 
GH-145247: Use _PyTuple_FromPair in exceptions.c (GH-145910)

3 weeks agogh-145599, CVE 2026-3644: Reject control characters in `http.cookies.Morsel.update...
Stan Ulbrych [Mon, 16 Mar 2026 13:43:43 +0000 (13:43 +0000)] 
gh-145599, CVE 2026-3644: Reject control characters in `http.cookies.Morsel.update()` (#145600)

Reject control characters in `http.cookies.Morsel.update()` and `http.cookies.BaseCookie.js_output`.

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <victor.stinner@gmail.com>
3 weeks agogh-141510: Avoid critical section on frozendict copy (#145920)
Victor Stinner [Mon, 16 Mar 2026 13:19:00 +0000 (14:19 +0100)] 
gh-141510: Avoid critical section on frozendict copy (#145920)

3 weeks agogh-144984: Fix crash in Expat's `ExternalEntityParserCreate` error paths (#144992)
Ramin Farajpour Cami [Mon, 16 Mar 2026 12:30:13 +0000 (16:00 +0330)] 
gh-144984: Fix crash in Expat's `ExternalEntityParserCreate` error paths (#144992)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
3 weeks agogh-145866: Convert `CALL_INTRINSIC_1` to leave its inputs on the stack to be cleaned...
Sacul [Mon, 16 Mar 2026 11:58:12 +0000 (19:58 +0800)] 
gh-145866: Convert `CALL_INTRINSIC_1` to leave its inputs on the stack to be cleaned up by `_POP_TOP`. (GH-145964)

3 weeks agogh-145649: Fix man page text wrapping for -X option (#145656)
Matt Van Horn [Mon, 16 Mar 2026 10:55:00 +0000 (03:55 -0700)] 
gh-145649: Fix man page text wrapping for -X option (#145656)

Replace hardcoded space indentation with proper troff macros
(.TP, .RS/.RE, .IP) for -X sub-options so text wraps correctly
at any terminal width.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
3 weeks agogh-139038: Link to Savannah's webpage for JIT results (#146013)
Ken Jin [Mon, 16 Mar 2026 10:10:34 +0000 (18:10 +0800)] 
gh-139038: Link to Savannah's webpage for JIT results (#146013)

3 weeks agogh-123471: make concurrent iteration over itertools.accumulate thread-safe (#144486)
Pieter Eendebak [Mon, 16 Mar 2026 08:53:37 +0000 (09:53 +0100)] 
gh-123471: make concurrent iteration over itertools.accumulate thread-safe (#144486)

3 weeks agogh-129849: Add tests for `Py_tp_bases` (#143208)
AN Long [Mon, 16 Mar 2026 08:29:55 +0000 (17:29 +0900)] 
gh-129849: Add tests for `Py_tp_bases` (#143208)

3 weeks agoDocs: fix a form error and a grammatical error in float.rst (#140989)
RayXu [Mon, 16 Mar 2026 08:21:49 +0000 (16:21 +0800)] 
Docs: fix a form error and a grammatical error in float.rst (#140989)

3 weeks agogh-140814: Fix freeze_support() setting start method as side effect (GH-144608)
Gregory P. Smith [Mon, 16 Mar 2026 05:50:19 +0000 (22:50 -0700)] 
gh-140814: Fix freeze_support() setting start method as side effect (GH-144608)

freeze_support() called get_start_method() without allow_none=True,
which locked in the default start method context. This caused a
subsequent set_start_method() call to raise "context has already been
set". Use allow_none=True and accept None as a matching value, since
spawn.freeze_support() independently detects spawned child processes.

Test that freeze_support() does not lock in the default start method,
which would prevent a subsequent set_start_method() call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
3 weeks agoExpand `fuzz_pycompile.dict` for new syntax
Stan Ulbrych [Sun, 15 Mar 2026 23:54:20 +0000 (23:54 +0000)] 
Expand `fuzz_pycompile.dict` for new syntax

3 weeks agogh-145990: sort `--help-env` sections by environment variable name (GH-145997)
Gregory P. Smith [Sun, 15 Mar 2026 22:22:57 +0000 (15:22 -0700)] 
gh-145990: sort `--help-env` sections by environment variable name (GH-145997)

* sort --help-env alphabetically by name.
* add a sorting regression test in test_help_env.

3 weeks agogh-145990: Sort `python --help-xoptions` by option name (GH-145991)
Gregory P. Smith [Sun, 15 Mar 2026 22:02:14 +0000 (15:02 -0700)] 
gh-145990: Sort `python --help-xoptions` by option name (GH-145991)

* Sort --help-xoptions alphabetically by name.
* add a sorting regression test in test_help_xoptions

3 weeks agogh-145998: Remove duplicated "What's New in 3.15" entry (#145994)
Shahar Naveh [Sun, 15 Mar 2026 21:54:19 +0000 (22:54 +0100)] 
gh-145998: Remove duplicated "What's New in 3.15" entry (#145994)

3 weeks agogh-145986: Avoid unbound C recursion in `conv_content_model` in `pyexpat.c` (CVE...
Stan Ulbrych [Sun, 15 Mar 2026 21:46:06 +0000 (21:46 +0000)] 
gh-145986: Avoid unbound C recursion in `conv_content_model` in `pyexpat.c` (CVE 2026-4224) (#145987)

Fix C stack overflow (CVE-2026-4224) when an Expat parser
with a registered `ElementDeclHandler` parses inline DTD
containing deeply nested content model.

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
3 weeks agogh-145976: Remove `Misc/indent.pro` (#145992)
Stan Ulbrych [Sun, 15 Mar 2026 21:29:12 +0000 (21:29 +0000)] 
gh-145976: Remove `Misc/indent.pro` (#145992)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
3 weeks agogh-122575: gh-142349: fix sys.flags tuple size (it unintentionally increased) (GH...
Gregory P. Smith [Sun, 15 Mar 2026 20:30:01 +0000 (13:30 -0700)] 
gh-122575: gh-142349: fix sys.flags tuple size (it unintentionally increased) (GH-145988)

the lazy imports PEP initial implementation (3.15 alpha) inadvertently incremented the length of the sys.flags tuple. In a way that did not do anything useful or related to the lazy imports setting (it exposed sys.flags.gil in the tuple). This fixes that to hard code the length to the 3.13 & 3.14 released length of 18 and have our tests and code comments make it clear that we've since stopped making new sys.flags attributes available via sequence index.

3 weeks agogh-145968: Fix base64.b64decode altchars translation in specific cases (GH-145969)
Matthieu Darbois [Sun, 15 Mar 2026 17:46:44 +0000 (18:46 +0100)] 
gh-145968: Fix base64.b64decode altchars translation in specific cases (GH-145969)

When altchars overlaps with the standard ones, the translation does not
always yield to the expected outcome.

3 weeks agogh-145976: Remove `Misc/{Porting,vgrindefs}` (#145973)
Stan Ulbrych [Sun, 15 Mar 2026 17:14:27 +0000 (17:14 +0000)] 
gh-145976: Remove `Misc/{Porting,vgrindefs}` (#145973)

Cleanup outdated files under Misc/

3 weeks agogh-142518: Document thread-safety guarantees of bytearray objects (#145226)
Lysandros Nikolaou [Sun, 15 Mar 2026 14:57:05 +0000 (15:57 +0100)] 
gh-142518: Document thread-safety guarantees of bytearray objects (#145226)

3 weeks agoBump mypy to 1.19.1 (#145956)
Brian Schubert [Sun, 15 Mar 2026 09:48:56 +0000 (05:48 -0400)] 
Bump mypy to 1.19.1 (#145956)

3 weeks agogh-141004: Document `PyDTrace*` (GH-141856)
Peter Bierma [Sun, 15 Mar 2026 02:58:35 +0000 (22:58 -0400)] 
gh-141004: Document `PyDTrace*` (GH-141856)

3 weeks agogh-123720: When closing an asyncio server, stop the handlers (#124689)
Guido van Rossum [Sat, 14 Mar 2026 18:28:49 +0000 (11:28 -0700)] 
gh-123720: When closing an asyncio server, stop the handlers (#124689)

3 weeks agoFix `fuzz_builtin_int` fuzzer reproducibility (#145890)
Stan Ulbrych [Sat, 14 Mar 2026 18:11:29 +0000 (18:11 +0000)] 
Fix `fuzz_builtin_int` fuzzer reproducibility (#145890)

3 weeks agobuild(deps): bump the actions group with 4 updates (#145952)
dependabot[bot] [Sat, 14 Mar 2026 16:30:26 +0000 (16:30 +0000)] 
build(deps): bump the actions group with 4 updates (#145952)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 weeks agogh-137650: Group dependabot actions updates (#145947)
Stan Ulbrych [Sat, 14 Mar 2026 16:00:15 +0000 (16:00 +0000)] 
gh-137650: Group dependabot actions updates (#145947)

3 weeks agogh-134584: Eliminate redundant refcounting in JIT for `MATCH_CLASS` (GH-144821)
Sacul [Sat, 14 Mar 2026 12:00:18 +0000 (20:00 +0800)] 
gh-134584: Eliminate redundant refcounting in JIT for `MATCH_CLASS` (GH-144821)

3 weeks agogh-143636: fix a crash when calling ``__replace__`` on invalid `SimpleNamespace`...
Bénédikt Tran [Sat, 14 Mar 2026 09:58:15 +0000 (10:58 +0100)] 
gh-143636: fix a crash when calling ``__replace__`` on invalid `SimpleNamespace` instances (#143655)

3 weeks agoDocs: fix missing period in `Doc/library/stdtypes.rst` (#145935)
Connor Gibson [Sat, 14 Mar 2026 09:19:00 +0000 (02:19 -0700)] 
Docs: fix missing period in `Doc/library/stdtypes.rst` (#145935)

3 weeks agogh-145703: Fix `asyncio.BaseEventLoop` low clock resolution (#145706)
Konstantin Vlasov [Sat, 14 Mar 2026 05:37:30 +0000 (06:37 +0100)] 
gh-145703: Fix `asyncio.BaseEventLoop` low clock resolution (#145706)

4 weeks agogh-129813: Document that PyBytesWriter_GetData() cannot fail (#145900)
Victor Stinner [Fri, 13 Mar 2026 18:44:51 +0000 (19:44 +0100)] 
gh-129813: Document that PyBytesWriter_GetData() cannot fail (#145900)

Document that PyBytesWriter_GetData() and PyBytesWriter_GetSize()
getter functions cannot fail

4 weeks agoGH-60729: Revert "Add IEEE format wave audio support (GH-145384)" (GH-145928)
Petr Viktorin [Fri, 13 Mar 2026 17:51:23 +0000 (18:51 +0100)] 
GH-60729: Revert "Add IEEE format wave audio support (GH-145384)" (GH-145928)

Revert "GH-60729: Add IEEE format wave audio support (GH-145384)"

This reverts commit 61f2a1a5993967ed4b97ba93a4477c37fe68cf59 for now;
as tests fail on big-endian machines.

4 weeks agogh-145376: Fix GC tracking in `structseq.__replace__` (#145820)
Pieter Eendebak [Fri, 13 Mar 2026 15:42:19 +0000 (16:42 +0100)] 
gh-145376: Fix GC tracking in `structseq.__replace__` (#145820)

4 weeks agogh-142518: Document thread-safety guarantees of set objects (#145225)
Lysandros Nikolaou [Fri, 13 Mar 2026 13:53:01 +0000 (14:53 +0100)] 
gh-142518: Document thread-safety guarantees of set objects (#145225)

4 weeks agoGH-60729: Add IEEE format wave audio support (GH-145384)
Michiel W. Beijen [Fri, 13 Mar 2026 13:10:48 +0000 (14:10 +0100)] 
GH-60729: Add IEEE format wave audio support (GH-145384)

Co-authored-by: Lionel Koenig <lionelk@google.com>
4 weeks agogh-140715: Add %t and %n format codes support to strptime() (GH-144896)
Jason Yalim, PhD [Fri, 13 Mar 2026 13:00:39 +0000 (06:00 -0700)] 
gh-140715: Add %t and %n format codes support to strptime() (GH-144896)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
4 weeks agogh-99631: Add shelve custom serialization to What's New in 3.15 (#145253)
Furkan Onder [Fri, 13 Mar 2026 12:38:06 +0000 (21:38 +0900)] 
gh-99631: Add shelve custom serialization to What's New in 3.15 (#145253)

4 weeks agogh-145792: Fix incorrect alloca allocation size in traceback.c (#145814)
VanshAgarwal24036 [Fri, 13 Mar 2026 12:15:26 +0000 (17:45 +0530)] 
gh-145792: Fix incorrect alloca allocation size in traceback.c (#145814)

4 weeks agogh-145887: Use `write()` instead of `stream.write()` in `PrettyPrinter._pprint_frozen...
devdanzin [Fri, 13 Mar 2026 11:57:35 +0000 (08:57 -0300)] 
gh-145887: Use `write()` instead of `stream.write()` in `PrettyPrinter._pprint_frozendict` (#145894)

4 weeks agogh-145850: Change some implementation details in struct.Struct (GH-145851)
Serhiy Storchaka [Fri, 13 Mar 2026 11:05:41 +0000 (13:05 +0200)] 
gh-145850: Change some implementation details in struct.Struct (GH-145851)

* calling it with non-ASCII string format will now raise a ValueError
  instead of UnicodeEncodeError
* calling it with non-ASCII bytes format will now raise a ValueError
  instead of struct.error
* getting the format attribute of uninitialized object will now raise
  an AttributeError instead of RuntimeError.

4 weeks agogh-145783: Propagate errors raised in `NEW_TYPE_COMMENT` (#145784)
Stan Ulbrych [Fri, 13 Mar 2026 11:05:20 +0000 (11:05 +0000)] 
gh-145783: Propagate errors raised in `NEW_TYPE_COMMENT`  (#145784)

4 weeks agoDocs: except with multiple exceptions parentheses not required (#145848)
Maurizio Sambati [Fri, 13 Mar 2026 09:40:20 +0000 (10:40 +0100)] 
Docs: except with multiple exceptions parentheses not required (#145848)

As of PEP 758 the except statement doesn't require parentheses anymore for exception tuples.

See: https://peps.python.org/pep-0758/

4 weeks agoRevert "gh-143050: Remove redundant decref in _PyLong_Negate (gh-143051)" (#145891)
Stan Ulbrych [Fri, 13 Mar 2026 01:53:29 +0000 (01:53 +0000)] 
Revert "gh-143050: Remove redundant decref in _PyLong_Negate (gh-143051)" (#145891)

OSS Fuzzer caught an assertion failure.

This reverts commit 5197ecb5e4df30ba0f6792d8bc0e36846154f58a.

4 weeks agogh-145801: Use gcc -fprofile-update=atomic for PGO builds (#145802)
Victor Stinner [Thu, 12 Mar 2026 22:48:51 +0000 (23:48 +0100)] 
gh-145801: Use gcc -fprofile-update=atomic for PGO builds (#145802)

When Python build is optimized with GCC using PGO, use
-fprofile-update=atomic option to use atomic operations when updating
profile information. This option reduces the risk of gcov Data Files
(.gcda) corruption which can cause random GCC crashes.

4 weeks agoGH-132042: Fix calculation of slotdef index in update_one_slot() (#145880)
Sergey Miryanov [Thu, 12 Mar 2026 22:16:53 +0000 (03:16 +0500)] 
GH-132042: Fix calculation of slotdef index in update_one_slot() (#145880)

4 weeks agogh-145685: Improve scaling of type attribute lookups (gh-145774)
Sam Gross [Thu, 12 Mar 2026 17:30:36 +0000 (13:30 -0400)] 
gh-145685: Improve scaling of type attribute lookups (gh-145774)

Avoid locking in the PyType_Lookup cache-miss path if the type's
tp_version_tag is already valid.

4 weeks agogh-145717: Add a few Microsoft-specific MIME types, and synchronize between `mimetype...
Charlie Lin [Thu, 12 Mar 2026 16:56:07 +0000 (12:56 -0400)] 
gh-145717: Add a few Microsoft-specific MIME types, and synchronize between `mimetypes` module and tests (#145718)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
4 weeks agogh-140131: Fix REPL cursor position on Windows when module completion suggestion...
Tan Long [Thu, 12 Mar 2026 15:59:43 +0000 (23:59 +0800)] 
gh-140131: Fix REPL cursor position on Windows when module completion suggestion line hits console width (GH-140333)

4 weeks agogh-141510: Update PyDict C API doc for frozendict (#145533)
Victor Stinner [Thu, 12 Mar 2026 14:04:36 +0000 (15:04 +0100)] 
gh-141510: Update PyDict C API doc for frozendict (#145533)

Mention frozendict support.

4 weeks agogh-145446: Add critical section in functools module for `PyDict_Next` (GH-145487)
bkap123 [Thu, 12 Mar 2026 13:46:37 +0000 (09:46 -0400)] 
gh-145446: Add critical section in functools module for `PyDict_Next` (GH-145487)

4 weeks agogh-145681: do not deallocate list buffer in `_PyList_AsTupleAndClear` (GH-145680)
Thomas Kowalski [Thu, 12 Mar 2026 13:27:07 +0000 (14:27 +0100)] 
gh-145681: do not deallocate list buffer in `_PyList_AsTupleAndClear` (GH-145680)

Setting the size to 0 turns the list contents into overallocated memory that the deallocator will free.
Ownership is transferred to the new tuple so no refcount adjustment is needed.

4 weeks agoGH-145692: Convert DEOPT_IFs to EXIT_IFs (GH-145751)
Mark Shannon [Thu, 12 Mar 2026 10:57:59 +0000 (10:57 +0000)] 
GH-145692: Convert DEOPT_IFs to EXIT_IFs (GH-145751)

* Convert DEOPT_IFs to EXIT_IFs for guards. Keep DEOPT_IF for intentional drops to the interpreter.

* Modify BINARY_OP_SUBSCR_LIST_INT and STORE_SUBSCR_LIST_INT to handle negative indices, to keep EXIT_IFs and DEOPT_IFs in different uops

4 weeks agogh-140594: Fix an out of bounds read when feeding NUL byte to PyOS_StdioReadline...
Shamil [Thu, 12 Mar 2026 10:46:36 +0000 (13:46 +0300)] 
gh-140594: Fix an out of bounds read when feeding NUL byte to PyOS_StdioReadline() (#140910)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 weeks agogh-143715: Deprecate incomplete initialization of struct.Struct() (GH-145580)
Serhiy Storchaka [Thu, 12 Mar 2026 07:44:11 +0000 (09:44 +0200)] 
gh-143715: Deprecate incomplete initialization of struct.Struct() (GH-145580)

* Struct.__new__() will require a mandatory argument (format)
* Calls of __init__() method with a different format argument on initialized
  Struct are deprecated

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
4 weeks agogh-145254: Add thread safety annotation in docs (#145255)
Lysandros Nikolaou [Thu, 12 Mar 2026 06:48:43 +0000 (07:48 +0100)] 
gh-145254: Add thread safety annotation in docs (#145255)

4 weeks agoGH-145247: Use _PyTuple_FromPair in Parser and Python (#145842)
Sergey Miryanov [Wed, 11 Mar 2026 21:08:18 +0000 (02:08 +0500)] 
GH-145247: Use _PyTuple_FromPair in Parser and Python (#145842)

Use _PyTuple_FromPair in Parser and Python

4 weeks agogh-144540: Add _MAKE_HEAP_SAFE uop to eliminate unnecessary refcount operations in...
Hai Zhu [Wed, 11 Mar 2026 20:24:19 +0000 (04:24 +0800)] 
gh-144540: Add _MAKE_HEAP_SAFE uop to eliminate unnecessary refcount operations in RETURN_VALUE and YIELD_VALUE (GH-144414)

4 weeks agogh-145736: Fix Tkinter tests for Tk 8.7, 9.0 and 9.1 (GH-145738)
Serhiy Storchaka [Wed, 11 Mar 2026 19:01:03 +0000 (21:01 +0200)] 
gh-145736: Fix Tkinter tests for Tk 8.7, 9.0 and 9.1 (GH-145738)

4 weeks agogh-141510: Raise TypeError in PyDict_SetItem() on frozendict (#145564)
Victor Stinner [Wed, 11 Mar 2026 16:05:09 +0000 (17:05 +0100)] 
gh-141510: Raise TypeError in PyDict_SetItem() on frozendict (#145564)

If the following functions get an unexpected frozendict,
raise TypeError instead of SystemError:

* PyDict_DelItem()
* PyDict_DelItemString()
* PyDict_Merge()
* PyDict_MergeFromSeq2()
* PyDict_Pop()
* PyDict_PopString()
* PyDict_SetDefault()
* PyDict_SetDefaultRef()
* PyDict_SetItem()
* PyDict_SetItemString()
* _PyDict_SetItem_KnownHash()
* PyDict_Update()

Co-authored-by: mohsinm-dev <mohsin.mdev@gmail.com>
4 weeks agogh-142183: Cache one datachunk per tstate to prevent alloc/dealloc thrashing (#145789)
T. Wouters [Wed, 11 Mar 2026 14:46:16 +0000 (15:46 +0100)] 
gh-142183: Cache one datachunk per tstate to prevent alloc/dealloc thrashing (#145789)

Cache one datachunk per tstate to prevent alloc/dealloc thrashing when repeatedly hitting the same call depth at exactly the wrong boundary.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
4 weeks agogh-139933: correctly suggest attributes for classes with a custom `__dir__` (GH-139950)
Bénédikt Tran [Wed, 11 Mar 2026 14:30:09 +0000 (15:30 +0100)] 
gh-139933: correctly suggest attributes for classes with a custom `__dir__` (GH-139950)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>