Commit graph

127892 commits

Author SHA1 Message Date
Miss Islington (bot)
7a1a79d731
[3.14] gh-138163: skip failures if tests are run with SCHED_BATCH on glibc (GH-138576) (GH-138820)
(cherry picked from commit 492941459a)

Co-authored-by: jxes993409 <68891412+jxes993409@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-10-07 20:01:51 +02:00
Miss Islington (bot)
d7500f6078
[3.14] gh-138008: Fix segfaults in _ctypes due to invalid argtypes (GH-138285) (GH-138742)
(cherry picked from commit 1ce05537a3)

Signed-off-by: Nguyen Viet Dung <29406816+magnified103@users.noreply.github.com>
Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-10-07 20:00:28 +02:00
Miss Islington (bot)
7aab50cd7a
[3.14] gh-136507: Fix mimetypes CLI to handle multiple file parameters (GH-136508) (GH-138140)
(cherry picked from commit 81268a3e2a)

Co-authored-by: Wulian233 <1055917385@qq.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-10-07 19:59:52 +02:00
Miss Islington (bot)
93f5e26d97
[3.14] gh-137376: Add note on top-level global declarations (GH-137707) (GH-138023)
(cherry picked from commit 9f05f98730)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2025-10-07 19:59:29 +02:00
Miss Islington (bot)
7d9b2671c6
[3.14] gh-123681: Check NORMALIZE_CENTURY behavior at runtime; require C99 (GH-136022) (GH-137947)
A runtime check is needed to support cross-compiling.

