]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Tue, 25 Nov 2025 01:20:35 +0000 (02:20 +0100)]
[3.14] gh-141907: Better handle support for SHA3 for test_hashlib (GH-141908) (#141918)
gh-141907: Better handle support for SHA3 for test_hashlib (GH-141908)
* test_hashlib: better handle support for SHA3
It's possible that the SSL library supports only SHA3 algo and doesn't
have SHAKE one.
The current test wrongly detect this and set both HASH and HASHXOF to
None expecting to have the extra SHA3 attributes present but this should
only be true for SHAKE algo.
To better handle this, move the HASH condition to a dedicated try-expect
condition and check if HASHXOF is None in the relevant code effectively
checking if SHA3 is supported by the SSL library but SHAKE algo needs to
use the sha3module one.
---------
(cherry picked from commit
fee778265064c290ae1852916ff47fcc0ab4a29d )
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Co-authored-by: Christian Marangi <ansuelsmth@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Mon, 24 Nov 2025 20:19:20 +0000 (21:19 +0100)]
[3.14] Fix implicit import in `test_monitoring.py` (gh-141795) (gh-141920)
(cherry picked from commit
369ce2b139a5b76c9c093cba1cee287cb6ffeec1 )
Co-authored-by: SubbaraoGarlapati <53627478+SubbaraoGarlapati@users.noreply.github.com>
Miss Islington (bot) [Mon, 24 Nov 2025 17:24:41 +0000 (18:24 +0100)]
[3.14] gh-141004: Document stack effect C APIs (GH-141843) (GH-141916)
gh-141004: Document stack effect C APIs (GH-141843)
(cherry picked from commit
e1f1df4082e2bc6cdb46be9984124c88a7b2ff0f )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 24 Nov 2025 17:16:31 +0000 (18:16 +0100)]
[3.14] gh-141004: Document `PyImport_Inittab` (GH-141844) (GH-141915)
gh-141004: Document `PyImport_Inittab` (GH-141844)
(cherry picked from commit
5f35702bb641230131c400500bb8bbacde7465b2 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan Ulbrych <stan@ulbrych.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 24 Nov 2025 16:44:54 +0000 (17:44 +0100)]
[3.14] gh-129441: Fix some flakiness in test_instrumentation (gh-141881) (gh-141913)
Most of the `self.assertTrue(self.called)` checks are flaky because
the worker threads may sometimes finish before the main thread calls
`self.during_threads()`.
(cherry picked from commit
71126ab19c76d8227fc3b9c7c59b957ca82af4dd )
Co-authored-by: Sam Gross <colesbury@gmail.com>
Miss Islington (bot) [Mon, 24 Nov 2025 16:10:59 +0000 (17:10 +0100)]
[3.14] gh-116749: Fix code comment for _PyConfig_GIL_DEFAULT (gh-141804) (gh-141911)
(cherry picked from commit
c490ffb7ac43e7132f866103cefd872afa067a6a )
Co-authored-by: Sam Gross <colesbury@gmail.com>
Miss Islington (bot) [Mon, 24 Nov 2025 14:59:22 +0000 (15:59 +0100)]
[3.14] gh-106318: Add examples for str.join() (GH-140315) (#141906)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Mon, 24 Nov 2025 14:56:59 +0000 (15:56 +0100)]
[3.14] gh-106318: Add example for str.format() (GH-137018) (#141904)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Hugo van Kemenade [Mon, 24 Nov 2025 14:28:49 +0000 (16:28 +0200)]
[3.14] gh-106318: Add example for str.isalpha() (GH-137557) (#141901)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 24 Nov 2025 14:07:58 +0000 (15:07 +0100)]
[3.14] gh-106318: Add example for str.isascii() (GH-137558) (#141898)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Mon, 24 Nov 2025 13:40:01 +0000 (14:40 +0100)]
[3.14] gh-141004: Document `Py_ARRAY_LENGTH` (GH-141601) (GH-141895)
gh-141004: Document `Py_ARRAY_LENGTH` (GH-141601)
(cherry picked from commit
e0773eacb7e660b4fd6bd702b0a119e25ab3b012 )
Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Mon, 24 Nov 2025 13:20:02 +0000 (14:20 +0100)]
[3.14] gh-106318: Add example for str.isdecimal() (GH-137559) (#141893)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Mon, 24 Nov 2025 03:09:34 +0000 (04:09 +0100)]
[3.14] gh-135335: Simplify preload regression test using __main__ (GH-138686) (#141886)
gh-135335: Simplify preload regression test using __main__ (GH-138686)
Simplify preload regression test using `__main__`
With the fix for gh-126631 `__main__` modules can be preloaded and the regression
test for gh-135335 can be simplified to just use a self-contained script rather
than requiring a module.
Note this assumes and implicitly tests that `__main__` is preloaded by default.
(cherry picked from commit
425f24e4fad672c211307a9f0018c8d39c4db9de )
Co-authored-by: Duane Griffin <duaneg@dghda.com>
Stefano Rivera [Sun, 23 Nov 2025 23:55:33 +0000 (15:55 -0800)]
[3.14] GH-139914: Handle stack growth direction on HPPA (GH-140028) (#141404)
* [3.14] GH-139914: Handle stack growth direction on HPPA (GH-140028)
Adapted from a patch for Python 3.14 submitted to the Debian BTS by John David Anglin https://bugs.debian.org/
1105111 #20
* Forgot to update test_call
* WTF typo
Miss Islington (bot) [Sun, 23 Nov 2025 17:34:01 +0000 (18:34 +0100)]
[3.14] gh-141865: Fix translation of strings in `changes.py` extension (GH-141882) (#141883)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Sun, 23 Nov 2025 15:31:56 +0000 (16:31 +0100)]
[3.14] gh-120158: Fix inconsistent monitoring state when setting events too frequently (gh-141845) (gh-141879)
If we overflowed the global version counter (i.e., after 2*24 calls to
`_PyMonitoring_SetEvents`), we bailed out after setting global monitoring
events but before instrumenting code objects, which led to assertion errors
later on.
Also add a `time.sleep()` to `test_free_threading.test_monitoring` to avoid
overflowing the global version counter.
(cherry picked from commit
e457d60daafe66534283e0f79c81517634408e57 )
Co-authored-by: Sam Gross <colesbury@gmail.com>
Miss Islington (bot) [Sun, 23 Nov 2025 10:17:20 +0000 (11:17 +0100)]
[3.14] gh-98552: Revert (unneeded, already done elsewhere) "flush std streams in the multiprocessing forkserver before fork (GH-141849)" (GH-141871) (#141872)
gh-98552: Revert (unneeded, already done elsewhere) "flush std streams in the multiprocessing forkserver before fork (GH-141849)" (GH-141871)
Revert (unneeded, already done elsewhere) "gh-98552: flush std streams in the multiprocessing forkserver before fork (GH-141849)"
This reverts commit
58badb1711e12b6e8b5240ab96cdd01b95012de7 .
(cherry picked from commit
614a28b3da1c898f29c34c14f59bf2d496dbd31d )
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Miss Islington (bot) [Sat, 22 Nov 2025 20:23:22 +0000 (21:23 +0100)]
[3.14] gh-98552: flush std streams in the multiprocessing forkserver before fork (GH-141849) (#141851)
gh-98552: flush std streams in the multiprocessing forkserver before fork (GH-141849)
* flush std streams in the multiprocessing forkserver before fork
* NEWS
(cherry picked from commit
58badb1711e12b6e8b5240ab96cdd01b95012de7 )
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Miss Islington (bot) [Sat, 22 Nov 2025 19:33:09 +0000 (20:33 +0100)]
[3.14] GH-101100: Resolve reference warnings in library/stdtypes.rst (GH-138420) (#141855)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Sat, 22 Nov 2025 19:23:59 +0000 (20:23 +0100)]
[3.14] gh-101100: Fix sphinx warnings in `library/unittest.rst` (GH-140109) (#141853)
Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Sat, 22 Nov 2025 18:53:06 +0000 (19:53 +0100)]
[3.14] gh-141801: Use accessors for ASN1_STRING fields in libssl (GH-141802) (#141847)
gh-141801: Use accessors for ASN1_STRING fields in libssl (GH-141802)
* gh-141801: Use accessors for ASN1_STRING fields
While ASN1_STRING is currently exposed, it is better to use the
accessors. See https://github.com/openssl/openssl/issues/29117 where, if
the type were opaque, OpenSSL's X509 objects could be much more
memory-efficient.
* Update Modules/_ssl.c
* Update Modules/_ssl.c
---------
(cherry picked from commit
c41fce08a5d7aae8fd9e3fa25e0ba521600e097c )
Co-authored-by: David Benjamin <davidben@davidben.net>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Sat, 22 Nov 2025 18:47:47 +0000 (19:47 +0100)]
[3.14] gh-141600: Fix musl version detection on Void Linux (GH-141850)
(cherry picked from commit
08477dbf300020cc67006c180917c02ee8a5cec8 )
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
Miss Islington (bot) [Sat, 22 Nov 2025 09:38:52 +0000 (10:38 +0100)]
[3.14] gh-141612: improve `test_trampoline_works_with_forks` coverage (GH-141613) (#141824)
gh-141612: improve `test_trampoline_works_with_forks` coverage (GH-141613)
(cherry picked from commit
f15f6d0ba3715c67643e58959459b0e84a67b183 )
Co-authored-by: Paresh Joshi <rahulj9223@gmail.com>
Cody Maloney [Sat, 22 Nov 2025 04:11:20 +0000 (20:11 -0800)]
[3.14] gh-129559: add `bytearray.resize` thread safety test for free-threading (GH-141739) (#141835)
[3.14] gh-129559: add `bytearray.resize` thread safety test for free-threading (GH-141739)
(cherry picked from commit
019c315a8e52978da67a3108e441ed5ee376f504 )
Miss Islington (bot) [Fri, 21 Nov 2025 20:14:43 +0000 (21:14 +0100)]
[3.14] gh-141729: Doc PyTypeObject.tp_vectorcall grammar fix (GH-141730) (#141815)
gh-141729: Doc PyTypeObject.tp_vectorcall grammar fix (GH-141730)
[3.14] Doc PyTypeObject.tp_vectorcall grammar fix
(cherry picked from commit
20b69aac0d19a5e5358362410d9710887762f0e7 )
Co-authored-by: Michael Kiper <77862413+michaelkiper@users.noreply.github.com>
Co-authored-by: makiper <michael.kiper@jpl.nasa.gov>
Miss Islington (bot) [Fri, 21 Nov 2025 18:57:30 +0000 (19:57 +0100)]
[3.14] gh-137422: Fix race condition in PyImport_AddModuleRef (gh-141822) (gh-141830)
(cherry picked from commit
2d50dd242e04b94f86cb23c4972c1b423c670175 )
Co-authored-by: Sam Gross <colesbury@gmail.com>
Miss Islington (bot) [Fri, 21 Nov 2025 16:47:13 +0000 (17:47 +0100)]
[3.14] gh-116738: Make csv module thread-safe (gh-141365) (gh-141825)
Added a critical section to protect the states of `ReaderObj` and `WriterObj` in the free-threading build. Without the critical sections, both new free-threading tests were crashing.
(cherry picked from commit
fb26d9c2ef739cbfdc134da5ab89470511f1f5fd )
Co-authored-by: Alper <alperyoney@fb.com>
Victor Stinner [Thu, 20 Nov 2025 17:13:03 +0000 (18:13 +0100)]
[3.14] gh-141784: Fix _remote_debugging_module.c compilation on 32-bit Linux (#141796) (#141800)
gh-141784: Fix _remote_debugging_module.c compilation on 32-bit Linux (#141796)
Include Python.h before system headers to make sure that
_remote_debugging_module.c uses the same types (ABI) than Python.
(cherry picked from commit
722f4bb8c9c6b32a7221e4813058cbb5c3989c10 )
Miss Islington (bot) [Thu, 20 Nov 2025 16:35:09 +0000 (17:35 +0100)]
[3.14] Docs: Fix typo in socketserver documentation (GH-140956) (#141799)
Co-authored-by: Thomas Ballard <thomasballard0503@gmail.com>
Miss Islington (bot) [Thu, 20 Nov 2025 16:23:40 +0000 (17:23 +0100)]
[3.14] GH-137841: Open tzdata/zones file with UTF-8 encoding (GH-137872) (#141607)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Thu, 20 Nov 2025 13:54:48 +0000 (14:54 +0100)]
[3.14] gh-141004: Document missing `PyDateTime*` APIs (GH-141543) (GH-141791)
gh-141004: Document missing `PyDateTime*` APIs (GH-141543)
(cherry picked from commit
4273616ebfbfe2a7cfd93460a08364f5a40f89e2 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Thu, 20 Nov 2025 13:52:07 +0000 (14:52 +0100)]
[3.14] gh-141004: Document missing generator APIs (GH-141409) (GH-141789)
gh-141004: Document missing generator APIs (GH-141409)
(cherry picked from commit
2da7ecc680548804ea99d62ba4d228cfa5011671 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Thu, 20 Nov 2025 13:48:11 +0000 (14:48 +0100)]
[3.14] gh-141004: Document `Py_MakePendingCalls` (GH-141137) (GH-141787)
gh-141004: Document `Py_MakePendingCalls` (GH-141137)
(cherry picked from commit
ce701032a3d5d3597466d5836ebe989db6eda2aa )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Thu, 20 Nov 2025 09:22:52 +0000 (10:22 +0100)]
[3.14] gh-141757: Comply with pickle protocol in test_reduce_5tuple (GH-141759) (GH-141782)
The 5th element of the __reduce__ tuple should be an iterator.
(cherry picked from commit
41b9ad5b38e913194a5cc88f0e7cfc096787b664 )
Co-authored-by: Arseny Boykov <36469655+Bobronium@users.noreply.github.com>
Miss Islington (bot) [Thu, 20 Nov 2025 04:33:18 +0000 (05:33 +0100)]
[3.14] gh-141489: Simplify closure/freevar iteration in `annotationlib._build_closure()` (GH-141490) (#141776)
gh-141489: Simplify closure/freevar iteration in `annotationlib._build_closure()` (GH-141490)
(cherry picked from commit
a35c683da55e77c96828fd0421640787337cfc64 )
Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
Miss Islington (bot) [Thu, 20 Nov 2025 01:01:49 +0000 (02:01 +0100)]
[3.14] gh-132657: optimize `PySet_Contains` for `frozenset` (GH-141183) (gh-141773)
(cherry picked from commit
7211a34fe1d9704935342af8c9b46725629f2d97 )
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miss Islington (bot) [Thu, 20 Nov 2025 01:00:42 +0000 (02:00 +0100)]
[3.14] gh-132657: avoid locks and refcounting in `frozenset` lookups (GH-136107) (gh-141772)
gh-132657: avoid locks and refcounting in `frozenset` lookups (GH-136107)
(cherry picked from commit
f58a7c717584241467970623384ce61cbd776f29 )
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Miss Islington (bot) [Wed, 19 Nov 2025 20:36:24 +0000 (21:36 +0100)]
[3.14] Remove GvR from '_stdauthor' in Doc/conf.py (GH-141765) (#141767)
Co-authored-by: Guido van Rossum <guido@python.org>
Co-authored-by: Guido van Rossum <gvanrossum@microsoft.com>
Miss Islington (bot) [Wed, 19 Nov 2025 20:17:51 +0000 (21:17 +0100)]
[3.14] Move the NEWS entry for gh-141659 to the correct section (GH-141744) (GH-141766)
(cherry picked from commit
fbc31d14ffaae1f252865db52fc7f5f6311e7b1a )
Co-authored-by: Ayappan Perumal <ayappap2@in.ibm.com>
Miss Islington (bot) [Wed, 19 Nov 2025 18:38:09 +0000 (19:38 +0100)]
[3.14] gh-141004: Document `Py_LOCAL` and `Py_LOCAL_INLINE` (GH-141725) (GH-141761)
gh-141004: Document `Py_LOCAL` and `Py_LOCAL_INLINE` (GH-141725)
(cherry picked from commit
3149d64c93f02217eb01c0fd82c26a685b5281c1 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Sam Gross [Wed, 19 Nov 2025 15:00:51 +0000 (10:00 -0500)]
[3.14] gh-139103: fix free-threading `dataclass.__init__` perf issue (gh-141596) (gh-141750)
The dataclasses `__init__` function is generated dynamically by a call to `exec()` and so doesn't have deferred reference counting enabled. Enable deferred reference counting on functions when assigned as an attribute to type objects to avoid reference count contention when creating dataclass instances.
(cherry picked from commit
ce791541769a41beabec0f515cd62e504d46ff1c )
Co-authored-by: Edward Xu <xuxiangad@gmail.com>
Miss Islington (bot) [Wed, 19 Nov 2025 14:29:15 +0000 (15:29 +0100)]
[3.14] gh-141570: can_colorize: Expect fileno() to raise OSError, as documented (GH-141716) (#141747)
gh-141570: can_colorize: Expect fileno() to raise OSError, as documented (GH-141716)
In Fedora, we've been given a slightly incomplete reproducer for a problematic
Python 3.14 color-related change in argparse that leads to an exception when
Python is used from mod_wsgi: https://bugzilla.redhat.com/
2414940
mod_wsgi replaces sys.stdout with a custom object that raises OSError on .fileno():
https://github.com/GrahamDumpleton/mod_wsgi/blob/
8460dbfcd5c7108892b3cde9fab7cbc1caa27886 /src/server/wsgi_logger.c#L434-L440
This should be supported, as the documentation of fileno explicitly says:
> An OSError is raised if the IO object does not use a file descriptor.
https://docs.python.org/3.14/library/io.html#io.IOBase.fileno
The previously expected exception inherits from OSError,
so it is still expected.
Fixes https://github.com/python/cpython/issues/141570
(cherry picked from commit
96f496a949b05054d0d043c3085f00cec2f83bf5 )
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Wed, 19 Nov 2025 12:43:24 +0000 (13:43 +0100)]
[3.14] gh-140875: Fix handling of unclosed charrefs before EOF in HTMLParser (GH-140904) (GH-141745)
(cherry picked from commit
95296a9d40aa2d58502a09e86e2a93c03df23366 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 19 Nov 2025 11:07:01 +0000 (12:07 +0100)]
[3.14] Correct class name from PullDom to PullDOM (GH-141207) (#141743)
Co-authored-by: Guo Ci <zguoci@gmail.com>
Miss Islington (bot) [Wed, 19 Nov 2025 09:30:11 +0000 (10:30 +0100)]
[3.14] gh-138189: Link references to type slots (GH-141410) (GH-141718)
(cherry picked from commit
4695ec109d07c9bfd9eb7d91d6285c974a4331a7 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Wed, 19 Nov 2025 08:05:01 +0000 (09:05 +0100)]
[3.14] gh-141659: Fix bad file descriptor error in subprocess on AIX (GH-141660) (GH-141738)
/proc/self does not exist on AIX.
(cherry picked from commit
92c5de73b8d7526326c865b1a669b868f0d40c1e )
Co-authored-by: Ayappan Perumal <ayappap2@in.ibm.com>
Miss Islington (bot) [Wed, 19 Nov 2025 02:25:34 +0000 (03:25 +0100)]
[3.14] gh-141692: Add a slice-specific lib folder to iOS XCframeworks. (GH-141693) (#141733)
Modifies the iOS XCframework to include a lib folder for each slice that
contains a symlinked version of the libPython dynamic library.
(cherry picked from commit
7b0b70867586ef7109de60ccce94d13164dbb776 )
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Miss Islington (bot) [Tue, 18 Nov 2025 23:14:31 +0000 (00:14 +0100)]
[3.14] gh-141691: Apply ruff rules to Apple folder. (GH-141694) (#141728)
Add ruff configuration to run over the Apple build tooling and testbed script.
(cherry picked from commit
17636ba48ce535fc1b1926c0bab26339da50631a )
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Sergey B Kirpichev [Tue, 18 Nov 2025 13:32:44 +0000 (16:32 +0300)]
[3.14] gh-141004: Document Py_HUGE_VAL/IS_FINITE/IS_INFINITE/IS_NAN (GH-141544) (#141698)
(cherry picked from commit
630cd37bfae0fc4021d9e9461b94d36e7ce6b95c )
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Serhiy Storchaka [Tue, 18 Nov 2025 11:16:39 +0000 (13:16 +0200)]
[3.14] gh-140873: Fix the singledispatchmethod documentation (GH-141523)
It does not support non-descriptor callables yet.
Miss Islington (bot) [Tue, 18 Nov 2025 10:37:49 +0000 (11:37 +0100)]
[3.14] Add missing backticks in os and decimal docs (GH-141699) (#141705)
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Miss Islington (bot) [Mon, 17 Nov 2025 22:57:47 +0000 (23:57 +0100)]
[3.14] gh-141004: Document `Py_MEMCPY` (GH-141676) (GH-141685)
gh-141004: Document `Py_MEMCPY` (GH-141676)
(cherry picked from commit
16ea9505ce690485bab38691e5a83f467757fc03 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Mon, 17 Nov 2025 19:46:23 +0000 (20:46 +0100)]
[3.14] gh-141004: Document `PyODict*` APIs (GH-141136) (GH-141677)
gh-141004: Document `PyODict*` APIs (GH-141136)
(cherry picked from commit
b3626321b6ebb46dd24acee2aa806450e70febfc )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Mon, 17 Nov 2025 17:56:55 +0000 (18:56 +0100)]
[3.14] gh-141497: Make ipaddress.IP{v4,v6}Network.hosts() always returning an iterator (GH-141547) (GH-141673)
(cherry picked from commit
6b1bdf6c7a6c87f12a247a125e25f8e721cc731e )
Co-authored-by: Krishna Chaitanya <141550576+XChaitanyaX@users.noreply.github.com>
Serhiy Storchaka [Mon, 17 Nov 2025 16:26:30 +0000 (18:26 +0200)]
[3.14] gh-130693: Add more tests for tkinter.Text.search() (GH-130848) (GH-141669)
Miss Islington (bot) [Mon, 17 Nov 2025 14:57:26 +0000 (15:57 +0100)]
[3.14] gh-130160: Add anchors to CLI Usage section for `cmdline` (GH-133182) (#141664)
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Miss Islington (bot) [Mon, 17 Nov 2025 14:38:00 +0000 (15:38 +0100)]
[3.14] fix memory order of `_Py_atomic_store_uint_release` (GH-141562) (GH-141663)
(cherry picked from commit
7800b78067162fc9d7cb6926f703fe14dee1702a )
Co-authored-by: SubbaraoGarlapati <53627478+SubbaraoGarlapati@users.noreply.github.com>
Miss Islington (bot) [Mon, 17 Nov 2025 13:02:03 +0000 (14:02 +0100)]
[3.14] gh-141650: Fix typo in `xml.sax.saxutils.unescape` documentation (GH-141652) (#141654)
Co-authored-by: Tamzin Hadasa Kelly <tk.infinity@gmail.com>
Miss Islington (bot) [Sun, 16 Nov 2025 22:22:11 +0000 (23:22 +0100)]
[3.14] gh-136057: Allow step and next to step over for loops (GH-136160) (#141640)
gh-136057: Allow step and next to step over for loops (GH-136160)
(cherry picked from commit
8be3b2f479431f670f2e81e41b52e698c0806289 )
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Gregory P. Smith [Sun, 16 Nov 2025 19:45:29 +0000 (11:45 -0800)]
[3.14] gh-137109: refactor warning about threads when forking (GH-141438) (GH-141614)
This splits the OS API specific functionality to get the number of threads out
from the fallback Python method and warning raising code itself. This way the
OS APIs can be queried before we've run
`os.register_at_fork(after_in_parent=...)` registered functions which
themselves may (re)start threads that would otherwise be detected.
This is best effort. If the OS APIs are either unavailable or fail, the
warning generating code still falls back to looking at the Python threading
state after the CPython interpreter world has been restarted and the
after_in_parent calls have been made. The common case for most Linux and macOS
environments should work today.
This also lines up with the existing TODO refactoring, we may choose to expose
this API to get the number of OS threads in the `os` module in the future.
Note: This is a simplified backport that maintains the void return type
for warn_about_fork_with_threads() and keeps PyErr_Clear() in the warning path,
as the error handling changes from
fd8f42d3d1 are not needed in 3.14.
Tian Gao [Sun, 16 Nov 2025 19:35:42 +0000 (11:35 -0800)]
[3.14] gh-125115 : Refactor the pdb parsing issue so positional arguments can pass through (GH-140933) (#141635)
(cherry-picked from commit
5348c200f5b26d6dd21d900b2b4cb684150d4b01 )
Miss Islington (bot) [Sun, 16 Nov 2025 19:31:25 +0000 (20:31 +0100)]
[3.14] gh-141004: Document missing `PyCFunction*` and `PyCMethod*` APIs (GH-141253) (GH-141637)
gh-141004: Document missing `PyCFunction*` and `PyCMethod*` APIs (GH-141253)
(cherry picked from commit
be699d6c7c8793d3eb464f2e5d3f10262fe3bc37 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Sun, 16 Nov 2025 18:56:41 +0000 (19:56 +0100)]
[3.14] gh-141004: Document the `PyPickleBuffer_*` C API (GH-141630) (GH-141632)
gh-141004: Document the `PyPickleBuffer_*` C API (GH-141630)
(cherry picked from commit
e33afa7ddbca3fca38f4ec4369b620c37cb092e2 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Sat, 15 Nov 2025 19:30:25 +0000 (20:30 +0100)]
[3.14] GH-141312: Allow only integers to longrangeiter_setstate state (GH-141317) (GH-141559)
This fixes an assertion error when the new computed start is not an integer.
(cherry picked from commit
10bec7c1eb3ee27f490a067426eef452b15f78f9 )
Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Sergey Miryanov [Sat, 15 Nov 2025 18:56:52 +0000 (23:56 +0500)]
[3.14] GH-141509: Fix warning about remaining subinterpreters (GH-141528) (GH-141566)
(cherry picked from commit
fa245df4a0848c15cf8d907c10fc92819994b866 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Sat, 15 Nov 2025 02:58:40 +0000 (03:58 +0100)]
[3.14] gh-140938: Raise ValueError for infinite inputs to stdev/pstdev (GH-141531) (#141575)
gh-140938: Raise ValueError for infinite inputs to stdev/pstdev (GH-141531)
Raise ValueError for infinite inputs to stdev/pstdev
(cherry picked from commit
f0a8bc737ab2f04d4196eee154cb1e17e26ad585 )
---
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Sat, 15 Nov 2025 02:49:54 +0000 (03:49 +0100)]
[3.14] gh-141579: Fix perf_jit backend in sys.activate_stack_trampoline() (GH-141580) (#141581)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Sat, 15 Nov 2025 01:25:19 +0000 (02:25 +0100)]
[3.14] gh-136442: Fix unittest to return exit code 5 when setUpClass raises an exception (GH-136487) (#141576)
gh-136442: Fix unittest to return exit code 5 when setUpClass raises an exception (GH-136487)
(cherry picked from commit
53d65c840e038ce9a5782fbd3da963c7aba90570 )
Co-authored-by: Takuya UESHIN <ueshin@happy-camper.st>
Gregory P. Smith [Fri, 14 Nov 2025 19:25:33 +0000 (11:25 -0800)]
[3.14] GH-139596: Cease caching config.cache & ccache in GH Actions (#141429)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Fri, 14 Nov 2025 18:38:30 +0000 (19:38 +0100)]
[3.14] gh-114203: skip locking if object is already locked by two-mutex critical section (GH-141476) (#141564)
gh-114203: skip locking if object is already locked by two-mutex critical section (GH-141476)
(cherry picked from commit
f26ed455d5582a7d66618acf2a93bc4b22a84b47 )
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miss Islington (bot) [Fri, 14 Nov 2025 16:27:33 +0000 (17:27 +0100)]
[3.14] gh-140691: urllib.request: Close FTP control socket if data socket can't connect (GH-140835) (GH-141555)
(cherry picked from commit
f2bce51b984f52db14d90f7bbd0b7df00b7c5637 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: codenamenam <bluetire27@gmail.com>
Miss Islington (bot) [Fri, 14 Nov 2025 15:32:05 +0000 (16:32 +0100)]
[3.14] gh-139344: Remove pending removal notice for undeprecated importlib.resources API (GH-141507) (GH-141558)
(cherry picked from commit
49e74210cb652d8bd538a4cc887f507396cfc893 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Fri, 14 Nov 2025 15:29:39 +0000 (16:29 +0100)]
Add PyManager troubleshooting steps for direct launch of script files (GH-141530)
(cherry picked from commit
b101e9d36b1aed2bb4bca8aec3e1cc1d1df4f79e )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Fri, 14 Nov 2025 11:26:37 +0000 (12:26 +0100)]
[3.14] gh-141004: Document `PyOS_InterruptOccurred` (GH-141526) (GH-141549)
gh-141004: Document `PyOS_InterruptOccurred` (GH-141526)
(cherry picked from commit
ef90261be508b97d682589aac8f00065a9585683 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Thu, 13 Nov 2025 21:26:58 +0000 (22:26 +0100)]
[3.14] gh-137969: Fix double evaluation of `ForwardRef`s which rely on globals (GH-140974) (#141527)
gh-137969: Fix double evaluation of `ForwardRef`s which rely on globals (GH-140974)
(cherry picked from commit
209eaff68c3b241c01aece14182cb9ced51526fc )
Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
Mikhail Efimov [Thu, 13 Nov 2025 18:47:25 +0000 (21:47 +0300)]
[3.14] gh-140104: Set next_instr properly in the JIT during exceptions (GH-140233) (GH-141495)
Miss Islington (bot) [Thu, 13 Nov 2025 18:05:09 +0000 (19:05 +0100)]
[3.14] gh-141004: Document `PyErr_RangedSyntaxLocationObject` (GH-141521) (#141525)
gh-141004: Document `PyErr_RangedSyntaxLocationObject` (GH-141521)
PyErr_RangedSyntaxLocationObject
(cherry picked from commit
196f1519cd2d8134d7643536f13f2b2844bea65d )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Mikhail Efimov [Thu, 13 Nov 2025 16:11:57 +0000 (19:11 +0300)]
[3.14] gh-140936: Fix JIT assertion crash at finalization if some generator is alive (GH-140969) (GH-141494)
gh-140936: Fix JIT assertion crash at finalization if some generator is alive (GH-140969)
Miss Islington (bot) [Thu, 13 Nov 2025 15:15:27 +0000 (16:15 +0100)]
[3.14] gh-141004: Document `PyCode_Optimize` (GH-141378) (GH-141514)
gh-141004: Document `PyCode_Optimize` (GH-141378)
(cherry picked from commit
d7862e9b1bd8f82e41c4f2c4dad31e15707d856f )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Thu, 13 Nov 2025 15:08:35 +0000 (16:08 +0100)]
[3.14] gh-141004: Document C APIs for dictionary keys, values, and items (GH-141009) (GH-141512)
gh-141004: Document C APIs for dictionary keys, values, and items (GH-141009)
(cherry picked from commit
f72768f30e6ed9253eb3b6374b4395dfcaf4842a )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Thu, 13 Nov 2025 12:58:37 +0000 (13:58 +0100)]
[3.14] gh-140748: socket_helper.transient_internet: Unwrap UrlError.__cause__ (GH-140749) (GH-141505)
(cherry picked from commit
75a1cbdd38b142b359849eae16a2ecc12f6b3881 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Thu, 13 Nov 2025 12:03:09 +0000 (13:03 +0100)]
[3.14] gh-140601: Refactor ElementTree.iterparse() tests (GH-141499) (GH-141502)
Split existing tests on smaller methods and move them to separate class.
Rename variable "content" to "it".
Use BytesIO instead of StringIO.
Add few more tests.
(cherry picked from commit
2fbd39666663cb5ca1c0e3021ce2e7bc72331020 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 13 Nov 2025 11:53:22 +0000 (12:53 +0100)]
[3.14] gh-140260: fix data race in `_struct` module initialization with subinterpreters (GH-140909) (#141501)
gh-140260: fix data race in `_struct` module initialization with subinterpreters (GH-140909)
(cherry picked from commit
63548b36998e7f7cd5c7c28b53b348a93f836737 )
Co-authored-by: Shamil <ashm.tech@proton.me>
Miss Islington (bot) [Thu, 13 Nov 2025 11:33:04 +0000 (12:33 +0100)]
[3.14] gh-103847: fix cancellation safety of `asyncio.create_subprocess_exec` (GH-140805) (#141446)
gh-103847: fix cancellation safety of `asyncio.create_subprocess_exec` (GH-140805)
(cherry picked from commit
ef474cfafbdf3aa383fb1334a7ab95cef9834ced )
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miss Islington (bot) [Wed, 12 Nov 2025 22:58:52 +0000 (23:58 +0100)]
[3.14] gh-141004: Document `PyRun_InteractiveOneObject` (GH-141405) (GH-141485)
gh-141004: Document `PyRun_InteractiveOneObject` (GH-141405)
(cherry picked from commit
26b7df2430cd5a9ee772bfa6ee03a73bd0b11619 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Wed, 12 Nov 2025 22:43:31 +0000 (23:43 +0100)]
[3.14] gh-124111: Fix TCL 9 thread detection (GH-141482)
(cherry picked from commit
dc0987080ed66c662e8e0b24cdb8c179817bd697 )
Co-authored-by: Michael Cho <michael@michaelcho.dev>
Miss Islington (bot) [Wed, 12 Nov 2025 22:15:34 +0000 (23:15 +0100)]
[3.14] gh-141442: Add escaping to iOS testbed arguments (GH-141443) (#141479)
Xcode concatenates the test argument array, losing quoting in the process.
(cherry picked from commit
558936bec1f1e0f8346063a8cb2b2782d085178e )
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Miss Islington (bot) [Wed, 12 Nov 2025 18:40:20 +0000 (19:40 +0100)]
[3.14] gh-141412: Use reliable target URL for urllib example (GH-141474)
The endpoint used for demonstrating reading URLs is no longer
stable. This change substitutes a target over which we have more
control.
(cherry picked from commit
fbcac799518e0cb29fcf5f84ed1fa001010b9073 )
Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
Miss Islington (bot) [Wed, 12 Nov 2025 17:02:38 +0000 (18:02 +0100)]
[3.14] gh-141004: Document `Py_MATH_{E, PI, TAU}` constants (GH-141373) (#141471)
gh-141004: Document `Py_MATH_{E, PI, TAU}` constants (GH-141373)
(cherry picked from commit
f1330b35b8eb43904dfed0656acde80c08d63176 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Wed, 12 Nov 2025 16:44:17 +0000 (17:44 +0100)]
[3.14] gh-141004: Document `PyType_SUPPORTS_WEAKREFS` (GH-141408) (GH-141470)
gh-141004: Document `PyType_SUPPORTS_WEAKREFS` (GH-141408)
(cherry picked from commit
9cd5427d9619b96db20d0347a136b3d331af71ae )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Wed, 12 Nov 2025 15:49:09 +0000 (16:49 +0100)]
[3.14] gh-132657: add regression test for `PySet_Contains` with unhashable type (GH-141411) (#141468)
gh-132657: add regression test for `PySet_Contains` with unhashable type (GH-141411)
(cherry picked from commit
2ac738d325a6934e39fecb097f43d4d4ed97a2b9 )
Co-authored-by: M Bussonnier <bussonniermatthias@gmail.com>
Mohsin Mehmood [Wed, 12 Nov 2025 10:40:02 +0000 (15:40 +0500)]
[3.14] gh-141314: Fix TextIOWrapper.tell() assertion failure with standalone carriage return (GH-141331) (GH-141453)
The assertion was checking wrong variable (skip_back vs skip_bytes).
(cherry picked from commit
af80fac42548719ede7241bfbab3c2c0775b4760 )
Miss Islington (bot) [Wed, 12 Nov 2025 10:33:34 +0000 (11:33 +0100)]
[3.14] gh-141042: fix sNaN's packing for mixed floating-point formats (GH-141107) (#141459)
gh-141042: fix sNaN's packing for mixed floating-point formats (GH-141107)
(cherry picked from commit
23d85a2a3fb029172ea15c6e596f64f8c2868ed3 )
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Miss Islington (bot) [Wed, 12 Nov 2025 10:23:26 +0000 (11:23 +0100)]
[3.14] gh-141311: Avoid assertion in BytesIO.readinto() (GH-141333) (GH-141457)
Fix error in assertion which causes failure if pos is equal to PY_SSIZE_T_MAX.
Fix undefined behavior in read() and readinto() if pos is larger that the size
of the underlying buffer.
(cherry picked from commit
7d54374f9c7d91e0ef90c4ad84baf10073cf1d8a )
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Miss Islington (bot) [Wed, 12 Nov 2025 09:56:47 +0000 (10:56 +0100)]
[3.14] gh-141370: document undefined behavior of Py_ABS() (GH-141439) (GH-141454)
(cherry picked from commit
20f53df07d42c495a08c73a3d54b8dd9098a62f0 )
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Peter Bierma [Wed, 12 Nov 2025 02:06:36 +0000 (21:06 -0500)]
[3.14] gh-141004: Document `PyBytes_Repr` and `PyBytes_DecodeEscape` (GH-141407) (GH-141440)
* gh-141004: Document `PyBytes_Repr` and `PyBytes_DecodeEscape` (GH-141407)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
(cherry picked from commit
37e2762ee12c2d7fc465938d7161a9a0640bd71f )
Miss Islington (bot) [Wed, 12 Nov 2025 01:33:49 +0000 (02:33 +0100)]
[3.14] GH-137618: Require Python 3.10 to Python 3.15 for PYTHON_FOR_REGEN (GH-137619) (#141437)
GH-137618: Require Python 3.10 to Python 3.15 for PYTHON_FOR_REGEN (GH-137619)
* Require Python 3.11 to Python 3.15 for PYTHON_FOR_REGEN
* NEWS
* keep allowing python 3.10
---------
(cherry picked from commit
9ce99c6c1901705238e4cb3ce81eb6f499e7b4f4 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Wed, 12 Nov 2025 00:58:15 +0000 (01:58 +0100)]
[3.14] gh-138621: Increase test coverage for csv.DictReader and csv.Sniffer (GH-138622) (#141436)
gh-138621: Increase test coverage for csv.DictReader and csv.Sniffer (GH-138622)
* Increase test coverage for csv.DictReader and csv.Sniffer
Previously there were no tests for the DictReader fieldnames
setter, the case where a StopIteration was encountered when trying
to determine the fieldnames from the content or the case where
Sniffer could not find a delimiter.
* Revert whitespace change to comment
* Add a test that csv.Sniffer.has_header checks up to 20 rows
* Replace name and age with letter and offset
* Address review comment
---------
(cherry picked from commit
0e88be6f55f35ab045e57f9f869b893c15dcc099 )
Co-authored-by: Jan-Eric Nitschke <47750513+JanEricNitschke@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Miss Islington (bot) [Wed, 12 Nov 2025 00:13:10 +0000 (01:13 +0100)]
[3.14] gh-137952: update `csv.Sniffer().has_header()` docs to describe the actual off-by-onish behavior (GH-137953) (#141434)
gh-137952: update `csv.Sniffer().has_header()` docs to describe the actual off-by-onish behavior (GH-137953)
* checks 21, not 20
* Say "header" instead of "first row" to disambiguate per review.
---------
(cherry picked from commit
0d7b48a8f5de5c1c6d57e1cf7194b6fb222d92e5 )
Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Wed, 12 Nov 2025 00:12:57 +0000 (01:12 +0100)]
[3.14] gh-138775: fix handle `python -m base64` stdin correct with EOF signal (GH-138776) (#141432)
gh-138775: fix handle `python -m base64` stdin correct with EOF signal (GH-138776)
* fix: handle stdin correct with EOF single.
* fix: flollow the comments when pipe stdin use buffer
* Apply suggestions from code review
* fix: apply review comments in Lib/base64.py
* fix: address comments
* Reword comment and NEWS entry.
---------
(cherry picked from commit
f5c2a41f9a6b3be95c5be9dbae0a4a3342d356dc )
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: yihong <zouzou0208@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>