Commit graph

128437 commits

Author SHA1 Message Date
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
Hugo van Kemenade
b95d16a338
[3.14] gh-133146: Add the old public get_value method to documentation and refactor code. (GH-133301) (#142110)
also uses it within the internals in a few places.
(cherry picked from commit db098a475a)

Co-authored-by: Duprat <yduprat@gmail.com>
2025-11-30 13:06:56 -08:00
Miss Islington (bot)
3824ad0286
[3.14] Improve clarity in tutorial introduction (GH-140669) (#142112)
Co-authored-by: Thierry Martos <81799048+ThierryMT@users.noreply.github.com>
2025-11-30 12:53:05 +00:00
Miss Islington (bot)
52731c4e62
[3.14] gh-140373: Correctly emit PY_UNWIND event when generator is closed (GH-140767) (#140816)
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
2025-11-30 14:35:14 +02:00
Miss Islington (bot)
58c0af9984
[3.14] gh-139741: Make dist-pdf docs archive build work for macOS (GH-140837) (#141229)
Co-authored-by: Naitree Zhu <Naitreey@gmail.com>
2025-11-30 12:34:12 +00:00
Miss Islington (bot)
212b096b2a
[3.14] gh-140042: Removing unsafe call to sqlite3_shutdown (GH-141690) (#141793)
Co-authored-by: Prithviraj Chaudhuri <p.chaudhuri1993@gmail.com>
2025-11-30 14:32:11 +02:00
Miss Islington (bot)
848a2ebe53
[3.14] gh-136063: fix quadratic-complexity parsing in email.message._parseparam (GH-136072) (#140827)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-11-30 14:30:56 +02:00
Miss Islington (bot)
1011c0c38f
[3.14] gh-132795: Add docs for multiprocessing.Semaphore.locked (GH-133299) (#142111)
Co-authored-by: Duprat <yduprat@gmail.com>
2025-11-30 12:19:30 +00:00
Miss Islington (bot)
3d448061a1
[3.14] GH-141808: Do not generate the jit stencils twice in case of PGO builds on Windows. (GH-142043) (#142100)
GH-141808: Do not generate the jit stencils twice in case of PGO builds on Windows. (GH-142043)

* do not build the jit stencils twice in case of PGO builds on Windows

* blurb it
(cherry picked from commit f2ca1581ca)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-11-29 21:09:19 +00:00
Miss Islington (bot)
85591009d1
[3.14] Docs: Prepare for Sphinx 9 (GH-142057) (#142091)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-11-29 17:15:25 +02:00
Miss Islington (bot)
612213c0f4
[3.14] GH-121970: Remove Docutils list monkeypatch (GH-142056) (#142088) 2025-11-29 14:56:29 +00:00
Miss Islington (bot)
fed2af6f9e
[3.14] GH-91636: Clear weakrefs created by finalizers. (GH-136401) (#141993)
GH-91636: Clear weakrefs created by finalizers. (GH-136401)

Weakrefs to unreachable garbage that are created during running of
finalizers need to be cleared.  This avoids exposing objects that
have `tp_clear` called on them to Python-level code.
(cherry picked from commit b6b99bf7f1)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2025-11-28 23:34:36 -08:00
Itamar Oren
f7d17ac9f8
[3.14] gh-140011: Delete importdl assertion that prevents importing embedded modules from packages (GH-141605) (#141986)
gh-140011: Delete importdl assertion that prevents importing embedded modules from packages (GH-141605)

(cherry picked from commit 27f62eb711)
2025-11-28 23:30:57 -08:00
Miss Islington (bot)
d8a72b4c5e
[3.14] GH-141963: Clarify argparse documentation (GH-141964) (#142076)
GH-141963: Clarify argparse documentation (GH-141964)

Clarify argparse documentation

Tightens the phrasing for several argparse actions.
(cherry picked from commit cfcd52490d)

Co-authored-by: Moshe Kaplan <mosheekaplan@gmail.com>
2025-11-29 07:28:50 +00:00
Miss Islington (bot)
20b910ca8b
[3.14] Fix multiprocessing queue test_get() (GH-142024) (#142070)
Fix multiprocessing queue test_get() (GH-142024)

* Replace sleep() with support.sleeping_retry().
* Test get_nowait() first.
* Restore previously disabled test.

Fix the failure:

FAIL: test_get (test.test_multiprocessing_spawn.test_processes.WithProcessesTestQueue.test_get)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/_test_multiprocessing.py", line 1208, in test_get
    self.assertEqual(queue_empty(queue), False)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: True != False
(cherry picked from commit 5e749d3743)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-11-29 07:25:46 +00:00
Miss Islington (bot)
23d771a5de
[3.14] Docs: multi-disk ZIP files -> multipart ZIP files (GH-141962) (#142074)
Docs: multi-disk ZIP files -> multipart ZIP files (GH-141962)

* Remove some old currentlies
* multi-disk -> multipart
* Sentence case headings
(cherry picked from commit 890fe5aad5)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-11-29 07:17:39 +00:00
Miss Islington (bot)
3d8ad2d366
[3.14] gh-141994: Warn of XXE vulnerability in documentation of SAX feature xml.sax.handler.feature_external_ges (GH-141996) (#142072)
gh-141994: Warn of XXE vulnerability in documentation of SAX feature `xml.sax.handler.feature_external_ges` (GH-141996)

Doc/library/xml.sax.handler.rst: Warn of XXE with feature_external_ges

Related to commit baa9f33897
(cherry picked from commit 440bcb9456)

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
2025-11-29 07:14:02 +00:00