Commit graph

125554 commits

Author SHA1 Message Date
Miss Islington (bot)
cd3e9b3fd2
[3.13] gh-142787: Handle empty sqlite3 blob slices (GH-142824) (#145298)
(cherry picked from commit 06b0920f12)

Co-authored-by: A.Ibrahim <abdulrasheedibrahim47@gmail.com>
2026-02-27 01:13:08 +01:00
Miss Islington (bot)
083477fbd6
[3.13] gh-106318: Add examples for str.rjust() method (GH-143890) (#145256)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-02-26 13:48:01 +00:00
Stan Ulbrych
e418e3351f
[3.13] gh-88091: Fix unicodedata.decomposition() for Hangul Syllables (GH-144993) (GH-145190)
(cherry picked from commit 56c4f10d6e)
2026-02-25 00:27:40 +02:00
R. David Murray
a3c0a809e1
[3.13] gh-144156: Fix email header folding concatenating encoded words (GH-144692) (#145195)
The fix for gh-92081 (gh-92281) was unfortunately flawed, and broke whitespace handling for encoded word patterns that had previously been working correctly but had no corresponding tests, unfortunately in a way that made the resulting headers not RFC compliant, in such a way that Yahoo started rejecting the resulting emails.  This fix was released in 3.14 alpha 1, 3.13 beta 2 and 3.12.5.   This PR fixes the original problem in a way that does not break anything, and in fact fixes a small pre-existing bug (a spurious whitespace after the ':' of the header label if the header value is immediately wrapped on to the next line).  (RDM)
(cherry picked from commit 0f7cd5544a)

Co-authored-by: Robsdedude <dev@rouvenbauer.de>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2026-02-24 15:55:54 -05:00
Miss Islington (bot)
6f1e0c4f01
[3.13] gh-137335: Fix unlikely name conflicts for named pipes in multiprocessing and asyncio on Windows (GH-137389) (GH-145171)
Since os.stat() raises an OSError for existing named pipe "\\.\pipe\...",
os.path.exists() always returns False for it, and tempfile.mktemp() can
return a name that matches an existing named pipe.

So, tempfile.mktemp() cannot be used to generate unique names for named
pipes. Instead, CreateNamedPipe() should be called in a loop with
different names until it completes successfully.
(cherry picked from commit d6a71f4690)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-02-24 17:20:53 +00:00
Miss Islington (bot)
f1534307e8
[3.13] Fix inspect.Parameter docstring on the kind attribute (GH-143541) (GH-145175)
(cherry picked from commit 4c95ad8e49)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2026-02-24 13:18:48 +00:00
Miss Islington (bot)
cb1d20b81d
[3.13] gh-66305: Fix a hang on Windows in the tempfile module (GH-144672) (GH-145169)
It occurred when trying to create a temporary file or subdirectory in
a non-writable directory.
(cherry picked from commit ca66d3c40c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-02-24 11:37:52 +00:00
Miss Islington (bot)
dd355045f6
[3.13] _struct.c: Fix UB from integer overflow in prepare_s (GH-145158) (#145163)
`_struct.c`: Fix UB from integer overflow in `prepare_s` (GH-145158)

Avoid possible undefined behaviour from signed overflow in `struct` module

As discovered via oss-fuzz.
(cherry picked from commit fd0400585e)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-24 01:16:45 +00:00
Savannah Ostrowski
0acd41f398
[3.13] Add Savannah as jit.yml CODEOWNER (GH-145152) (#145156)
* Add Savannah as `jit.yml` CODEOWNER (#145152)

(cherry picked from commit 6180e79ed2)
2026-02-23 20:16:00 +02:00
Peter Bierma
56cc9ba645
[3.13] gh-141004: Document PyModuleDef_Type (GH-145043) (GH-145147)
(cherry picked from commit 24cc998c16)
2026-02-23 15:11:21 +00:00
Miss Islington (bot)
83ecd18779
[3.13] gh-143916: Allow HTAB in wsgiref header values (GH-144762)
(cherry picked from commit 66da7bf6fe)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-02-23 14:38:04 +01:00
Miss Islington (bot)
22af3d5104
[3.13] gh-145092: Fix compiler warning for memchr() and wcschr() returning const pointer (GH-145093) (GH-145101)
(cherry picked from commit faea32b729)

Co-authored-by: Rudi Heitbaum <rudi@heitbaum.com>
2026-02-22 08:28:24 +00:00
Bénédikt Tran
0038b58ac9
[3.13] gh-143698: correctly check scheduler and setpgroup values for os.posix_spawn[p] (GH-143699) (#145074)
* [3.13] gh-143698: correctly check `scheduler` and `setpgroup` values for `os.posix_spawn[p]` (GH-143699)

Fix an issue where passing invalid arguments to `os.posix_spawn[p]` functions
raised a SystemError instead of a TypeError, and allow to explicitly use `None`
for `scheduler` and `setpgroup` as specified in the docs.

(cherry picked from commit 347fc438cf)
2026-02-21 16:05:57 +01:00
Stan Ulbrych
773cd81028
[3.13] compute-changes.py: Fix & test process_changed_files() (GH-144674) (#145014)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2026-02-21 14:24:53 +02:00
Miss Islington (bot)
11c61b52d3
[3.13] gh-144694: Fix re.Match.group() doc claiming [1..99] range limit (GH-144696) (#145066)
gh-144694: Fix re.Match.group() doc claiming [1..99] range limit (GH-144696)

The documentation incorrectly stated that numeric group arguments
must be in the range [1..99]. This limit was removed in Python 3.5
(bpo-22437). Replace with "a positive integer" since the next
sentence already documents the IndexError for out-of-range values.
(cherry picked from commit 85021bc247)

Co-authored-by: Mohsin Mehmood <55545648+mohsinm-dev@users.noreply.github.com>
2026-02-21 05:42:39 +00:00
Miss Islington (bot)
c2a1fcbc05
[3.13] gh-144748: Document 3.12 and 3.14 changes to PyErr_CheckSignals (GH-144982) (GH-145063)
* gh-144748: Document 3.12 and 3.14 changes to `PyErr_CheckSignals` (GH-144982)
(cherry picked from commit 06292614ff)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-02-20 19:46:53 -05:00
Miss Islington (bot)
635d1b7b63
[3.13] Correct MAX_N in Lib/zipfile ZipExtFile (GH-144973) (GH-145023)
"<<" has lower precedence than "-".
(cherry picked from commit 4141f0a1ee)

Co-authored-by: J Berg <j.berg2349@gmail.com>
2026-02-19 23:11:16 +00:00
Stan Ulbrych
6294569259
[3.13] Remove unused :platform: in module's docs (GH-144988) (GH-144998)
It has not been outputted since Sphinx 1.1.
(cherry picked from commit 20caf1c084)
2026-02-19 12:13:53 +00:00
Serhiy Storchaka
e54507374b
[3.13] gh-140652: Fix a crash in _interpchannels.list_all() after clo…sing a channel (GH-143743) (GH-144953)
(cherry picked from commit 3f50432e31)
2026-02-18 14:18:39 +00:00
Miss Islington (bot)
cbecfbe792
[3.13] gh-144386: Update equivalent code for "with", "async with" and "async for" (GH-144472) (GH-144946)
They use special method lookup for special methods.
(cherry picked from commit 9e8fa2d4d1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-02-18 11:22:24 +00:00
Stan Ulbrych
ea07223716
[3.13] Fix typos and grammar errors across documentation (GH-144709) (#144804)
(cherry picked from commit 3718f4be60)

Co-authored-by: Ronald Eddy Jr <ronald_eddy@yahoo.com>
2026-02-17 12:56:29 +00:00
Miss Islington (bot)
6579e03813
[3.13] gh-143637: Fix test_socket.test_sendmsg_reentrant_ancillary_mutation() on Solaris (GH-144890) (#144902)
gh-143637: Fix test_socket.test_sendmsg_reentrant_ancillary_mutation() on Solaris (GH-144890)

Use socket.SCM_RIGHTS operation.
(cherry picked from commit 63531a3867)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-02-17 10:12:25 +00:00
Miss Islington (bot)
c3b5900c65
[3.13] gh-144551: Update macOS installer to use OpenSSL 3.0.19 (GH-144897) (#144898)
(cherry picked from commit 8f7e9c239f)

Co-authored-by: Ned Deily <nad@python.org>
2026-02-17 05:57:46 +00:00
Peter Bierma
9314ec23a6
[3.13] gh-144601: Avoid sharing exception objects raised in a PyInit function across multiple interpreters (GH-144602) (GH-144880)
(cherry picked from commit fd6b639a49)
2026-02-16 16:05:55 +00:00
Miss Islington (bot)
e701a5cb18
[3.13] gh-144601: Use _testmultiphase instead of _testsinglephase in test_importlib (GH-144769) (GH-144877)
[3.14] gh-144601: Use `_testmultiphase` instead of `_testsinglephase` in `test_importlib` (GH-144769)
(cherry picked from commit d148662326)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2026-02-16 10:11:17 -05:00
Miss Islington (bot)
ba0bab40f7
[3.13] gh-80667: Fix lookup for Tangut ideographs in unicodedata (GH-144789) (GH-144871) (GH-144875)
(cherry picked from commit 8b7b5a9946)
(cherry picked from commit bcabbd02f6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Pierre Le Marre <dev@wismill.eu>
2026-02-16 15:02:01 +00:00
Zachary Ware
48f9ecad92
[3.13] gh-144551: Update Android builds to use OpenSSL 3.0.19 (GH-144868)
(cherry picked from commit 87c7f193b8)
2026-02-15 23:27:39 -06:00
Miss Islington (bot)
37f818caef
[3.13] gh-144833: Fix use-after-free in SSL module when SSL_new() fails (GH-144843) (#144859)
gh-144833: Fix use-after-free in SSL module when SSL_new() fails (GH-144843)

In newPySSLSocket(), when SSL_new() returns NULL, Py_DECREF(self)
was called before _setSSLError(get_state_ctx(self), ...), causing
a use-after-free. Additionally, get_state_ctx() was called with
self (PySSLSocket*) instead of sslctx (PySSLContext*), which is
a type confusion bug.

Fix by calling _setSSLError() before Py_DECREF() and using
sslctx instead of self for get_state_ctx().
(cherry picked from commit c91638ca06)

Co-authored-by: Ramin Farajpour Cami <ramin.blackhat@gmail.com>
2026-02-16 03:09:58 +00:00
Miss Islington (bot)
e1dbe2263a
[3.13] gh-101100: Resolve reference warnings in reference/ (GH-138418) (#138681)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@ulbrych.org>
2026-02-15 03:06:50 +00:00
Pablo Galindo Salgado
0151abcd9f
[3.13] gh-144766: Fix a crash in fork child process when perf support is enabled. (GH-144795) (#144818)
(cherry picked from commit 5922149a50)

Co-authored-by: Yilei <hi@mangoumbrella.com>
2026-02-14 17:52:42 +00:00
Zachary Ware
48dd852025
[3.13] gh-144551: Update CI to use latest OpenSSL versions (GH-144800)
(cherry picked from commit b933ef9261)
2026-02-13 15:41:42 -06:00
Miss Islington (bot)
795f436fc5
[3.13] gh-144787: [tests] Allow TLS v1.2 to be minimum version (GH-144790) (#144792)
gh-144787: [tests] Allow TLS v1.2 to be minimum version (GH-144790)

Allow TLS v1.2 to be minimum version

Updates test_min_max_version to allow TLS v1.2 to be minimum version if
TLS 1.0 and 1.1 are disabled in OpenSSL.
(cherry picked from commit d625f7da33)

Co-authored-by: Colin McAllister <colinmca242@gmail.com>
2026-02-13 12:28:14 -08:00
Zachary Ware
160fe2acd8
[3.13] gh-144551: Update Windows builds to use OpenSSL 3.0.19 (GH-144798)
(cherry picked from commit 928602c0ac)
2026-02-13 19:37:02 +00:00
Miss Islington (bot)
309bacdb4a
[3.13] gh-143637: Fix re-entrant mutation of ancillary data in socket.sendmsg() (GH-143892) (#144785)
gh-143637: Fix re-entrant mutation of ancillary data in socket.sendmsg() (GH-143892)
(cherry picked from commit 82b92e3cd1)

Co-authored-by: Priyanshu Singh <priyanshu2282@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-02-13 15:58:59 +00:00
Miss Islington (bot)
99a4e55f79
[3.13] gh-144706: Warn against using synchronization primitives within signal handlers (GH-144736) (GH-144768)
gh-144706: Warn against using synchronization primitives within signal handlers (GH-144736)
(cherry picked from commit 945bf8ce1b)

Co-authored-by: Robsdedude <dev@rouvenbauer.de>
2026-02-12 23:21:26 +00:00
Serhiy Storchaka
2f354107f3
[3.13] gh-80667: Fix case-sensitivity of some Unicode literal escapes (GH-107281) (GH-144754)
Lookup for CJK ideograms and Hangul syllables is now case-insensitive,
as is the case for other character names.
(cherry picked from commit e66f4a5a9c)

Co-authored-by: James <snoopjedi@gmail.com>
2026-02-12 17:18:48 +00:00
Miss Islington (bot)
99cc3d1842
[3.13] gh-57095: Add note about input splitting in datetime.*.strptime (GH-131049) (GH-144734)
(cherry picked from commit 2e3e76e5cd)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-02-12 11:44:42 +01:00
Serhiy Storchaka
009583fc6f
[3.13] gh-84424: Use numeric_changed for UCD.numeric (GH-19457) (GH-144732)
This was causing ucd_3_2_0.numeric() to pick up only decimal
changes between Unicode 3.2.0 and the current version.
(cherry picked from commit 3e0322ff16)

Co-authored-by: William Meehan <wmeehan@fb.com>
2026-02-12 08:35:09 +00:00
Stan Ulbrych
9a57c932ec
[3.13] Itertools recipes: Replace the tabulate() example with running_mean() (gh-144483) (gh-144722) 2026-02-12 00:24:00 -06:00
Lysandros Nikolaou
05c9474ed9
[3.13] gh-142518: Define lock-free and per-object lock (GH-144548) (#144707)
(cherry picked from commit 12dbae4c02)
2026-02-11 18:08:49 +01:00
Miss Islington (bot)
a5b1952d24
[3.13] gh-106318: Improve str.rstrip() method doc (GH-143893) (#144698)
gh-106318: Improve str.rstrip() method doc (GH-143893)
(cherry picked from commit 936d60dbe1)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-11 08:48:28 +00:00
Gregory P. Smith
c117ef1a1c
[3.13] gh-143650: Fix importlib race condition on import failure (GH-143651) (#144697)
gh-143650: Fix importlib race condition on import failure (GH-143651)

Fix a race condition where a thread could receive a partially-initialized
module when another thread's import fails. The race occurs when:

1. Thread 1 starts importing, adds module to sys.modules
2. Thread 2 sees the module in sys.modules via the fast path
3. Thread 1's import fails, removes module from sys.modules
4. Thread 2 returns a stale module reference not in sys.modules

The fix adds verification after the "skip lock" optimization in both Python
and C code paths to check if the module is still in sys.modules. If the
module was removed (due to import failure), we retry the import so the
caller receives the actual exception from the import failure rather than
a stale module reference.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

cherry picked from ac8b5b6890
2026-02-11 06:37:25 +00:00
Miss Islington (bot)
36aa0815ca
[3.13] gh-138744: Skip test_dtrace on Windows (GH-144657) (#144668)
[3.14] gh-138744: Skip test_dtrace on Windows (GH-144657)
(cherry picked from commit 8b4210c30e)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Ken Jin <kenjin@python.org>
2026-02-10 14:54:27 +00:00
Miss Islington (bot)
c49835a51c
[3.13] Clarify the docs for args in asyncio callbacks (GH-143873) (#144664)
Clarify the docs for `args` in asyncio callbacks (GH-143873)
(cherry picked from commit 40a82abe93)

Co-authored-by: Aarni Koskela <akx@iki.fi>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-02-10 13:16:12 +00:00
Miss Islington (bot)
d177460b43
[3.13] gh-143543: Fix re-entrant use-after-free in itertools.groupby (GH-143738) (GH-144627)
(cherry picked from commit a91b5c3fb5)

Co-authored-by: VanshAgarwal24036 <148854295+VanshAgarwal24036@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-02-10 14:01:23 +01:00
Miss Islington (bot)
7fbdec4180
[3.13] gh-144363: Update bundled libexpat to 2.7.4 (GH-144365) (GH-144500)
(cherry picked from commit d5cb9f6a9b)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-02-10 13:59:12 +01:00
Petr Viktorin
bad4bc4603
[3.13] gh-131261: generate_sbom.py: Exclude the refresh script from SBOM (GH-131359) (GH-144625)
- generate_sbom.py: Exclude the refresh script from SBOM
- Modules/expat/refresh.sh: Expand the list of manual steps

(cherry picked from commit 51d309988b)
2026-02-10 10:49:00 +01:00
Miss Islington (bot)
de105e78c7
[3.13] Disable pip version check when upgrading certifi (GH-144632) (#144640)
(cherry picked from commit 80ba4e10f5)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-02-09 22:22:12 -05:00
Miss Islington (bot)
c304b32b1f
[3.13] gh-144492: Fix process_changed_files outputs for reusable-{macos, wasi}.yml (GH-144518) (#144634)
gh-144492: Fix `process_changed_files` outputs for `reusable-{macos, wasi}.yml` (GH-144518)

Fix `process_changed_files` double-processing reusable-{macos, wasi] ending up with incorrect outputs
(cherry picked from commit fd190d1fa1)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-09 18:16:33 +00:00
Miss Islington (bot)
6884288570
[3.13] gh-106318: Add examples for str.partition() method (GH-142823) (#144612)
gh-106318: Add examples for str.partition() method (GH-142823)
(cherry picked from commit 432ddd99e2)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-02-08 22:16:49 +00:00