]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 days ago[3.14] Fix parameter name of read_mime_types() in mimetypes docs (GH-153974) (#153978)
Miss Islington (bot) [Sat, 18 Jul 2026 16:48:44 +0000 (18:48 +0200)] 
[3.14] Fix parameter name of read_mime_types() in mimetypes docs (GH-153974) (#153978)

(cherry picked from commit c89b5effa11366e28cb4a290a302a534352b768f)

Co-authored-by: Raúl Santos Quirós <130504291+raul-sq@users.noreply.github.com>
5 days ago[3.14] Add test coverage to check execution of GetoptError.__str__ (GH-153941) (...
Miss Islington (bot) [Sat, 18 Jul 2026 15:34:41 +0000 (17:34 +0200)] 
[3.14] Add test coverage to check execution of GetoptError.__str__ (GH-153941) (#153998)

Add test coverage to check execution of GetoptError.__str__ (GH-153941)

* Increase test coverage of getopt to check execution of GetoptError.__str__

* Add test coverage to check execution of GetoptError.__str__

* Add test coverage to check execution of GetoptError.__str__

* Add test coverage to check execution of GetoptError.__str__

* Add test coverage to check execution of GetoptError.__str__

* Add test coverage to check execution of GetoptError.__str__
(cherry picked from commit 9adef68a7956744b804d09c8b8b06c8c171053e5)

Co-authored-by: Manith Hettiarachchilage <manithhetti@gmail.com>
5 days ago[3.14] gh-141004: Document unstable perf map functions in `ceval.h` (GH-143492) ...
Peter Bierma [Sat, 18 Jul 2026 15:10:05 +0000 (11:10 -0400)] 
[3.14] gh-141004: Document unstable perf map functions in `ceval.h` (GH-143492) (GH-153994)

(cherry picked from commit 6453065db9ff31e3f737240030f8311d2b087851)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
5 days ago[3.14] gh-141004: Document unstable executable kind macros from `pyframe.h` (GH-14349...
Peter Bierma [Sat, 18 Jul 2026 15:01:36 +0000 (11:01 -0400)] 
[3.14] gh-141004: Document unstable executable kind macros from `pyframe.h` (GH-143490) (GH-153991)

(cherry picked from commit dc62ba84ab2b83d70dee111d3feec1a6f1c3f69d)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
5 days ago[3.14] gh-141004: Document remaining `PyCF_*` compiler flag macros (GH-153958) (GH...
Miss Islington (bot) [Sat, 18 Jul 2026 14:49:50 +0000 (16:49 +0200)] 
[3.14] gh-141004: Document remaining `PyCF_*` compiler flag macros (GH-153958) (GH-153985)

(cherry picked from commit 0a772f2967c77a2137c45d7db1fcde9b71afacde)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
5 days ago[3.14] gh-71896: Add a docs warning about trailing newlines ignored by `difflib.HtmlD...
Miss Islington (bot) [Sat, 18 Jul 2026 14:11:27 +0000 (16:11 +0200)] 
[3.14] gh-71896: Add a docs warning about trailing newlines ignored by `difflib.HtmlDiff` (GH-153930) (GH-153966)

(cherry picked from commit 755d97167f6f5d4361c790f8f18df76cae8f2ad2)

Co-authored-by: Lenormand Julien <lenormand.julien0@gmail.com>
5 days ago[3.14] gh-153761: Fix asyncio sock_accept() dropping a connection when cancelled...
Miss Islington (bot) [Sat, 18 Jul 2026 14:05:44 +0000 (16:05 +0200)] 
[3.14] gh-153761: Fix asyncio sock_accept() dropping a connection when cancelled (GH-153762) (#153828)

gh-153761: Fix asyncio sock_accept() dropping a connection when cancelled (GH-153762)
(cherry picked from commit b090d06e7331c40b3c94e70b35a09f785b279e17)

Co-authored-by: Timofei <128279579+deadlovelll@users.noreply.github.com>
5 days ago[3.14] Docs: Fix typo in the pymanager command name (GH-153877) (GH-153961)
Miss Islington (bot) [Sat, 18 Jul 2026 13:35:02 +0000 (15:35 +0200)] 
[3.14] Docs: Fix typo in the pymanager command name (GH-153877) (GH-153961)

(cherry picked from commit 32cfc88d6a5561c510a0d7bb954251e39b598dd5)

Co-authored-by: Sam Katakouzinos <sam.katakouzinos@gmail.com>
5 days ago[3.14] gh-122102: Fix/improve docs of descriptor-related tools in `inspect` (GH-153949)
Miss Islington (bot) [Sat, 18 Jul 2026 13:31:43 +0000 (15:31 +0200)] 
[3.14] gh-122102: Fix/improve docs of descriptor-related tools in `inspect` (GH-153949)

(cherry picked from commit 87f8fc8e00704396a0c598c8843cdde373c0ea4c)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 days ago[3.14] gh-153908: Fix data race in `itertools.count.__repr__` (GH-153917) (GH-153952)
Miss Islington (bot) [Sat, 18 Jul 2026 13:29:04 +0000 (15:29 +0200)] 
[3.14] gh-153908: Fix data race in `itertools.count.__repr__` (GH-153917) (GH-153952)

(cherry picked from commit 5200f1192428becab0c31db98e7baa97f3c3c3e2)

Co-authored-by: John <me@joh.ng>
5 days ago[3.14] Test `calendar.February` deprecation (GH-153893) (#153920)
Miss Islington (bot) [Sat, 18 Jul 2026 13:09:29 +0000 (15:09 +0200)] 
[3.14] Test `calendar.February` deprecation (GH-153893) (#153920)

Test `calendar.February` deprecation (GH-153893)

Calendar related tests now check if both deprecated constants surface the proper warnings.

* extended `test_deprecation_warning` to check `constants.February` as well
(cherry picked from commit 31c81e6ee3b1c874a807ea161182b83c6c607713)

Co-authored-by: vjabuilds <77214151+vjabuilds@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
5 days ago[3.14] gh-153934: Correct documented parameter in `calendar.weekheader` from `n`...
Miss Islington (bot) [Sat, 18 Jul 2026 12:52:54 +0000 (14:52 +0200)] 
[3.14] gh-153934: Correct documented parameter in `calendar.weekheader` from `n` to `width` (GH-153942) (GH-153944)

(cherry picked from commit 7486c7b3df7ff26ac23390947102f2604f55243a)

Co-authored-by: Marta <marta.podziewska@gmail.com>
5 days ago[3.14] gh-153926: Fix documented parameter name for `calendar.calendar` and `calendar...
Miss Islington (bot) [Sat, 18 Jul 2026 12:52:23 +0000 (14:52 +0200)] 
[3.14] gh-153926: Fix documented parameter name for `calendar.calendar` and `calendar.prcal` (GH-153927) (#153938)

gh-153926: Fix documented parameter name for `calendar.calendar` and `calendar.prcal` (GH-153927)

gh-153926: Fix documented parameter name for calendar.calendar and calendar.prcal

calendar.calendar() and calendar.prcal() are bound methods of the
module's TextCalendar instance, whose first parameter is named theyear,
but the documentation named it year, so the documented keyword raised
TypeError. Update the documentation to match the real signature, which
also matches the sibling month() and prmonth() functions.
(cherry picked from commit d12434b4661c6be7430002e66a54d920f7d4ca7f)

Co-authored-by: Vyron Vasileiadis <hi@fedonman.com>
5 days ago[3.14] gh-153808: Replace obsolete 'condition list' verbiage with 'expression list...
Miss Islington (bot) [Sat, 18 Jul 2026 11:49:18 +0000 (13:49 +0200)] 
[3.14] gh-153808: Replace obsolete 'condition list' verbiage with 'expression list' in eval() docs (GH-153924)

(cherry picked from commit c5e97ed6351766deff488ea6d95e4aa0853943ae)

Co-authored-by: palakkhinvasara <109575264+palakkhinvasara@users.noreply.github.com>
5 days ago[3.14] Fix punctuation in `Doc/library/concurrent.interpreters.rst` (GH-153894) ...
Miss Islington (bot) [Sat, 18 Jul 2026 10:46:07 +0000 (12:46 +0200)] 
[3.14] Fix punctuation in `Doc/library/concurrent.interpreters.rst` (GH-153894) (#153916)

Fix punctuation in `Doc/library/concurrent.interpreters.rst` (GH-153894)
(cherry picked from commit 6ebb22cb83d8ce05f7136166d1674d0a14a29459)

Co-authored-by: Raúl Santos Quirós <130504291+raul-sq@users.noreply.github.com>
5 days ago[3.14] gh-153899: Fix documented parameter names for `filecmp.cmpfiles` (GH-153900...
Miss Islington (bot) [Sat, 18 Jul 2026 10:42:20 +0000 (12:42 +0200)] 
[3.14] gh-153899: Fix documented parameter names for `filecmp.cmpfiles` (GH-153900) (#153911)

gh-153899: Fix documented parameter names for `filecmp.cmpfiles` (GH-153900)

Update the `filecmp.cmpfiles()` docs to match its actual signature.
(cherry picked from commit 26e7c4fe3f68668abbc96fc4ac57c2d5ef8048b5)

Co-authored-by: Vyron Vasileiadis <hi@fedonman.com>
6 days ago[3.14] gh-150583: Fix zstd compression level with digested ZstdDict (GH-150586) ...
Miss Islington (bot) [Sat, 18 Jul 2026 07:21:38 +0000 (09:21 +0200)] 
[3.14] gh-150583: Fix zstd compression level with digested ZstdDict (GH-150586) (#153884)

gh-150583: Fix zstd compression level with digested ZstdDict (GH-150586)
(cherry picked from commit 0983642c966d9c536416101e99b7d2b085483847)

Co-authored-by: Rogdham <3994389+Rogdham@users.noreply.github.com>
6 days ago[3.14] gh-124111: Update macOS installer to use Tcl/Tk 9.0.4. (GH-153868) (#153870)
Miss Islington (bot) [Fri, 17 Jul 2026 22:36:17 +0000 (00:36 +0200)] 
[3.14] gh-124111: Update macOS installer to use Tcl/Tk 9.0.4. (GH-153868) (#153870)

(cherry picked from commit d478cf81f770168e3fb512ce110a88774f04f549)
Co-authored-by: Ned Deily <nad@python.org>
6 days ago[3.14] gh-123471: Free-threading fixes for itertools (GH-131212) (GH-132814) (GH...
Neil Schemenauer [Fri, 17 Jul 2026 20:20:36 +0000 (13:20 -0700)] 
[3.14] gh-123471: Free-threading fixes for itertools (GH-131212) (GH-132814) (GH-135689) (GH-144402) (GH-146033) (GH-142957) (GH-153791)

Combined backport of PRs from main branch, fixing free-threading data-races in itertools:

* gh-123471: make concurrent iteration over `itertools.cycle` safe under free-threading (gh-131212)
* gh-123471: Make itertools.product and itertools.combinations thread-safe (GH-132814)
* gh-123471: Make itertools.chain thread-safe (gh-135689)
* gh-123471: Make concurrent iteration over `itertools.permutations` and `itertools.combinations_with_replacement` thread-safe (gh-144402)
* gh-123471: make concurrent iteration over itertools.accumulate thread-safe (gh-144486)
* gh-123471: Make `itertools.zip_longest` safe in the FT build (gh-146033)

(cherry picked from commit 26a1cd4e8c0c9ea1a6683abd82547ddee656ff3d)
(cherry picked from commit 847d1c2cb4014f122df64e0db0b3b554c01779c6)
(cherry picked from commit 0533c1faf27d1e50b062bb623dfad93288757f57)
(cherry picked from commit 009c8c052f5eb9f869c09029724ef194d8c161ca)
(cherry picked from commit 3a248564470075cb8c7b8a75fe7ba61f7ea341b2)
(cherry picked from commit 9214e3f33eeeb0ee862777378f98fdeb7b6944c6)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
6 days ago[3.14] gh-151644: Fix data race in sys.setdlopenflags/getdlopenflags under free-threa...
Miss Islington (bot) [Fri, 17 Jul 2026 20:13:30 +0000 (22:13 +0200)] 
[3.14] gh-151644: Fix data race in sys.setdlopenflags/getdlopenflags under free-threading (gh-151768) (gh-153789)

In free-threading builds, concurrent calls to sys.getdlopenflags() and
sys.setdlopenflags() race on interp->imports.dlopenflags.  Fix by
using FT_ATOMIC_LOAD_INT_RELAXED / FT_ATOMIC_STORE_INT_RELAXED in
_PyImport_GetDLOpenFlags and _PyImport_SetDLOpenFlags, consistent with
how analogous interpreter-state integer fields (lazy_imports_mode,
pystats_enabled) are protected.

Relaxed ordering is correct here: dlopenflags is a standalone config
integer with no ordering relationship to other memory.

(cherry picked from commit cde31ec135905472f1137dddcc8227af2430d89c)

Co-authored-by: Jiucheng(Oliver) <git.jiucheng@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
6 days ago[3.14] gh-150411: fix `gc_generation.count` race in free-threading (GH-150413) (GH...
Miss Islington (bot) [Fri, 17 Jul 2026 20:12:12 +0000 (22:12 +0200)] 
[3.14] gh-150411: fix `gc_generation.count` race in free-threading (GH-150413) (GH-153787)

(cherry picked from commit 12af26d17e4343c1f4ea3a1019bcc34ee76671c3)

Co-authored-by: Edward Xu <xuxiangad@gmail.com>
6 days ago[3.14] gh-149816: Fix UAF in Modules/_pickle.c (GH-150024) (GH-153719)
Neil Schemenauer [Fri, 17 Jul 2026 20:09:29 +0000 (13:09 -0700)] 
[3.14] gh-149816: Fix UAF in Modules/_pickle.c (GH-150024) (GH-153719)

(cherry picked from commit d095ceb0f420a22353271a8adaf5a83433d018e5)

Co-authored-by: Alexey Katsman <alex2007508@gmail.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
6 days ago[3.14] gh-144774: Add critical section in `BaseException.__setstate__` (GH-150578...
Neil Schemenauer [Fri, 17 Jul 2026 20:08:26 +0000 (13:08 -0700)] 
[3.14] gh-144774: Add critical section in `BaseException.__setstate__` (GH-150578) (GH-153819)

(cherry picked from commit f586fd9e304e6747fdebe2477355beb059724571)

Co-authored-by: Brij Kapadia <97006829+brijkapadia@users.noreply.github.com>
6 days ago[3.14] gh-153853: Fix parameter name of calendar.setfirstweekday() in docs (GH-153851...
Miss Islington (bot) [Fri, 17 Jul 2026 18:59:14 +0000 (20:59 +0200)] 
[3.14] gh-153853: Fix parameter name of calendar.setfirstweekday() in docs (GH-153851) (#153860)

gh-153853: Fix parameter name of calendar.setfirstweekday() in docs (GH-153851)
(cherry picked from commit 1736526023a3e616d1530815880bb3b28e3433c3)

Co-authored-by: Ibrahim Shaqqou <101660458+IbrahimShaqqou@users.noreply.github.com>
6 days ago[3.14] Shut down leaked executors in `test_interpreter_pool` (GH-153780) (#153848)
Miss Islington (bot) [Fri, 17 Jul 2026 15:46:52 +0000 (17:46 +0200)] 
[3.14] Shut down leaked executors in `test_interpreter_pool` (GH-153780) (#153848)

(cherry picked from commit 8ca85b5bc5a888b8329915aff0ceb34de9373546)

Co-authored-by: Stan Ulbrych <stan@python.org>
7 days ago[3.14] gh-85943: Fix BytesWarning in the struct format cache under -bb (GH-153627...
Miss Islington (bot) [Fri, 17 Jul 2026 08:16:34 +0000 (10:16 +0200)] 
[3.14] gh-85943: Fix BytesWarning in the struct format cache under -bb (GH-153627) (GH-153835)

Normalize bytes format strings to str before using them as the cache key,
so that equal str and bytes formats no longer collide and get compared.
(cherry picked from commit 190d2ffbb969ad571fd12d4988b37519091194d5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7 days ago[3.14] gh-153404: Silently ignore non-decimal digits in robots.txt Crawl-delay and...
Miss Islington (bot) [Fri, 17 Jul 2026 06:23:28 +0000 (08:23 +0200)] 
[3.14] gh-153404: Silently ignore non-decimal digits in robots.txt Crawl-delay and Request-rate (GH-153405) (GH-153831)

str.isdigit() returned True for non-decimal Unicode digits such as
U+00B2 SUPERSCRIPT TWO, which int() then rejected with ValueError.
(cherry picked from commit 597ec2d7e5f8bbd5a1eb9e6780444cae46cec3ea)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
7 days ago[3.14] gh-145521: Add 'infer_variance' parameter to ParamSpec class (GH-145522) ...
Jelle Zijlstra [Fri, 17 Jul 2026 02:50:00 +0000 (19:50 -0700)] 
[3.14] gh-145521: Add 'infer_variance' parameter to ParamSpec class (GH-145522) (#153824)

(cherry picked from commit 2e94f14310e8ab62f41dd01276f2c69cb3d36da2)

Co-authored-by: Kai (Kazuya Ito) <kazya.ito.dream@gmail.com>
7 days ago[3.14] gh-149162: Use _Py_LOCK_DONT_DETACH in intern_common (gh-149164) (gh-153815)
Neil Schemenauer [Thu, 16 Jul 2026 18:59:10 +0000 (11:59 -0700)] 
[3.14] gh-149162: Use _Py_LOCK_DONT_DETACH in intern_common (gh-149164) (gh-153815)

Avoids potential deadlocks with C++ static local initialization in
extensions that call PyUnicode_InternFromString during one-time
initialization.

(cherry picked from commit f62050d65743f0c895f7e6d665936c4e86aa39d5)

Co-authored-by: Sam Gross <colesbury@gmail.com>
8 days ago[3.14] gh-153630: Add `str.remove{prefix,suffix}()` to the `str` method summary ...
Miss Islington (bot) [Wed, 15 Jul 2026 18:13:38 +0000 (20:13 +0200)] 
[3.14] gh-153630: Add `str.remove{prefix,suffix}()` to the `str` method summary (GH-153629) (#153779)

(cherry picked from commit b4662e8e3b60a264486130a171047c7381f993f0)

Co-authored-by: darida12321 <73121369+darida12321@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
8 days ago[3.14] gh-153550: Modernize the older prose sections of the tkinter documentation...
Miss Islington (bot) [Wed, 15 Jul 2026 16:27:21 +0000 (18:27 +0200)] 
[3.14] gh-153550: Modernize the older prose sections of the tkinter documentation (GH-153647) (GH-153774)

Refresh the narrative "Tkinter life preserver" and "Handy reference"
sections to match the overhauled reference (gh-86726 and gh-153549).

* Rework "The packer" into a general "Geometry management" section
  covering grid, pack and place, and cross-link it with the Grid, Pack
  and Place reference classes.
* Rework "The window manager" and "Coupling widget variables", replacing
  the dated App(Frame) examples with direct Tk() and ttk examples.
* Replace page-number citations to Ousterhout's book with links to the
  relevant Tk man pages.
* Modernize the tkinter.ttk front matter and its Tcl/Tk links, and add
  cross-references between the two documents.
* Reconcile the "Packer options" and "Tk option data types" lists with
  the reference, and fill in the empty Entry index list.
* Fix the malformed target-selection list in tkinter.dnd.
(cherry picked from commit 93beea7e5a3c5a03253e6812a06f2497505aeb30)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8 days ago[3.14] Docs: fill in descriptor C API docs (GH-146644) (GH-153760)
Boy Steven [Wed, 15 Jul 2026 11:31:06 +0000 (18:31 +0700)] 
[3.14] Docs: fill in descriptor C API docs (GH-146644) (GH-153760)

8 days ago[3.14] gh-89554: Document standard type objects in types as classes (GH-150676) ...
Serhiy Storchaka [Wed, 15 Jul 2026 11:23:22 +0000 (14:23 +0300)] 
[3.14] gh-89554: Document standard type objects in types as classes (GH-150676) (GH-153757)

Use the directive and the role "class" instead of "data" for classes
exposed in the types module.

(cherry picked from commit bc055444e4ade9e210139d07200f602a4a9feb67)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
9 days ago[3.14] gh-71086: Document negative offset support in struct.pack_into() and unpack_fr...
Serhiy Storchaka [Wed, 15 Jul 2026 09:52:24 +0000 (12:52 +0300)] 
[3.14] gh-71086: Document negative offset support in struct.pack_into() and unpack_from() (GH-153650) (GH-153753)

(cherry picked from commit 1706d14a2a1f009f786b8d7599e53c168b0392e0)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9 days ago[3.14] gh-93417: Improve test_mimetypes (GH-150725) (GH-153749)
Serhiy Storchaka [Wed, 15 Jul 2026 09:12:38 +0000 (12:12 +0300)] 
[3.14] gh-93417: Improve test_mimetypes (GH-150725) (GH-153749)

* Separate tests for module-level API and for the MimeTypes class.
* Add tests for mimetypes.init() and MimeTypes() with knownfiles and with
  explicitly passed files.

(cherry picked from commit b23646adf1f484d6ee61ea04529b48443508715a)

9 days ago[3.14] gh-87904: Document curses classes (GH-151643) (GH-153751)
Serhiy Storchaka [Wed, 15 Jul 2026 09:08:35 +0000 (12:08 +0300)] 
[3.14] gh-87904: Document curses classes (GH-151643) (GH-153751)

Document the panel class and its error exception in curses.panel.rst,
using the real lowercase panel name.

(cherry picked from commit 560ff8e2021d818555884622f6865f4a0d60756f)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9 days ago[3.14] gh-153716: Harden ttk/tkinter GUI tests against display scaling (GH-153717...
Miss Islington (bot) [Wed, 15 Jul 2026 03:33:49 +0000 (05:33 +0200)] 
[3.14] gh-153716: Harden ttk/tkinter GUI tests against display scaling (GH-153717) (GH-153738)

Compute probe coordinates from each widget's own realized geometry
instead of hardcoding pixels such as (5, 5) or width - 5, which land on
a different element, or miss it entirely, at a high display scaling.
(cherry picked from commit 87411d0742f070b1424c08b41cf3af49d377b215)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9 days ago[3.14] Remove duplicate button_ok code in idlelib.textview (GH-153733) (#153735)
Miss Islington (bot) [Wed, 15 Jul 2026 03:31:05 +0000 (05:31 +0200)] 
[3.14] Remove duplicate button_ok code in idlelib.textview (GH-153733) (#153735)

Remove duplicate button_ok code in idlelib.textview (GH-153733)
(cherry picked from commit c5530cc836595aed61cbd0504c92e4d8fb996ed0)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
9 days ago[3.14] gh-153313: Run Emscripten PyRepl test in CI (GH-153701) (#153728)
Miss Islington (bot) [Wed, 15 Jul 2026 01:42:54 +0000 (03:42 +0200)] 
[3.14] gh-153313: Run Emscripten PyRepl test in CI (GH-153701) (#153728)

Adds the PyRepl test to the Github CI configuration for Emscripten.
(cherry picked from commit 1b3914ab3d29bba00effe3d58145498efcbeca93)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
9 days ago[3.14] gh-153695: Fix sqlite3.Row.__hash__ with an unhashable value (GH-153696) ...
Miss Islington (bot) [Tue, 14 Jul 2026 22:49:09 +0000 (00:49 +0200)] 
[3.14] gh-153695: Fix sqlite3.Row.__hash__ with an unhashable value (GH-153696) (#153724)

gh-153695: Fix sqlite3.Row.__hash__ with an unhashable value (GH-153696)
(cherry picked from commit b704b647b2295924ebaf8d20ddf88925095039bb)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
9 days ago[3.14] gh-148488: Clarify the company/tag separator in the py -V docs (GH-153427...
Miss Islington (bot) [Tue, 14 Jul 2026 21:39:50 +0000 (23:39 +0200)] 
[3.14] gh-148488: Clarify the company/tag separator in the py -V docs (GH-153427) (GH-153722)

gh-148488: Clarify the company/tag separator in the py -V docs (GH-153427)
(cherry picked from commit 54976e1482578d742d4e611741a7995650e8ae6b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
9 days ago[3.14] gh-151912: Fix segfault in `type()` with NULL `tp_new` metaclasses (GH-151916...
Miss Islington (bot) [Tue, 14 Jul 2026 16:46:33 +0000 (18:46 +0200)] 
[3.14] gh-151912: Fix segfault in `type()` with NULL `tp_new` metaclasses (GH-151916) (#153705)

gh-151912: Fix segfault in `type()` with NULL `tp_new` metaclasses (GH-151916)
(cherry picked from commit f160f16373f9ea3f636bc5cd6fb4be7e150bb27f)

Co-authored-by: Santhosh .I 🦇 <santhoshilaiyaraja2006@gmail.com>
10 days ago[3.14] gh-71019: document which objects connect_read_pipe/connect_write_pipe accept...
Kumar Aditya [Tue, 14 Jul 2026 08:22:43 +0000 (13:52 +0530)] 
[3.14] gh-71019: document which objects connect_read_pipe/connect_write_pipe accept and add tests (GH-153660) (#153686)

gh-71019: document which objects connect_read_pipe/connect_write_pipe accept and add tests (GH-153660)

(cherry picked from commit 7fb315b0cd53277c6191b4bfd8019f999d49f1f0)

10 days ago[3.14] gh-153658: Fix sqlite3 iterdump() for table names containing a single quote...
Miss Islington (bot) [Tue, 14 Jul 2026 07:43:50 +0000 (09:43 +0200)] 
[3.14] gh-153658: Fix sqlite3 iterdump() for table names containing a single quote (GH-153659) (#153683)

(cherry picked from commit 2fc3c4d47dff722758c76686f657d5ecdd922551)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
10 days ago[3.14] gh-153631: Move to `macos-26` runner for iOS (GH-153632) (#153674)
Russell Keith-Magee [Tue, 14 Jul 2026 04:59:00 +0000 (12:59 +0800)] 
[3.14] gh-153631: Move to `macos-26` runner for iOS (GH-153632) (#153674)

Switches iOS CI to use the macos-26 runner, and makes a small change to the iOS
build script to improve build stability. xcodebuild doesn't guarantee that the
CoreSimulatorService is running before starting a simulator. If the service
isn't running, xcodebuild reports that no simulators are available, and fails to
start the test app. However, simctl blocks until the simulator is available, and
simctl is used to evaluate the default simulator. So - the iOS build script now
unconditionally determines the default simulator, even if a specific simulator
is requested.
(cherry picked from commit 2dc1a91af801ea896e21f6c6e6cc41f57e8268d9)

11 days ago[3.14] gh-89696: Fix `loop.sock_connect` docs on address resolution (GH-153651) ...
Miss Islington (bot) [Mon, 13 Jul 2026 10:10:10 +0000 (12:10 +0200)] 
[3.14] gh-89696: Fix `loop.sock_connect` docs on address resolution (GH-153651) (#153653)

gh-89696: Fix `loop.sock_connect` docs on address resolution (GH-153651)
(cherry picked from commit 1fece4457032382947c7c2a5c9e95dc106ca7a7d)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
11 days ago[3.14] gh-148286: Fix UB in `ZstdDecompressor.unused_data` when a frame is decompress...
Stan Ulbrych [Mon, 13 Jul 2026 07:31:44 +0000 (09:31 +0200)] 
[3.14] gh-148286: Fix UB in `ZstdDecompressor.unused_data` when a frame is decompressed in one call (GH-153258) (#153645)

(cherry picked from commit adebb68153346043c0671fa5725d269c32cc40e4)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
11 days ago[3.14] gh-153037: Make ZstdFile.__next__ raise io.UnsupportedOperation on non-readabl...
Miss Islington (bot) [Mon, 13 Jul 2026 02:51:30 +0000 (04:51 +0200)] 
[3.14] gh-153037: Make ZstdFile.__next__ raise io.UnsupportedOperation on non-readable files (GH-153045) (#153639)

gh-153037: Make ZstdFile.__next__ raise io.UnsupportedOperation on non-readable files (GH-153045)

Make `ZstdFile.__next__` raise `io.UnsupportedOperation` on non-readable files, consistent with other compression modules.
(cherry picked from commit ed716551e13d1e46a5cd17955657d64b8824626a)

Co-authored-by: Łukasz <lukaszlapinski7@gmail.com>
11 days ago[3.14] gh-90431: Document cancellation behavior of asyncio.wait() and asyncio.as_comp...
Miss Islington (bot) [Sun, 12 Jul 2026 11:01:38 +0000 (13:01 +0200)] 
[3.14] gh-90431: Document cancellation behavior of asyncio.wait() and asyncio.as_completed() (GH-153616) (#153618)

gh-90431: Document cancellation behavior of asyncio.wait() and asyncio.as_completed() (GH-153616)
(cherry picked from commit dd2faeb33d5fa0d2635b91ece6eaebd34c61408c)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
12 days ago[3.14] gh-152132: Close stderr_copy in test_api.test_run (GH-153591) (#153596)
Miss Islington (bot) [Sat, 11 Jul 2026 22:21:06 +0000 (00:21 +0200)] 
[3.14] gh-152132: Close stderr_copy in test_api.test_run (GH-153591) (#153596)

gh-152132: Close stderr_copy in test_api.test_run (GH-153591)

Previously, the test was leaking a file descriptor.
(cherry picked from commit 0023d5b23df09f18425fea9b9c54a37ba050d5cf)

Co-authored-by: Victor Stinner <vstinner@python.org>
12 days ago[3.14] gh-102591: Document that urlcleanup resets the global opener (GH-153562) ...
Miss Islington (bot) [Sat, 11 Jul 2026 21:20:42 +0000 (23:20 +0200)] 
[3.14] gh-102591: Document that urlcleanup resets the global opener (GH-153562) (#153589)

gh-102591: Document that urlcleanup resets the global opener (GH-153562)
(cherry picked from commit bbd1f2f9e0354f91c5d3c4eb3eb53657265dcc77)

Co-authored-by: Taeknology <20297177+Taeknology@users.noreply.github.com>
Co-authored-by: Senthil Kumaran <senthil@python.org>
12 days ago[3.14] gh-152614: Add raises to `QueueShutDown` in `asyncio.Queue.put_no_wait` and...
Miss Islington (bot) [Sat, 11 Jul 2026 12:45:48 +0000 (14:45 +0200)] 
[3.14] gh-152614: Add raises to `QueueShutDown` in `asyncio.Queue.put_no_wait` and `asyncio.Queue.get_nowait` documentation methods (GH-152681) (#153566)

gh-152614: Add raises to `QueueShutDown` in `asyncio.Queue.put_no_wait` and `asyncio.Queue.get_nowait` documentation methods (GH-152681)
(cherry picked from commit d1a5b54abaca2b443c7642ef3a7be8e1cd077ae3)

Co-authored-by: Duprat <yduprat@gmail.com>
13 days ago[3.14] gh-86726: Note that the ttk Treeview separator column option needs Tk 9.0...
Miss Islington (bot) [Sat, 11 Jul 2026 10:18:07 +0000 (12:18 +0200)] 
[3.14] gh-86726: Note that the ttk Treeview separator column option needs Tk 9.0 (GH-153556) (GH-153559)

(cherry picked from commit 9ca892717eaa66f3fba231f00dc5bce355f6f34c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
13 days ago[3.14] gh-86726: Fix and improve tkinter documentation and docstrings (GH-153549...
Miss Islington (bot) [Sat, 11 Jul 2026 10:12:23 +0000 (12:12 +0200)] 
[3.14] gh-86726: Fix and improve tkinter documentation and docstrings (GH-153549) (GH-153552)

Correct inaccurate return-type and option descriptions in the tkinter
reference, and add missing module and class docstrings.
(cherry picked from commit 77cb7560c07feed0d5b144c0c1735e1620c96f51)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
13 days ago[3.14] gh-126877: Fix the configure check for Tcl/Tk with optimizing compilers (GH...
Miss Islington (bot) [Sat, 11 Jul 2026 10:08:13 +0000 (12:08 +0200)] 
[3.14] gh-126877: Fix the configure check for Tcl/Tk with optimizing compilers (GH-153543) (GH-153554)

The check assigned the addresses of Tcl_Init() and Tk_Init() to unused
variables, which optimizing compilers can eliminate, so it linked even
when the libraries were missing.  Call the functions instead.
(cherry picked from commit ff0a9ae269fa38c21f01bdea1a7ff5d439c4f681)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
13 days ago[3.14] gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717)...
Victor Stinner [Sat, 11 Jul 2026 09:47:03 +0000 (11:47 +0200)] 
[3.14] gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717) (#153416) (#153526)

* [3.15] gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717) (#153416)

gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717)

* Replace "ubuntu-24.04" with "ubuntu-26.04" on most jobs.
* Replace "ubuntu-latest" with "ubuntu-26.04" for Cross build Linux.
* Replace "ubuntu-latest" with "ubuntu-slim" for small workloads.
* Update ".github/actionlint.yaml" to allow "ubuntu-26.04"
  and "ubuntu-26.04-arm" images.

Backport changes:

* Keep Ubuntu 24.04 and llvm.sh to install LLVM 19 and LLVM 20.
* WASI uses ubuntu-26.04, not ubuntu-26.04-arm.

(cherry picked from commit 4c79929705eb31959a6f4071cc34583de0737a28)

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

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
13 days ago[3.14] gh-88647: Fix tkinter config() docs for synonym options (GH-153544) (GH-153546)
Miss Islington (bot) [Sat, 11 Jul 2026 08:21:57 +0000 (10:21 +0200)] 
[3.14] gh-88647: Fix tkinter config() docs for synonym options (GH-153544) (GH-153546)

(cherry picked from commit d52cfd2a0ec4423ed94bda640deefdfcf053bd8e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
13 days ago[3.14] gh-153380: Adapt ttk tests to Tk 9.1 changes (GH-153381) (GH-153387)
Miss Islington (bot) [Fri, 10 Jul 2026 19:40:02 +0000 (21:40 +0200)] 
[3.14] gh-153380: Adapt ttk tests to Tk 9.1 changes (GH-153381) (GH-153387)

- selectmode: new 'single' and 'multiple' modes
- set(): includes the tree column '#0'
- insert()/selection(): item ids keep the passed value's type
- heading_callback: avoid a double click on the second click
- theme_create_image: don't assert the exact (now scaled) width
(cherry picked from commit d6855c8ad00ffa2bee318b510d0e90573dddbbab)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
13 days ago[3.14] gh-152216: Update bundled expat to 2.8.2 (GH-152234) (#153525)
Miss Islington (bot) [Fri, 10 Jul 2026 19:10:09 +0000 (21:10 +0200)] 
[3.14] gh-152216: Update bundled expat to 2.8.2 (GH-152234) (#153525)

gh-152216: Update bundled expat to 2.8.2 (GH-152234)

* Update bundled expat to 2.8.2
* `make regen-sbom`
* Update download URL
* Drop warnings (yay!)
(cherry picked from commit c22e9c9daef4d97a3fdf1d41a119947ed46ad937)

Co-authored-by: Stan Ulbrych <stan@python.org>
13 days ago[3.14] gh-151213: Remove remaining `--retries` refs from 3.14 asyncio tools docs...
Bartosz Sławecki [Fri, 10 Jul 2026 16:59:54 +0000 (18:59 +0200)] 
[3.14] gh-151213: Remove remaining `--retries` refs from 3.14 asyncio tools docs (GH-153492)

13 days ago[3.14] gh-151213: Fix asyncio tools permission requirements link (GH-153493) (GH...
Miss Islington (bot) [Fri, 10 Jul 2026 16:55:41 +0000 (18:55 +0200)] 
[3.14] gh-151213: Fix asyncio tools permission requirements link (GH-153493) (GH-153519)

(cherry picked from commit b276b88e385d7785bfc11d87fa56163e984ba699)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
13 days ago[3.14] gh-153062: Fix a crash iterating itertools.tee on the free-threaded build...
Neil Schemenauer [Fri, 10 Jul 2026 16:47:33 +0000 (09:47 -0700)] 
[3.14] gh-153062: Fix a crash iterating itertools.tee on the free-threaded build (gh-153063) (gh-153476)

itertools.tee branches share a linked list of teedataobject cells.  On the free-threaded build, iterating one branch from multiple threads, or iterating sibling branches concurrently, raced on the shared cells and each branch's position, corrupting refcounts and crashing.

Lock each teedataobject while reading, extending, or clearing it, and snapshot each branch's position under the tee object's own lock, revalidating before advancing, so the two locks are never nested.  Concurrent iteration of one tee is undefined and may raise RuntimeError as documented, but no longer crashes.

The free-threading snapshot and revalidation add per-element overhead on the default build, where the GIL already serializes access. Guard that path under Py_GIL_DISABLED so the default build keeps the original iteration and the free-threaded path is unchanged.

(cherry picked from commit 6c389c446e487bcb9d09e85de30aa42052990f1c)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
13 days ago[3.14] gh-153438: Update NuGet download URL (GH-153482) (GH-153510)
Miss Islington (bot) [Fri, 10 Jul 2026 12:36:38 +0000 (14:36 +0200)] 
[3.14] gh-153438: Update NuGet download URL (GH-153482) (GH-153510)

gh-153438: Update NuGet download URL (GH-153482)
(cherry picked from commit 106eb532ea3b243423e62a702719e9d3c0e40c16)

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
13 days ago[3.14] gh-153444: Fix compile warning in `Modules/_interpchannelsmodule.c` (GH-153445...
Miss Islington (bot) [Fri, 10 Jul 2026 11:36:20 +0000 (13:36 +0200)] 
[3.14] gh-153444: Fix compile warning in `Modules/_interpchannelsmodule.c` (GH-153445) (#153448)

gh-153444: Fix compile warning in `Modules/_interpchannelsmodule.c` (GH-153445)
(cherry picked from commit 33678dc79f00059aff09ac88f188ef2192031a85)

Co-authored-by: sobolevn <mail@sobolevn.me>
13 days ago[3.14] gh-151942: Fix all Sphinx nitpicks in the Python 2.4 What's New (GH-153116...
Miss Islington (bot) [Fri, 10 Jul 2026 10:43:26 +0000 (12:43 +0200)] 
[3.14] gh-151942: Fix all Sphinx nitpicks in the Python 2.4 What's New (GH-153116) (#153505)

(cherry picked from commit fc9fe142f8af744870d3535ce8ab561e8a390edd)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.14] gh-151942: Fix all Sphinx nitpicks in the 2.5 What's New (GH-153120) (#153500)
Miss Islington (bot) [Fri, 10 Jul 2026 10:35:21 +0000 (12:35 +0200)] 
[3.14] gh-151942: Fix all Sphinx nitpicks in the 2.5 What's New (GH-153120) (#153500)

(cherry picked from commit fb00514a1a3ab0eda80dce493a3cc3eeaaefe032)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.14] gh-143750: Compile OpenSSL with TSan for TSan CI (#153316) (#153355)
Kumar Aditya [Fri, 10 Jul 2026 07:27:50 +0000 (12:57 +0530)] 
[3.14] gh-143750: Compile OpenSSL with TSan for TSan CI (#153316) (#153355)

Compile OpenSSL with TSan in the TSan CI job so that data races between
Python code and OpenSSL internals are visible to the sanitizer.

Also skip test_ssl_in_multiple_threads under TSan: concurrent calls to
SSLContext.load_cert_chain on the same context race on the SSL_CTX
default password callback. The race is fixed in 3.15+ (GH-143818), but
with TSan-instrumented OpenSSL it is now reported on 3.14.

(cherry picked from commit fc19ad7b8b08c43667c9087d89f32f08830544ce)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2 weeks ago[3.14] gh-152132: Test Py_CompileString() in test_capi.test_run (#153470) (#153473)
Victor Stinner [Fri, 10 Jul 2026 02:08:14 +0000 (04:08 +0200)] 
[3.14] gh-152132: Test Py_CompileString() in test_capi.test_run (#153470) (#153473)

gh-152132: Test Py_CompileString() in test_capi.test_run (#153470)

PyRun functions now raises ValueError if the start argument is
invalid.

Add Modules/_testlimitedcapi/run.c.

(cherry picked from commit d83d26724b8c3be5f535e56ded88593cc6803b86)

2 weeks ago[3.14] gh-152132: Fix bugs in Py_RunMain() (GH-153461) (GH-153466) (#153467)
Miss Islington (bot) [Fri, 10 Jul 2026 01:19:43 +0000 (03:19 +0200)] 
[3.14] gh-152132: Fix bugs in Py_RunMain() (GH-153461) (GH-153466) (#153467)

[3.15] gh-152132: Fix bugs in Py_RunMain() (GH-153461) (GH-153466)

* Check for signals more often. Previously, a pending exception could
  be removed by PyErr_Clear().
* Only call _PyInterpreterState_SetNotRunningMain() if
  _PyInterpreterState_SetRunningMain() has been called.
* Convert _PyPathConfig_UpdateGlobal() PyStatus error to an
  exception.
(cherry picked from commit cecafebc2e30ab2aac5f046ed5c9fbc75d6bfb51)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.14] gh-153406: Raise ValueError, not OverflowError, for out-of-range dates in...
Miss Islington (bot) [Thu, 9 Jul 2026 19:53:49 +0000 (21:53 +0200)] 
[3.14] gh-153406: Raise ValueError, not OverflowError, for out-of-range dates in email.utils.parsedate_to_datetime (GH-153407) (#153434)

email.utils.parsedate_to_datetime documented that it raises ValueError for an invalid date, but it leaked OverflowError when the parsed year or timezone offset was too large for the datetime and timedelta constructors, and that OverflowError also escaped the modern header parsing path since DateHeader.parse only caught ValueError. Wrap the datetime and timezone construction so an OverflowError is re-raised as a ValueError with the original chained as the cause, which restores the documented contract and lets the existing header handler record an InvalidDateDefect instead of raising.
(cherry picked from commit 37a26b9b94b147b5d683bfce0ef5a4c2fbc21085)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
2 weeks ago[3.14] gh-152132: Fix Py_RunMain() to return an exit code (#153446) (#153455)
Victor Stinner [Thu, 9 Jul 2026 19:37:45 +0000 (21:37 +0200)] 
[3.14] gh-152132: Fix Py_RunMain() to return an exit code (#153446) (#153455)

gh-152132: Fix Py_RunMain() to return an exit code (#153446)

* Fix Py_RunMain() to return an exit code, rather than calling
  Py_Exit(), when running a script, a command, or the REPL.
* _PyRun_SimpleFile() now logs errors to stderr, for example if setting
  __main__.__file__ fails.
* Add tests on Py_RunMain() exitcode.
* Rename functions:

  * _PyRun_SimpleStringFlagsWithName() => _PyRun_SimpleString()
  * _PyRun_SimpleFileObject() => _PyRun_SimpleFile()
  * _PyRun_AnyFileObject() => _PyRun_AnyFile()
  * _PyRun_InteractiveLoopObject() => _PyRun_InteractiveLoop()

* Change _PyRun_SimpleString(), _PyRun_SimpleFile(), _PyRun_AnyFile() and
  _PyRun_InteractiveLoop() return type to PyObject*.
* pymain_repl() now displays the error if PySys_Audit() or
  import _pyrepl failed.
* PyRun_SimpleFileExFlags() and PyRun_AnyFileExFlags() now log
  PyUnicode_DecodeFSDefault() error. So these functions can no longer
  return -1 with an exception set.

(cherry picked from commit fac72f1ee91fb380640a4c4be6df07a8f02d3110)

2 weeks ago[3.14] gh-146531: Broaden `wm_iconbitmap` skip on macOS 26 Intel (GH-153348) (#153451)
Miss Islington (bot) [Thu, 9 Jul 2026 18:51:21 +0000 (20:51 +0200)] 
[3.14] gh-146531: Broaden `wm_iconbitmap` skip on macOS 26 Intel (GH-153348) (#153451)

gh-146531: Broaden `wm_iconbitmap` skip on macOS 26 Intel (GH-153348)
(cherry picked from commit 6ba3ad55bd922f164acf8f20b884730b718ee433)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.14] gh-153422: Assert bool return type in tkinter tests (GH-153429) (GH-153439...
Miss Islington (bot) [Thu, 9 Jul 2026 15:45:11 +0000 (17:45 +0200)] 
[3.14] gh-153422: Assert bool return type in tkinter tests (GH-153429) (GH-153439) (GH-153442)

The tests for PhotoImage.transparency_get(), Text.debug() and
Treeview.exists() now assert the exact bool type, and the documentation
and docstrings use "true"/"false" instead of "1"/"0".
(cherry picked from commit 1604c80008d72b4c9a5bd789900ecf9aff402c1e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.14] gh-153417: Fix BytesWarning in imaplib error messages for bytes arguments...
Miss Islington (bot) [Thu, 9 Jul 2026 14:31:25 +0000 (16:31 +0200)] 
[3.14] gh-153417: Fix BytesWarning in imaplib error messages for bytes arguments (GH-153423) (GH-153431)

IMAP4.select() and IMAP4.uid() formatted the mailbox and command argument
with %s in their error messages, which raised BytesWarning under -bb when the
argument was bytes and masked the real error.  Use %r instead, which is safe
for bytes and also quotes the value.
(cherry picked from commit 11f1b70f4c981b781aaa94427dc1fceb637b2187)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.14] gh-152132: Test all PyRun functions in test_capi.test_run (GH-153352) (#153412)
Miss Islington (bot) [Thu, 9 Jul 2026 11:18:23 +0000 (13:18 +0200)] 
[3.14] gh-152132: Test all PyRun functions in test_capi.test_run (GH-153352) (#153412)

gh-152132: Test all PyRun functions in test_capi.test_run (GH-153352)

PyRun_InteractiveOneObjectEx() now raises TypeError if the second
parameter type is not str.
(cherry picked from commit cd9994e2831ea743e5423c1db56ca2ca42154e0a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.14] gh-69134: Harden NotebookTest.test_traversal (GH-153403) (GH-153409)
Miss Islington (bot) [Thu, 9 Jul 2026 10:21:42 +0000 (12:21 +0200)] 
[3.14] gh-69134: Harden NotebookTest.test_traversal (GH-153403) (GH-153409)

identify(5, 5) could run before the notebook reached its requested size,
so the pixel fell outside the first tab and returned ''.  Guard it with a
new opt-in wait_until_mapped(full_size=True).
(cherry picked from commit 53b04980284b668c27fc6d5adb0de19d38efe95b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.14] gh-151213: Remove 3.15+ asyncio tools flag from 3.14 docs (GH-151392) (#153399)
Bartosz Sławecki [Thu, 9 Jul 2026 09:17:09 +0000 (11:17 +0200)] 
[3.14] gh-151213: Remove 3.15+ asyncio tools flag from 3.14 docs (GH-151392) (#153399)

2 weeks ago[3.14] gh-151640: Track sharing of `BytesIO` buffer in free-threaded builds (GH-15165...
Peter Bierma [Thu, 9 Jul 2026 06:24:45 +0000 (02:24 -0400)] 
[3.14] gh-151640: Track sharing of `BytesIO` buffer in free-threaded builds (GH-151651) (gh-153153)

(cherry picked from commit 881a13a97c7a29b9de57913c773cd5f195270fbd)

Remove peek() call and call BytesIO class directly, fixes test for Python 3.14.

Co-authored-by: Pedram Karimi <147748351+pedramkarimii@users.noreply.github.com>
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2 weeks ago[3.14] gh-130578: clarify urllib.parse.quote parameter defaults behavior (GH-130598...
Miss Islington (bot) [Thu, 9 Jul 2026 05:19:50 +0000 (07:19 +0200)] 
[3.14] gh-130578: clarify urllib.parse.quote parameter defaults behavior (GH-130598) (#153384)

gh-130578: clarify urllib.parse.quote parameter defaults behavior (GH-130598)
(cherry picked from commit bc9bb7386597e22693662f489a7474998788e228)

Co-authored-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.14] gh-47005: fix do_open() to let regular headers override unredirected … (GH...
Miss Islington (bot) [Thu, 9 Jul 2026 04:33:56 +0000 (06:33 +0200)] 
[3.14] gh-47005: fix do_open() to let regular headers override unredirected … (GH-146506) (#153378)

gh-47005: fix do_open() to let regular headers override unredirected … (GH-146506)

AbstractHTTPHandler.do_open() was building the request header dict by
starting with unredirected_hdrs and only inserting regular headers that
were not already present, giving unredirected headers priority.  This
contradicts get_header() and header_items(), both of which give regular
headers the higher priority.

Fix by unconditionally updating with req.headers so that a header set
via add_header() always overrides one set via add_unredirected_header().

---------
(cherry picked from commit 6d386684ad69f42cb57c72fe0e0ffcec82ec7e12)

Co-authored-by: CHINMAY <89741289+Das-Chinmay@users.noreply.github.com>
Co-authored-by: Senthil Kumaran <senthil@python.org>
2 weeks ago[3.14] gh-151213: Document asyncio debugging tools (GH-151392) (#153371)
Miss Islington (bot) [Wed, 8 Jul 2026 23:23:35 +0000 (01:23 +0200)] 
[3.14] gh-151213: Document asyncio debugging tools (GH-151392) (#153371)

gh-151213: Document asyncio debugging tools (GH-151392)
(cherry picked from commit b2d8db1ac818e74ffe666146335e9e6c7f1f3f56)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 weeks ago[3.14] gh-153056: Fix a data race compiling the string.Template pattern in free-threa...
Miss Islington (bot) [Wed, 8 Jul 2026 21:43:54 +0000 (23:43 +0200)] 
[3.14] gh-153056: Fix a data race compiling the string.Template pattern in free-threading builds (GH-153057) (#153303)

gh-153056: Fix a data race compiling the string.Template pattern in free-threading builds (GH-153057)

* gh-153056: Fix a data race compiling the string.Template pattern in free-threading builds

Template compiles its substitution pattern lazily and caches it on the class.  On the free-threaded build two concurrent first uses could race: a thread that observed the pattern another thread had just compiled would try to recompile it, and re.compile() rejects flags on an already-compiled pattern, raising a spurious ValueError.  Return the already-compiled pattern instead.

As a side effect, a subclass that supplies an already-compiled pattern now works too; previously it raised the same ValueError at class definition.

* Trim test comments and NEWS wording

* Document that the pattern attribute accepts a string or a compiled regex

* Comment the three states of pattern and note the documented-behavior fix in NEWS

* Update Doc/library/string.rst

---------
(cherry picked from commit 45729033bff28f8abc36c42e802cb2853c205737)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Barry Warsaw <barry@python.org>
2 weeks ago[3.14] gh-153300: Set global configuration variables in PyConfig_Set() (#153301)...
Victor Stinner [Wed, 8 Jul 2026 18:20:45 +0000 (20:20 +0200)] 
[3.14] gh-153300: Set global configuration variables in PyConfig_Set() (#153301) (#153359)

gh-153300: Set global configuration variables in PyConfig_Set() (#153301)

PyConfig_Set() now also set global configuration variables. For
example, PyConfig_Set("inspect", value) now also sets Py_InspectFlag.

Use PyConfig_Set() in main.c to set the inspect flag. Python code can
now see the updated sys.flags.inspect value.

(cherry picked from commit 9fb713f1b8b774c789db007e3824c766a626ccff)

2 weeks ago[3.14] gh-150191: temporarily skip two openssl tests which have internal data races...
Miss Islington (bot) [Wed, 8 Jul 2026 16:27:06 +0000 (18:27 +0200)] 
[3.14] gh-150191: temporarily skip two openssl tests which have internal data races under TSAN (GH-153320) (#153349)

gh-150191: temporarily skip two openssl tests which have internal data races under TSAN (GH-153320)
(cherry picked from commit c11af48fddb1fd5b38e2f026c333e8487f3bcc53)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks ago[3.14] gh-153298: Fix data race in `GenericAlias` parameter initialization on FT...
Miss Islington (bot) [Wed, 8 Jul 2026 15:21:55 +0000 (17:21 +0200)] 
[3.14] gh-153298: Fix data race in `GenericAlias` parameter initialization on FT (GH-153318) (#153346)

gh-153298: Fix data race in `GenericAlias` parameter initialization on FT (GH-153318)
(cherry picked from commit 68abf17fa926db94dc17f01a7095bdcee2a52314)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.14] gh-153083: Defer GC tracking of an array to the end of construction. (gh-15328...
Donghee Na [Wed, 8 Jul 2026 13:59:03 +0000 (22:59 +0900)] 
[3.14] gh-153083: Defer GC tracking of an array to the end of construction. (gh-153284) (gh-153337)

(cherry picked from commit 8615062fd580934fc431746f64b1ac7ee6ef8e88)

2 weeks ago[3.14] gh-145098: Use `macos-26[-intel]` instead of `macos-15[-intel]` in `{jit,tail...
Miss Islington (bot) [Wed, 8 Jul 2026 13:44:17 +0000 (15:44 +0200)] 
[3.14] gh-145098: Use `macos-26[-intel]` instead of `macos-15[-intel]` in `{jit,tail-call}.yml` (GH-153194) (#153327)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.14] gh-143990: Preserve the size when creating a Font from a named font (GH-153267...
Miss Islington (bot) [Wed, 8 Jul 2026 13:29:05 +0000 (15:29 +0200)] 
[3.14] gh-143990: Preserve the size when creating a Font from a named font (GH-153267) (GH-153323) (GH-153341)

tkinter.font.Font now copies the options of a named font (via "font
configure") instead of the options resolved by "font actual", which
would resolve a size specified in pixels (a negative size) to points.
A font description is still resolved, as it cannot be parsed otherwise.

Font.copy(), which has always been equivalent to constructing a Font
from the original font, is updated to match and now preserves the size
too.

(cherry picked from commit 45010f441d392558f1be8f3cea7d86954ed2217d)
(cherry picked from commit a9d4473232f86d6dfc234756f633b8dc5836ad32)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.14] gh-88574: Do not swallow the line after a terminating literal in imaplib ...
Miss Islington (bot) [Wed, 8 Jul 2026 12:12:22 +0000 (14:12 +0200)] 
[3.14] gh-88574: Do not swallow the line after a terminating literal in imaplib (GH-153317) (GH-153325)

GH-152751 skipped a spurious blank line after a literal unconditionally,
corrupting a response that ends with a literal (such as a mailbox name
returned by LIST): its empty trailer was mistaken for the blank and the
following line was swallowed.

The blank is now skipped only inside an unclosed parenthesis.  After a
literal that ends the response it instead arrives before the next
response and is skipped there.
(cherry picked from commit 6b81784f57c6e7ddef61c8db26bb896b3633dcae)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.14] gh-86017: Document displayof for Font.actual() and clarify Font.copy() (GH...
Miss Islington (bot) [Wed, 8 Jul 2026 12:08:28 +0000 (14:08 +0200)] 
[3.14] gh-86017: Document displayof for Font.actual() and clarify Font.copy() (GH-153288) (GH-153330)

Explain the displayof argument of tkinter.font.Font.actual() and describe
what Font.copy() returns, including for a wrapped font description.
(cherry picked from commit fa5eafd19c3d395b4498e21b4e1b8faac2ebdb0a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.14] gh-152157: Reject empty fractions in `_datetime.{date}time.fromisoformat`...
tonghuaroot (童话) [Wed, 8 Jul 2026 10:37:11 +0000 (18:37 +0800)] 
[3.14] gh-152157: Reject empty fractions in `_datetime.{date}time.fromisoformat` (GH-152161) (#152765)

(cherry picked from commit 112c69a0514902af2d2f7d0503de6690ca59a10f)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.14] gh-153292: Fix data race in `threading.RLock.__repr__` in FT builds (GH-153299...
Miss Islington (bot) [Wed, 8 Jul 2026 10:10:36 +0000 (12:10 +0200)] 
[3.14] gh-153292: Fix data race in `threading.RLock.__repr__` in FT builds (GH-153299) (#153315)

gh-153292: Fix data race in `threading.RLock.__repr__` in FT builds (GH-153299)
(cherry picked from commit 1051384fcdfa88dd88d66dfc93b60aec9ca1ad2e)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.14] gh-150191: Avoid data race in test_sni_callback_race (GH-150193) (#153270)
Miss Islington (bot) [Wed, 8 Jul 2026 09:11:33 +0000 (11:11 +0200)] 
[3.14] gh-150191: Avoid data race in test_sni_callback_race (GH-150193) (#153270)

gh-150191: Avoid data race in test_sni_callback_race (GH-150193)
(cherry picked from commit fd9d8c3c66fc147cac6024c63b8c109d65e3aec8)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2 weeks ago[3.14] gh-153252: Fix error handling in `_PyCompile_CodeGen` (GH-153253) (#153282)
Miss Islington (bot) [Tue, 7 Jul 2026 18:02:59 +0000 (20:02 +0200)] 
[3.14] gh-153252: Fix error handling in `_PyCompile_CodeGen` (GH-153253) (#153282)

gh-153252: Fix error handling in `_PyCompile_CodeGen` (GH-153253)
(cherry picked from commit a74280e6696125acb7628facc577d0f975c4d69e)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.14] gh-153210: Restore accidental `array.ArrayType` removal (GH-153261) (#153275)
Miss Islington (bot) [Tue, 7 Jul 2026 17:24:07 +0000 (19:24 +0200)] 
[3.14] gh-153210: Restore accidental `array.ArrayType` removal (GH-153261) (#153275)

gh-153210: Restore accidental `array.ArrayType` removal (GH-153261)
(cherry picked from commit ac2e14b4e29b2d11a14d289969cfffc298ea75d9)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.14] gh-143921: Reject NUL, CR and LF in IMAP commands (GH-143922, GH-153067) ...
Serhiy Storchaka [Tue, 7 Jul 2026 17:13:02 +0000 (20:13 +0300)] 
[3.14] gh-143921: Reject NUL, CR and LF in IMAP commands (GH-143922, GH-153067) (GH-153137)

Combined backport of GH-143922, which rejected all control characters,
and GH-153067, which narrowed the check to NUL, CR and LF.  Other
control characters are valid in quoted strings and are sent quoted.

(cherry picked from commit 6262704b134db2a4ba12e85ecfbd968534f28b45)
(cherry picked from commit d0921efb665aff26b378f495e5ff84f7e3fe649d)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago[3.14] gh-83274: Don't crash when a Tcl interpreter is deallocated in the wrong threa...
Serhiy Storchaka [Tue, 7 Jul 2026 16:57:19 +0000 (19:57 +0300)] 
[3.14] gh-83274: Don't crash when a Tcl interpreter is deallocated in the wrong thread (GH-152323) (GH-153277)

Deallocating the interpreter from a thread other than the one it was created
in ran Tcl_DeleteInterp() there, which makes Tcl abort the process
("Tcl_AsyncDelete: async handler deleted by the wrong thread").

Tkapp_Dealloc() now leaks the interpreter in that case and reports a
RuntimeWarning instead.

(cherry picked from commit 46d1809ccd4bc0e1439a4696b428d2a1c2edcfbf)

Co-authored-by: E. Paine <63801254+E-Paine@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.14] gh-153205: Set `MemoryError` in stackref array conversion (GH-153206) (#153273)
Miss Islington (bot) [Tue, 7 Jul 2026 16:32:27 +0000 (18:32 +0200)] 
[3.14] gh-153205: Set `MemoryError` in stackref array conversion (GH-153206) (#153273)

gh-153205: Set `MemoryError` in stackref array conversion (GH-153206)
(cherry picked from commit 08759ff1015552d58c1f6ffa13ea08b0ae32e6c0)

Co-authored-by: An Long <aisk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.14] gh-153210: Fix `array` module import crash under a memory pressure (GH-153238...
Miss Islington (bot) [Tue, 7 Jul 2026 12:36:50 +0000 (14:36 +0200)] 
[3.14] gh-153210: Fix `array` module import crash under a memory pressure (GH-153238) (#153250)

gh-153210: Fix `array` module import crash under a memory pressure (GH-153238)
(cherry picked from commit 12ed8b16feb3502cea427ff846e9d0b3d7fef721)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.14] Use `soft-deprecated` in more places (GH-148769) (#152938)
Stan Ulbrych [Tue, 7 Jul 2026 12:01:13 +0000 (14:01 +0200)] 
[3.14] Use `soft-deprecated` in more places (GH-148769) (#152938)

(cherry picked from commit 3fd61b74de97b152ed424aaea1295292dcb181fd)