Commit graph

128453 commits

Author SHA1 Message Date
Miss Islington (bot)
19968c8927
[3.14] gh-142282 Fix winreg.QueryValueEx() under race condition (GH-142283) (GH-142453)
(cherry picked from commit 3ec941b364)

Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2025-12-09 12:33:35 +00:00
Miss Islington (bot)
f200776b13
[3.14] gh-68552: fix defects policy (GH-138579) (#142366)
Co-authored-by: Ivo Bellin Salarin <nilleb@users.noreply.github.com>
Co-authored-by: Martin Panter <vadmium@users.noreply.github.com>
Co-authored-by: Ivo Bellin Salarin <ivo@nilleb.com>
2025-12-09 07:39:01 +00:00
Sam Gross
378b24b54e
[3.14] gh-133932: Tagged ints are heap-safe (free threading) (gh-142431)
The previous fix (gh-134494) didn't fix the free threading build.
2025-12-08 18:16:28 -05:00
Miss Islington (bot)
20b454d272
[3.14] Fix typo in Tools/wasm/README.md (GH-142426) (GH-142429)
Fix typo in `Tools/wasm/README.md` (GH-142426)
(cherry picked from commit 719d7960e2)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-08 20:54:24 +00:00
Miss Islington (bot)
caba09cd6e
[3.14] gh-123241: Document restrictions for tp_traverse implementations (gh-142272) (#142423)
(cherry picked from commit 37988c57ea)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-12-08 17:27:57 +00:00
Miss Islington (bot)
9bb27cd105
[3.14] gh-140125: Increase object recursion depth for test_json from 200k to 500k (GH-142226) (#142416)
gh-140125: Increase object recursion depth for `test_json` from 200k to 500k (GH-142226)
(cherry picked from commit e3539e99e3)

Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-12-08 13:31:56 +00:00
Miss Islington (bot)
d2f5a0e72e
[3.14] gh-141794: Reduce size of compiler stress tests to fix Android warnings (GH-142263) (#142386)
gh-141794: Reduce size of compiler stress tests to fix Android warnings (GH-142263)
(cherry picked from commit f193c8fe9e)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2025-12-08 09:58:21 +02:00
Miss Islington (bot)
7308015d9c
[3.14] gh-142346: Fix usage formatting for mutually exclusive groups in argparse (GH-142381) (GH-142385)
Support groups preceded by positional arguments or followed or intermixed
with other optional arguments. Support empty groups.
(cherry picked from commit 1db9f56bff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-12-07 20:03:05 +00:00
Miss Islington (bot)
b188ebeca0
[3.14] gh-142006: Fix HeaderWriteError in email.policy.default caused by extra newline (GH-142008) (#142361)
gh-142006: Fix HeaderWriteError in email.policy.default caused by extra newline (GH-142008)

RDM: This fixes a subtle folding error that showed up when a token exactly filled a line and was followed by whitespace and a token with no folding whitespace that was longer than a line.  In this particular circumstance the whitespace after the first token got pushed on to the next line, and then stolen to go in front of the next unfoldable token...leaving a completely empty line in the line buffer.  That line got turned in to a newline, which is RFC illegal, and the newish security check caught it.  The fix is to just delete that empty line from the buffer.
(cherry picked from commit 07eff899d8)

Co-authored-by: Paresh Joshi <rahulj9223@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2025-12-06 16:39:47 -05:00
Miss Islington (bot)
1dfe219fec
[3.14] gh-142332: Fix usage formatting for positional arguments in mutually exclusive groups in argparse (GH-142333) (GH-142356)
(cherry picked from commit 70c27ce94b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-12-06 18:28:54 +00:00
Miss Islington (bot)
4556b9e7dc
[3.14] GH-75949: Fix argparse dropping '|' in mutually exclusive groups on line wrap (GH-142312) (#142347) 2025-12-06 15:37:34 +00:00
Miss Islington (bot)
95d19fc5b6
[3.14] Docs: fix RFC index reference for TLS 1.3 (GH-142262) (#142340)
Docs: fix RFC index reference for TLS 1.3 (GH-142262)
(cherry picked from commit 61823a5382)

Co-authored-by: Y. Z. Chen <754097987@qq.com>
2025-12-06 14:51:08 +00:00
Miss Islington (bot)
5a639ca1b3
[3.14] Introduce build-python and build-host subcommands for Tools/wasm/wasi (GH-142266) (#142322)
Introduce `build-python` and `build-host` subcommands for `Tools/wasm/wasi` (GH-142266)

It should make it easier when you need to rebuild just the e.g. host Python, but it requires ./configure to run.
(cherry picked from commit 58e1c7a16f)

Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-12-05 15:04:50 -08:00
Hugo van Kemenade
66d1d7ed37 Merge branch '3.14' of https://github.com/python/cpython into 3.14 2025-12-05 22:00:48 +02:00
Hugo van Kemenade
160ca1c8c3 Post 3.14.2 2025-12-05 21:59:38 +02:00
Miss Islington (bot)
37c6dd1c91
[3.14] GH-142267: Cache formatter to avoid repeated _set_color calls (GH-142268) (#142313)
GH-142267: Cache formatter to avoid repeated `_set_color` calls (GH-142268)
(cherry picked from commit 4085ff7b32)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
2025-12-05 17:14:56 +00:00
Hugo van Kemenade
df793163d5 Python 3.14.2 2025-12-05 18:49:16 +02:00
Hugo van Kemenade
4cb6cbb6fa
[3.14] Revert "gh-140797: Forbid capturing groups in re.Scanner lexicon patterns (GH-140944) (GH-140982)" (#142309) 2025-12-05 16:45:15 +00:00
Miss Islington (bot)
d8b1ce10bd
[3.14] Add explanation comments for tests for overlapped ZIP entries (GH-137152) (GH-142310)
(cherry picked from commit 100c726d98)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-12-05 16:35:21 +00:00
Miss Islington (bot)
8fd39c0e51
[3.14] gh-140482: Avoid changing terminal settings in test_pty (gh-142202) (gh-142239)
The previous test_spawn_doesnt_hang test had a few problems:

* It would cause ENV CHANGED failures if other tests were running
  concurrently due to stty changes
* Typing while the test was running could cause it to fail
(cherry picked from commit c0c65141b3)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-12-05 11:18:40 -05:00
Miss Islington (bot)
7eec794f1a
[3.14] Fix disk space issues in Android CI (GH-142289) (#142292)
Co-authored-by: Malcolm Smith <smith@chaquo.com>
2025-12-05 17:12:16 +02:00
Miss Islington (bot)
c9b2ec6c66
[3.14] gh-101100: Fix references to the set methods (GH-141857) (GH-142300)
gh-101100: Fix references to the set methods (GH-141857)
(cherry picked from commit 1d8f3ed2eb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-12-05 16:33:35 +02:00
Serhiy Storchaka
0e4f4f1a46
[3.14] gh-119452: Fix a potential virtual memory allocation denial of service in http.server (GH-142216)
The CGI server on Windows could consume the amount of memory specified
in the Content-Length header of the request even if the client does not
send such much data. Now it reads the POST request body by chunks,
therefore the memory consumption is proportional to the amount of sent
data.
2025-12-05 16:20:23 +02:00
Petr Viktorin
f130b06da3
[3.14] gh-142206: multiprocessing.resource_tracker: Decode messages using older protocol (GH-142215) (GH-142285)
(cherry picked from commit 4172644d78)

Difference from the original commit: the default in 3.14 is to use
the simpler original protocol (except for filenames with newlines).

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-12-05 12:47:30 +01:00
Miss Islington (bot)
654e3c7435
[3.14] gh-142214: Fix two regressions in dataclasses (GH-142223) (#142277)
gh-142214: Fix two regressions in dataclasses (GH-142223)
(cherry picked from commit 53ec7c8fc0)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-12-05 08:08:15 +00:00
Miss Islington (bot)
94012d65c9
[3.14] gh-116738: Statically initialize special constants in cmath module (gh-142161) (gh-142261)
The initialization during `mod_exec` wasn't thread-safe with multiple interpreters.
(cherry picked from commit 2dac9e6016)

Co-authored-by: Alper <alperyoney@fb.com>
2025-12-04 14:51:55 +00:00
Miss Islington (bot)
88e1f695f3
[3.14] gh-129483: Make TestLocalTimeDisambiguation's time format locale independent (GH-142193) (#142258)
gh-129483: Make `TestLocalTimeDisambiguation`'s time format locale independent (GH-142193)

* Change to update %c to the exact time format.

---------
(cherry picked from commit 8392095bf9)

Co-authored-by: Kir Chou <148194051+gkirchou@users.noreply.github.com>
Co-authored-by: Kir Chou <note351@hotmail.com>
2025-12-04 14:03:36 +00:00
Peter Bierma
d069edc9e8
[3.14] gh-141004: Add a CI job ensuring that new C APIs include documentation (GH-142102) (GH-142247)
* gh-141004: Add a CI job ensuring that new C APIs include documentation (GH-142102)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
(cherry picked from commit 1a7824a927)

---------

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-04 08:07:39 -05:00
Miss Islington (bot)
5611e0809b
[3.14] gh-135676: Reword the f-string (and t-string) section (GH-137469) (GH-142227)
Much of the information was duplicated in stdtypes.rst; this PR keeps
lexical/syntactical details in Lexical Analysis and the evaluation & runtime
behaviour in Standard types, with cross-references between the two.
Since the t-string section only listed differences from f-strings, and the
grammar for the two is equivalent, that section was moved to Standard types
almost entirely.
(cherry picked from commit aea5531583)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-04 11:53:12 +01:00
Miss Islington (bot)
afaa3b02f7
[3.14] Being more flexible in when not to explicitly set the sysroot when compiling for WASI (GH-142242) (GH-142246)
Being more flexible in when not to explicitly set the sysroot when compiling for WASI (GH-142242)
(cherry picked from commit c5252045d3)

Co-authored-by: Brett Cannon <brett@python.org>
2025-12-04 00:16:37 +00:00
Miss Islington (bot)
319c6a2ae1
[3.14] gh-142218: Fix split table dictionary crash (gh-142229) (gh-142244)
This fixes a regression introduced in gh-140558. The interpreter would
crash if we inserted a non `str` key into a split table that matches an
existing key.
(cherry picked from commit 547d8daf78)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-12-04 00:03:18 +00:00
Miss Islington (bot)
027f21e417
[3.14] gh-142145: Remove quadratic behavior in node ID cache clearing (GH-142146) (#142209)
gh-142145: Remove quadratic behavior in node ID cache clearing (GH-142146)

* Remove quadratic behavior in node ID cache clearing



* Add news fragment

---------
(cherry picked from commit 08d8e18ad8)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Jacob Walls <38668450+jacobtylerwalls@users.noreply.github.com>
2025-12-03 19:09:44 +00:00
Stan Ulbrych
79245a47ed
[3.14] gh-135676: Simplify docs on lexing names (GH-140464) (GH-142015)
This simplifies the Lexical Analysis section on Names (but keeps it technically correct) by putting all the info about non-ASCII characters in a separate (and very technical) section.

It uses a mental model where the parser doesn't handle Unicode complexity “immediately”, but:

- parses any non-ASCII character (outside strings/comments) as part of a name, since these can't (yet) be e.g. operators
- normalizes the name
- validates the name, using the xid_start/xid_continue sets

(cherry picked from commit 2ff8608b4d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Micha Albert <info@micha.zone>
Co-authored-by: KeithTheEE <kmurrayis@gmail.com>
2025-12-03 13:43:06 +01:00
Hugo van Kemenade
206f1966ec Post 3.14.1 2025-12-02 18:16:07 +02:00
Hugo van Kemenade
57e0d177c2 Python 3.14.1 2025-12-02 14:51:37 +02:00
Hugo van Kemenade
49fe7574d9
[3.14] Revert "gh-119452: Fix a potential virtual memory allocation denial of service in http.server (GH-119455)" (#142184)
Fix a potential virtual memory allocation denial of service in http.server (GH-119455)"
2025-12-02 12:06:25 +00:00
Petr Viktorin
82274c491a
[3.14] Document None for timeout argument of select.select (GH-142177) (#142182) 2025-12-02 13:45:07 +02:00
Miss Islington (bot)
b053c2abf0
[3.14] gh-140281: Update free threading Python HOWTO for 3.14 (gh-140566) (gh-142173)
(cherry picked from commit 2dc28eb8b0)

Co-authored-by: Krishna-web-hub <masterkiran27@gmail.com>
Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-12-02 01:06:15 -05:00
Miss Islington (bot)
15a25f44ee
[3.14] gh-59000: Fix pdb breakpoint resolution for class methods when module not imported (GH-141949) (#142171)
gh-59000: Fix pdb breakpoint resolution for class methods when module not imported (GH-141949)
(cherry picked from commit 5e58548ebe)

Co-authored-by: LloydZ <35182391+cocolato@users.noreply.github.com>
2025-12-02 05:06:26 +00:00
Miss Islington (bot)
5c5670eb45
[3.14] gh-142048: Fix quadratically increasing GC delays (gh-142051) (gh-142166)
The GC for the free threaded build would get slower with each collection due
to effectively double counting objects freed by the GC.
(cherry picked from commit eb892868b3)

Co-authored-by: Kevin Wang <kevmo314@gmail.com>
2025-12-02 00:30:11 +00:00
Hugo van Kemenade
7642070807
[3.14] Revert "GH-91636: Clear weakrefs created by finalizers. (GH-136401) (#141993)" (#142152) 2025-12-01 20:34:37 +02:00
Miss Islington (bot)
4ce27904b5
[3.14] gh-119451: Fix a potential denial of service in http.client (GH-119454) (#142138)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-12-01 20:34:09 +02:00
Miss Islington (bot)
afce34fbf0
[3.14] gh-141930: Use the regular IO stack to write .pyc files for a better error message on failure (GH-141931) (#142021)
Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
2025-12-01 18:43:50 +02:00
Miss Islington (bot)
521fb36561
[3.14] gh-141004: Document descriptor and dict proxy type objects (GH-141803) (GH142147)
gh-141004: Document descriptor and dict proxy type objects (GH-141803)
(cherry picked from commit 52f9b5f580)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-12-01 15:57:31 +00:00
Miss Islington (bot)
b64441e485
[3.14] gh-119342: Fix a potential denial of service in plistlib (GH-119343) (GH-142143)
Reading a specially prepared small Plist file could cause OOM because file's
read(n) preallocates a bytes object for reading the specified amount of
data. Now plistlib reads large data by chunks, therefore the upper limit of
consumed memory is proportional to the size of the input file.
(cherry picked from commit 694922cf40)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-12-01 15:54:58 +00:00
Serhiy Storchaka
29c657a1f2
[3.14] gh-119452: Fix a potential virtual memory allocation denial of service in http.server (GH-119455)
The CGI server on Windows could consume the amount of memory specified
in the Content-Length header of the request even if the client does not
send such much data. Now it reads the POST request body by chunks,
so that the memory consumption is proportional to the amount of sent
data.
2025-12-01 12:59:09 +00:00
Miss Islington (bot)
c4054f7aa8
[3.14] Docs: Upgrade Sphinx to 9.0 (GH-142114) (#142128)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-12-01 11:22:05 +00:00
Miss Islington (bot)
9cb5a93e07
[3.14] gh-141473: Document not calling Popen.wait after Popen.communicate times out. (GH-142101) (#142124)
gh-141473: Document not calling Popen.wait after Popen.communicate times out. (GH-142101)

Document not calling Popen.wait after Popen.communicate times out.

Closes GH-141473
(cherry picked from commit 3e2c557493)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2025-12-01 02:55:28 +00:00
Miss Islington (bot)
8899ed52f2
[3.14] gh-142066: Fix grammar in multiprocessing Pipes and Queues (GH-142121) (#142122)
gh-142066: Fix grammar in multiprocessing Pipes and Queues (GH-142121)
(cherry picked from commit 981ce0cf3a)


docs: Fix grammar in multiprocessing Pipes and Queues (gh-142066)

Co-authored-by: Tadej Magajna <tmagajna@gmail.com>
2025-12-01 02:19:48 +00:00
Miss Islington (bot)
4dbf8e14ba
[3.14] gh-142067: Add missing default value for param in multiprocessing.Pipe's doc (GH-142109) (#142120)
gh-142067: Add missing default value for param in `multiprocessing.Pipe`'s doc (GH-142109)
(cherry picked from commit 229ed3dd1f)

Co-authored-by: flovent <flbven@protonmail.com>
2025-11-30 21:15:39 +00:00