Remove the _Py_NORMALIZE_CENTURY macro.
Remove _pydatetime.py's _can_support_c99.
(cherry picked from commit 719e5c3f71)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-07 19:59:06 +02:00
Miss Islington (bot)
fad7bfc282
[3.14] gh-138902: Fix generator send arg name (GH-138905) (#138914)
gh-138902: Fix generator send arg name (GH-138905)
(cherry picked from commit cb07bd24ee)

Co-authored-by: Marat Khagazheev <marathagazeev@gmail.com>
Co-authored-by: marat <khagazheev@artlebedev.ru>
2025-10-07 23:27:05 +05:30
Miss Islington (bot)
e3d102ecdc
[3.14] gh-136823: Update documentation on excluded headers in Python.h (GH-136824) (#137437)
gh-136823: Update documentation on excluded headers in Python.h (GH-136824)
(cherry picked from commit c2428ca9ea)

Co-authored-by: Sina Zel taat <111974143+SZeltaat@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-10-07 23:23:33 +05:30
Miss Islington (bot)
a03dd74c94
[3.14] gh-137239: Add *_max functions to heapq.__all__ (gh-137241) (#137256)
gh-137239: Add *_max functions to heapq.__all__ (gh-137241)
(cherry picked from commit 5f35f9b8fa)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-10-07 23:22:07 +05:30
Miss Islington (bot)
7b203aa2ff
[3.14] gh-136516: Mention installation artifacts as de-facto resources (GH-136419) (#137038)
gh-136516: Mention installation artifacts as de-facto resources (GH-136419)

Files like NUL on windows are, from `importlib.resources` point of
view, an artifact caused by installing to a filesystem directory.
Mention these.
(cherry picked from commit fac4964fdb)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-10-07 23:20:13 +05:30
Miss Islington (bot)
33340233d0
[3.14] gh-139698: Fix typo in What's New 3.14 (GH-139699) (#139711)
gh-139698: Fix typo in What's New 3.14 (GH-139699)
(cherry picked from commit d396a32b3d)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-10-07 17:46:00 +00:00
Sam Gross
fb699effbf
[3.14] gh-137400: Fix thread-safety issues when profiling all threads (gh-137518) (gh-137730)
There were a few thread-safety issues when profiling or tracing all
threads via PyEval_SetProfileAllThreads or PyEval_SetTraceAllThreads:

* The loop over thread states could crash if a thread exits concurrently
  (in both the free threading and default build)
* The modification of `c_profilefunc` and `c_tracefunc` wasn't
  thread-safe on the free threading build.
(cherry picked from commit a10152f8fd)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-10-07 13:45:23 -04:00
Miss Islington (bot)
c1cb785ebd
[3.14] gh-126662: naming consistency for signal.ItimerError (GH-126712) (#137122)
gh-126662: naming consistency for `signal.ItimerError` (GH-126712)
(cherry picked from commit d5fa437dfb)

Co-authored-by: Stephen Morton <git@tungol.org>
2025-10-07 19:42:46 +02:00
Miss Islington (bot)
98ca0b3e2b
[3.14] Fix docs for Queue.shutdown (gh-137028) (#137080)
Fix docs for Queue.shutdown (gh-137028)
(cherry picked from commit 245671555b)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-07 19:41:03 +02:00
Miss Islington (bot)
08d8dadfc2
[3.14] gh-136278: Document codecs.escape_encode() and codecs.escape_decode() (GH-136314) (#137149)
gh-136278: Document codecs.escape_encode() and codecs.escape_decode() (GH-136314)

Closes GH-136278
(cherry picked from commit 6784ef7da7)

Co-authored-by: Toshaksha <147024929+Toshaksha@users.noreply.github.com>
2025-10-07 19:40:30 +02:00
Miss Islington (bot)
57c8e3eb8e
[3.14] gh-58124: Avoid CP_UTF8 in UnicodeDecodeError (GH-137415) (#137460)
gh-58124: Avoid CP_UTF8 in UnicodeDecodeError (GH-137415)

Fix name of the Python encoding in Unicode errors of the code page
codec: use "cp65000" and "cp65001" instead of "CP_UTF7" and "CP_UTF8"
which are not valid Python code names.
(cherry picked from commit ce1b747ff6)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-07 19:39:31 +02:00
Miss Islington (bot)
e4e8c5a3b0
[3.14] gh-139208: Fix regrtest --fast-ci --verbose (GH-139240) (#139260)
gh-139208: Fix regrtest --fast-ci --verbose (GH-139240)

Don't ignore the --verbose option anymore.
(cherry picked from commit dd683f8f34)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-07 19:39:06 +02:00
Miss Islington (bot)
b343009377
[3.14] gh-71810: Fix _PyLong_AsByteArray() undefined behavior (GH-138873) (#138883)
gh-71810: Fix _PyLong_AsByteArray() undefined behavior (GH-138873)

Don't read p[-1] when p is an empty string: when n==0.
(cherry picked from commit 8b5ce31c2b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-07 19:38:40 +02:00
Miss Islington (bot)
52e88585b0
[3.14] gh-137179: Fix flaky test_history_survive_crash test (gh-137180) (gh-137216)
Kill the REPL subprocess once it prints the output from the command
immediately before the `time.sleep()`.
(cherry picked from commit 98d462cf4d)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-10-07 17:38:30 +00:00
Miss Islington (bot)
6e9845455e
[3.14] gh-135329: Use longer timeout in pyrepl test_repl_eio() (GH-139503) (#139506)
gh-135329: Use longer timeout in pyrepl test_repl_eio() (GH-139503)

Replace hardcoded 5 seconds with support.SHORT_TIMEOUT.

Fix the following error on slow CI such as GitHub Action UBSan:

test test_pyrepl failed -- Traceback (most recent call last):
  File "Lib/test/test_pyrepl/test_unix_console.py", line 362, in test_repl_eio
    _, err = proc.communicate(timeout=5)  # sleep for pty to settle
             ~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "Lib/subprocess.py", line 1219, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
                     ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Lib/subprocess.py", line 2126, in _communicate
    self._check_timeout(endtime, orig_timeout, stdout, stderr)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Lib/subprocess.py", line 1266, in _check_timeout
    raise TimeoutExpired(
    ...<2 lines>...
            stderr=b''.join(stderr_seq) if stderr_seq else None)
subprocess.TimeoutExpired: Command '[...]' timed out after 5 seconds
(cherry picked from commit c985822d86)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-07 19:38:12 +02:00
Miss Islington (bot)
9e13cc2896
[3.14] gh-137017: Ensure Thread.is_alive() only returns False after the underlying OS thread exits (gh-137315) (gh-138916)
(cherry picked from commit aa9ceb1721)

Co-authored-by: Abdul <abdulrasheedibrahim47@gmail.com>
Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-10-07 17:37:31 +00:00
Sam Gross
85dabb9c15
[3.14] gh-137238: Fix data race in _Py_slot_tp_getattr_hook (gh-137240) (#137416)
Replacing the slot isn't thread-safe if the GIL is disabled. Don't
require that the slot has been replaced when specializing.
(cherry picked from commit 485b16b4f7)
2025-10-07 17:36:56 +00:00
Kumar Aditya
5cd6cfe4cf
[3.14] gh-136234: Fix SelectorSocketTransport.writelines to be robust to connection loss (GH-136743) (#138702) 2025-10-07 23:06:04 +05:30
Miss Islington (bot)
de84d09050
[3.14] gh-139516: Fix lambda colon start format spec in f-string in tokenizer (GH-139657) (#139701)
gh-139516: Fix lambda colon start format spec in f-string in tokenizer (GH-139657)
(cherry picked from commit 539461d9ec)

Co-authored-by: Tomasz Pytel <tompytel@gmail.com>
2025-10-07 18:35:17 +01:00
Miss Islington (bot)
cec4ddf23e
[3.14] gh-128639: Don't assume one thread in subinterpreter finalization with fixed daemon thread support (GH-134606) (GH-139050)
gh-128639: Don't assume one thread in subinterpreter finalization with fixed daemon thread support (GH-134606)

This reapplies GH-128640.
(cherry picked from commit a64881363b)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-10-07 13:30:38 -04:00
Miss Islington (bot)
08bea299bf
[3.14] gh-112729: Correctly fail when the process is out of memory during interpreter creation (GH-139164) (GH-139168)
gh-112729: Correctly fail when the process is out of memory during interpreter creation (GH-139164)
(cherry picked from commit d06113c7a7)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-10-07 13:30:23 -04:00
Miss Islington (bot)
a69bdab541
[3.14] gh-123828: Fix data race in _interpchannels._waiting_release (GH-124107) (GH-139517)
gh-123828: Fix data race in `_interpchannels._waiting_release` (GH-124107)
(cherry picked from commit f39dea3bae)

Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
2025-10-07 13:29:37 -04:00
Miss Islington (bot)
9e091dbf02
[3.14] gh-138756: Fix leak of inittab memory in PyInitConfig_Free() (GH-138792) (#139703)
gh-138756: Fix leak of inittab memory in PyInitConfig_Free() (GH-138792)
(cherry picked from commit 3d521a62e7)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-07 17:11:20 +00:00
Miss Islington (bot)
ddd1264469
[3.14] gh-82916: Don't fail when importing from / with sys.pycache_prefix set (GH-30456) (GH-137906)
(cherry picked from commit d8a9466e29)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-07 18:55:33 +02:00
Miss Islington (bot)
0accda7468
[3.14] gh-138756: Fix memory leak in PyInitConfig_Free() (GH-138759) (#138785)
gh-138756: Fix memory leak in PyInitConfig_Free() (GH-138759)

Clear also memory of PyConfig members.
(cherry picked from commit 96dee64c73)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-07 18:42:50 +02:00
Victor Stinner
6ed9be1a55
[3.14] gh-137058: Sync _Py_NULL macro with the main branch (#137409)
gh-137058: Sync _Py_NULL macro with the main branch

* use __STDC_VERSION__ >= 202311L instead of
  __STDC_VERSION__ > 201710L.
* Check for _MSC_VER.
2025-10-07 18:41:45 +02:00
Hugo van Kemenade
4319884256 Post 3.14.0 2025-10-07 17:15:20 +03:00
Hugo van Kemenade
ebf955df7a Python 3.14.0 2025-10-07 12:34:52 +03:00
Miss Islington (bot)
33f1330bd5
[3.14] GH-123299: Announce final release in What's New in Python 3.14 (GH-139631) (#139685)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-10-07 08:56:02 +00:00
Miss Islington (bot)
433b638af6
[3.14] gh-124111: Update macOS installer to use Tcl/Tk 8.6.17. (GH-139682) (#139683)
gh-124111: Update macOS installer to use Tcl/Tk 8.6.17. (GH-139682)
(cherry picked from commit 6d804e4efb)

Co-authored-by: Ned Deily <nad@python.org>
2025-10-07 05:19:28 +00:00
Miss Islington (bot)
0944953cee
[3.14] gh-139573: Update macOS installer to use OpenSSL 3.0.18 (GH-139575) (#139680)
gh-139573: Update macOS installer to use OpenSSL 3.0.18 (GH-139575)
(cherry picked from commit 23410f0a9e)

Co-authored-by: Zachary Ware <zach@python.org>
2025-10-07 08:01:57 +03:00
Miss Islington (bot)
847474ce5d
[3.14] Add warnings filter suggestions to PEP 765 entry in What's New (GH-139658) (#139676)
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-10-07 00:30:00 +03:00
Miss Islington (bot)
57c37a4623
[3.14] gh-116488: Mention dict.get in the data structures tutorial (GH-139643) (#139655)
Co-authored-by: Cycloctane <Cycloctane@outlook.com>
2025-10-06 19:04:44 +03:00
Sebastian Pipping
ab89ca06fa
[3.14] gh-139400: Move NEWS item from section "Core and Builtins" to section "Security" (GH-139606) (#139663) 2025-10-06 18:12:43 +03:00
Miss Islington (bot)
f776254080
[3.14] gh-137242: Allow Android testbed to take all Python command-line options (GH-138805) (#139637)
Co-authored-by: Malcolm Smith <smith@chaquo.com>
2025-10-06 15:15:06 +03:00
Miss Islington (bot)
bb212a1a8b
[3.14] GH-123299: Copyedit 3.14 What's New: Trivia (GH-139618) (#139626)
GH-123299: Copyedit 3.14 What's New: Trivia (GH-139618)
(cherry picked from commit 46de475af7)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-10-05 23:34:05 +03:00
Miss Islington (bot)
3aeee0863a
[3.14] GH-123299: Copyedit 3.14 What's New: New Features (GH-139543) (#139615)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-10-05 21:38:28 +03:00
Miss Islington (bot)
66ca0d9ae6
[3.14] gh-139400: Make sure that parent parsers outlive their subparsers in pyexpat (GH-139403) (#139606)
Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
2025-10-05 16:02:11 +00:00
Miss Islington (bot)
08d289208b
[3.14] gh-138130: Fix return value of libc_ver() on Emscripten (GH-138132) (#138312)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2025-10-05 16:03:49 +03:00
Miss Islington (bot)
07e0eb2093
[3.14] gh-118767: Remove `bool(NotImplemented)` from pending-removal document (GH-139526) (#139599)
Co-authored-by: Jost Migenda <jost.migenda@kcl.ac.uk>
2025-10-05 16:01:35 +03:00
Miss Islington (bot)
1ffd62baca
[3.14] gh-139310: skip test_aead_aes_gcm for Linux kernel between 6.16.0 and 6.17.x (GH-139552) (#139594)
gh-139310: skip `test_aead_aes_gcm` for Linux kernel between 6.16.0 and 6.17.x (GH-139552)

Currently, Fedora 42 uses a custom Linux Kernel 6.16.9 that backported an upstream change
from 6.17-rc7 [1,3] but not its subsequent fix [2]. Until the issue is resolved upstream,
we skip the failing test `test_socket.test_aead_aes_gcm` for kernel versions between 6.16
and 6.17.x.

[1] 1b34cbbf4f
[2] d0ca0df179.
[3] 45bcf60fe4
(cherry picked from commit 41712c4e09)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-10-05 08:53:23 +00:00
Miss Islington (bot)
51f8f44bd0
[3.14] gh-139573: Update OpenSSL version used in iOS builds (GH-139582) (#139589)
gh-139573: Update OpenSSL version used in iOS builds (GH-139582)

Update OpenSSL version used in iOS builds.
(cherry picked from commit 20758f9bb1)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-10-05 09:09:09 +03:00
Miss Islington (bot)
a450151642
[3.14] gh-139573: Update Windows builds to use OpenSSL 3.0.18 (GH-139574) (#139586)
gh-139573: Update Windows builds to use OpenSSL 3.0.18 (GH-139574)
(cherry picked from commit 063cef9999)

Co-authored-by: Zachary Ware <zach@python.org>
2025-10-05 08:00:29 +03:00
Miss Islington (bot)
8cb73119c6
[3.14] gh-139573: Update OpenSSL in CI (GH-139577) (#139583)
gh-139573: Update OpenSSL in CI (GH-139577)
(cherry picked from commit 98e748b3a0)

Co-authored-by: Zachary Ware <zach@python.org>
2025-10-05 07:50:26 +03:00
Miss Islington (bot)
bc85a34f8a
[3.14] gh-139573: Update Android to OpenSSL 3.0.18 (GH-139562) (#139581)
gh-139573: Update Android to OpenSSL 3.0.18 (GH-139562)

Update Android to OpenSSL 3.0.18.
(cherry picked from commit 0f0fc5a163)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2025-10-05 07:49:36 +03:00
Miss Islington (bot)
2f96a40ec0
[3.14] gh-138558: Improve description of `Interpolation.expression` (GH-139187) (#139579)
gh-138558: Improve description of ``Interpolation.expression`` (GH-139187)
(cherry picked from commit 880c9526f9)

Co-authored-by: Dave Peck <davepeck@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-10-05 07:41:43 +03:00