]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 hours ago[3.15] gh-50948: IDLE: Warn if saving a file will overwrite a newer version (GH-17578... 3.15
Miss Islington (bot) [Sat, 6 Jun 2026 21:11:55 +0000 (23:11 +0200)] 
[3.15] gh-50948: IDLE: Warn if saving a file will overwrite a newer version (GH-17578) (GH-151026)

(cherry picked from commit 69851a64076cc240513b834d87d654064f7ac597)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Guilherme Polo <ggpolo@gmail.com>
Co-authored-by: Priya Pappachan <priyapappachan010@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 hours ago[3.15] gh-149083: Use sentinel for urllib.parse._UNSPECIFIED (GH-149612) (#151017)
Miss Islington (bot) [Sat, 6 Jun 2026 13:13:52 +0000 (15:13 +0200)] 
[3.15] gh-149083: Use sentinel for urllib.parse._UNSPECIFIED (GH-149612) (#151017)

This was added in 3.15; let's use a real sentinel instead of an ad-hoc list object.
(cherry picked from commit 884ac3e3ec02347301939ff1f124972d4973f015)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
12 hours ago[3.15] gh-150662: Stop unbounded memory growth in Tachyon `--gecko` collector (GH...
Miss Islington (bot) [Sat, 6 Jun 2026 12:45:53 +0000 (14:45 +0200)] 
[3.15] gh-150662: Stop unbounded memory growth in Tachyon `--gecko` collector (GH-150845) (#151000)

13 hours ago[3.15] Doc: fix order of PyLong_FromUnsignedLongLong (GH-150937) (GH-151012)
Miss Islington (bot) [Sat, 6 Jun 2026 12:06:37 +0000 (14:06 +0200)] 
[3.15] Doc: fix order of PyLong_FromUnsignedLongLong (GH-150937) (GH-151012)

(cherry picked from commit 4833b2031edc97a79f44afacd2a8f40f51a9b2c5)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
13 hours ago[3.15] Delete mention encoding and errors for importlib.resources.path() (GH-143111...
Miss Islington (bot) [Sat, 6 Jun 2026 11:59:53 +0000 (13:59 +0200)] 
[3.15] Delete mention encoding and errors for importlib.resources.path() (GH-143111) (GH-151014)

(cherry picked from commit fded34d6fe8c300f5625b7fddb86a4c56ecc35c5)

Co-authored-by: Alexander Shadchin <shadchin@yandex-team.com>
14 hours ago[3.15] gh-149835: Use realpath() instead of abspath() in shutil.move() (GH-149986...
Miss Islington (bot) [Sat, 6 Jun 2026 10:29:57 +0000 (12:29 +0200)] 
[3.15] gh-149835: Use realpath() instead of abspath() in shutil.move() (GH-149986) (GH-151009)

(cherry picked from commit fab449bddbc4ff03677d49448cf6ea1f9d6a319f)

Co-authored-by: Thomas Kowalski <thom.kowa@gmail.com>
22 hours ago[3.15] gh-150207: Raise MemoryError on tokenizer allocation failure instead of crashi...
Miss Islington (bot) [Sat, 6 Jun 2026 02:46:55 +0000 (04:46 +0200)] 
[3.15] gh-150207: Raise MemoryError on tokenizer allocation failure instead of crashing (GH-150275) (#150996)

gh-150207: Raise MemoryError on tokenizer allocation failure instead of crashing (GH-150275)
(cherry picked from commit 262625fa30e5a1b5cf33c9dbce5d2b713093c7be)

Co-authored-by: Grant Herman <grantlouisherman041@gmail.com>
26 hours ago[3.15] Use `time.monotonic` in OrderedDict LRU cache example (GH-150986) (#150991)
Miss Islington (bot) [Fri, 5 Jun 2026 22:59:30 +0000 (00:59 +0200)] 
[3.15] Use `time.monotonic` in OrderedDict LRU cache example (GH-150986) (#150991)

Use `time.monotonic` in OrderedDict LRU cache example (GH-150986)
(cherry picked from commit ea4c85552bb7883e1d6c808281c1f46aca86aeab)

Co-authored-by: Ilya Nikolaev <65247719+ilya-nikolaev@users.noreply.github.com>
33 hours ago[3.15] gh-149977: Fix extra output of `-m test test_lazy_import`, again (GH-150965...
Miss Islington (bot) [Fri, 5 Jun 2026 15:46:57 +0000 (17:46 +0200)] 
[3.15] gh-149977: Fix extra output of `-m test test_lazy_import`, again (GH-150965) (#150975)

gh-149977: Fix extra output of `-m test test_lazy_import`, again (GH-150965)
(cherry picked from commit 9b4090c48e0b5e51f15ca0c52f7c173de71e3ba6)

Co-authored-by: sobolevn <mail@sobolevn.me>
35 hours ago[3.15] gh-146527: Fix memory leak in _PyGC_Fini() (GH-150969) (#150970)
Miss Islington (bot) [Fri, 5 Jun 2026 14:11:37 +0000 (16:11 +0200)] 
[3.15] gh-146527: Fix memory leak in _PyGC_Fini() (GH-150969) (#150970)

gh-146527: Fix memory leak in _PyGC_Fini() (GH-150969)

Free generation_stats allocated by _PyGC_Init().

Fix Python/gc.c: Python/gc_free_threading.c was already fixed.
(cherry picked from commit 0036565e81b9580d645862bcc6249e2ae4f1fd03)

Co-authored-by: Victor Stinner <vstinner@python.org>
36 hours ago[3.15] gh-53144: Improve charset support in the email package (GH-149942) (GH-150967)
Miss Islington (bot) [Fri, 5 Jun 2026 13:22:33 +0000 (15:22 +0200)] 
[3.15] gh-53144: Improve charset support in the email package (GH-149942) (GH-150967)

Defer to the codecs module for all aliases.
Use MIME/IANA names for all IANA registered charsets.
Fix email.contentmanager.set_text_content().
(cherry picked from commit c195a046f81d986dce22743d85e2500fe282e8a9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
36 hours ago[3.15] gh-149891: Add more encoding aliases (GH-149892) (GH-150961)
Miss Islington (bot) [Fri, 5 Jun 2026 12:45:22 +0000 (14:45 +0200)] 
[3.15] gh-149891: Add more encoding aliases (GH-149892) (GH-150961)

Support all aliases officially registered in IANA, except
Extended_UNIX_Code_Packed_Format_for_Japanese.

New names:
KSC_5601, KS_C_5601-1989, iso-ir-149, GB_2312-80, windows-936, mac,
CCSID00858, CCSID01140, and a number of "cs"-prefixed names.

Fix csHPRoman8, which was not normalized.
(cherry picked from commit 49f4ecfb08e6192ddc9f782553c775ccbdc2dfdb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
36 hours ago[3.15] gh-150907: Fix dynamic_annotations.h when built with C++ and Valgrind (GH...
Miss Islington (bot) [Fri, 5 Jun 2026 12:41:19 +0000 (14:41 +0200)] 
[3.15] gh-150907: Fix dynamic_annotations.h when built with C++ and Valgrind (GH-150914) (#150962)

gh-150907: Fix dynamic_annotations.h when built with C++ and Valgrind (GH-150914)

Add extern "C++" scope for the C++ template.

Fix test_cppext when Python is built with --with-valgrind.
(cherry picked from commit c32501261aeeb0cc1ad1c53b6be9790ff1d23215)

Co-authored-by: Victor Stinner <vstinner@python.org>
37 hours ago[3.15] gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328) ...
Miss Islington (bot) [Fri, 5 Jun 2026 12:09:13 +0000 (14:09 +0200)] 
[3.15] gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328) (#150957)

gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328)

Update `RawIOBase` and `FileIO` documentation to match implementation
behavior around `.read`, `.readinto`, `.readall` and `.write`.

In particular:

 - They may make more than one system call (PEP-475)
 - Add warnings if `.write()` requires a wrapping retry loop (see: gh-126606)
    - "Raw I/O" `.write`` may not write all bytes
    - `buffering=0` example results in a "Raw I/O"
(cherry picked from commit e4db68b9c990ed1bb7562094bee2e73f4450d42b)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
37 hours ago[3.15] gh-62825: Fix encoding aliases "KS_C_5601-1987", "KS X 1001", etc (GH-150933...
Miss Islington (bot) [Fri, 5 Jun 2026 11:41:22 +0000 (13:41 +0200)] 
[3.15] gh-62825: Fix encoding aliases "KS_C_5601-1987", "KS X 1001", etc (GH-150933) (GH-150946)

They are now aliases of CP949 instead of EUC-KR.
(cherry picked from commit 45562c6f4f469e278a9c03c31c2cdadf8100d101)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
40 hours ago[3.15] gh-150899: Do not reset custom `-Xlazy_imports` mode in `test_lazy_imports...
sobolevn [Fri, 5 Jun 2026 08:43:27 +0000 (11:43 +0300)] 
[3.15] gh-150899: Do not reset custom `-Xlazy_imports` mode in `test_lazy_imports` (GH-150900) (#150947)

(cherry picked from commit 2f064fbc0b427f0e1c83fe9b9036531ed16e95e8)

42 hours ago[3.15] gh-145177: Bump emscripten version to 4.0.19 (GH-150926) (#150939)
Miss Islington (bot) [Fri, 5 Jun 2026 06:25:21 +0000 (08:25 +0200)] 
[3.15] gh-145177: Bump emscripten version to 4.0.19 (GH-150926) (#150939)

Bumps the emscripten version to 4.0.19.
(cherry picked from commit c83d3d789eec9db1fc5ce00d1a320afe20d725fa)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2 days ago[3.15] Add shebang documentation for PyManager 26.3b1 (GH-150931)
Miss Islington (bot) [Thu, 4 Jun 2026 20:45:28 +0000 (22:45 +0200)] 
[3.15] Add shebang documentation for PyManager 26.3b1 (GH-150931)

(cherry picked from commit e28a2f493044ecfc0f76fe78ff6dde8e395504a9)

Co-authored-by: Steve Dower <steve.dower@python.org>
2 days ago[3.15] gh-150913: Fix sqlite3.Blob validation for empty slice assignment (GH-150915...
Miss Islington (bot) [Thu, 4 Jun 2026 14:10:30 +0000 (16:10 +0200)] 
[3.15] gh-150913: Fix sqlite3.Blob validation for empty slice assignment (GH-150915) (GH-150923)

ass_subscript_slice() returned early when the computed slice length
was zero, bypassing validation performed for non-empty slices.
(cherry picked from commit fc9c4db1302f8be7527e70cf0938b629985a1d72)

Co-authored-by: Jiseok CHOI <jiseok.dev@gmail.com>
2 days ago[3.15] gh-150750: Fix a race condition in `deque.index` with free-threading (GH-15077...
Miss Islington (bot) [Thu, 4 Jun 2026 13:58:59 +0000 (15:58 +0200)] 
[3.15] gh-150750: Fix a race condition in `deque.index` with free-threading (GH-150779) (#150920)

gh-150750: Fix a race condition in `deque.index` with free-threading (GH-150779)
(cherry picked from commit d83d50b5b735cb58e175280d1c27d40c43d535b5)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 days ago[3.15] gh-106318: Add doctest role and a 'See also' to the `str.split()` docs (GH...
Miss Islington (bot) [Thu, 4 Jun 2026 13:23:33 +0000 (15:23 +0200)] 
[3.15] gh-106318: Add doctest role and a 'See also' to the `str.split()` docs (GH-144367)

(cherry picked from commit a96cba5c4aa3cf859a9cacab590fc1a51d6efbbb)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2 days ago[3.15] Fix 2 broken links in documentation (GH-150892)
Miss Islington (bot) [Thu, 4 Jun 2026 09:51:34 +0000 (11:51 +0200)] 
[3.15] Fix 2 broken links in documentation (GH-150892)

(cherry picked from commit cb064e746de210fea8639b986c8d2a573b71c48f)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 days ago[3.15] Correct Stable ABI documentation for METH_FASTCALL (GH-149593) (GH-150853)
Miss Islington (bot) [Thu, 4 Jun 2026 09:50:39 +0000 (11:50 +0200)] 
[3.15] Correct Stable ABI documentation for METH_FASTCALL (GH-149593) (GH-150853)

The current documentation says:

>
> METH_FASTCALL
>    Part of the Stable ABI since version 3.7.
>
> [...]
>
>   Added in version 3.7.
>
>    Changed in version 3.10: METH_FASTCALL is now part of the stable ABI.

so is contradictory about when it was added to the Stable ABI.  Looking at the header it seems like 3.10 is right.
(cherry picked from commit 58beae7319c58d850184d621d6635de23f71a229)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2 days ago[3.15] gh-149473: Emit audit event on calling os.environ.clear() (GH-149768) (#150094)
Miss Islington (bot) [Thu, 4 Jun 2026 08:47:38 +0000 (10:47 +0200)] 
[3.15] gh-149473: Emit audit event on calling os.environ.clear() (GH-149768) (#150094)

gh-149473: Emit audit event on calling os.environ.clear() (GH-149768)
(cherry picked from commit 29415c071f368e34b504e5efab9d0a795e7c6222)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 days ago[3.15] gh-150436: Skip subprocess test on STATUS_DLL_INIT_FAILED (GH-150704) (#150713)
Miss Islington (bot) [Thu, 4 Jun 2026 08:46:08 +0000 (10:46 +0200)] 
[3.15] gh-150436: Skip subprocess test on STATUS_DLL_INIT_FAILED (GH-150704) (#150713)

gh-150436: Skip subprocess test on STATUS_DLL_INIT_FAILED (GH-150704)

If a subprocess spawned with CREATE_NEW_CONSOLE creation flag fails
with STATUS_DLL_INIT_FAILED return code, skip the test. It's likely a
memory allocation failure in the desktop heap memory which caused the
DLL init failure.
(cherry picked from commit e8034dd841808416e243a4b2f8e08f0edf9caff3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 days ago[3.15] gh-149521: Do not update `last_profiled_frame` if it's not changed (GH-149522...
Miss Islington (bot) [Thu, 4 Jun 2026 08:31:47 +0000 (10:31 +0200)] 
[3.15] gh-149521: Do not update `last_profiled_frame` if it's not changed (GH-149522) (#149542)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
2 days ago[3.15] gh-148613: Fix race in `gc_set_threshold` and `gc_get_threshold` (GH-150356...
Miss Islington (bot) [Thu, 4 Jun 2026 07:13:46 +0000 (09:13 +0200)] 
[3.15] gh-148613: Fix race in `gc_set_threshold` and `gc_get_threshold` (GH-150356) (#150841)

gh-148613: Fix race in `gc_set_threshold` and `gc_get_threshold` (GH-150356)
(cherry picked from commit 41eb8ee2bb8cfd4129736e1f6068e702b8bdba6c)

Co-authored-by: Edward Xu <xuxiangad@gmail.com>
3 days ago[3.15] gh-145177: Fix Emscripten help text (GH-150874) (#150894)
Miss Islington (bot) [Thu, 4 Jun 2026 00:20:08 +0000 (02:20 +0200)] 
[3.15] gh-145177: Fix Emscripten help text (GH-150874) (#150894)

Removes some stray commas in help text.
(cherry picked from commit 57d444612d9c8a0eab66543d5bf8539103a59b47)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
3 days ago[3.15] gh-132467: Document and test that generic aliases are not classes (GH-133504...
Miss Islington (bot) [Wed, 3 Jun 2026 15:26:36 +0000 (17:26 +0200)] 
[3.15] gh-132467: Document and test that generic aliases are not classes (GH-133504) (#150854)

gh-132467: Document and test that generic aliases are not classes (GH-133504)
(cherry picked from commit 5915a1fb9d8499387e371c6801b40c55cf126dbf)

Co-authored-by: Abduaziz π <mail@ziyodov.uz>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 days ago[3.15] gh-146636: Add Free-threaded Stable ABI migration guide (GH-150580) (#150844)
Miss Islington (bot) [Wed, 3 Jun 2026 14:55:35 +0000 (16:55 +0200)] 
[3.15] gh-146636: Add Free-threaded Stable ABI migration guide (GH-150580) (#150844)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Charlie Lin <tuug@gmx.us>
Co-authored-by: da-woods <dw-git@d-woods.co.uk>
Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
3 days ago[3.15] Docs: Replace hardcoded `SOURCE_URI` with `patchlevel` check (GH-150850) ...
Hugo van Kemenade [Wed, 3 Jun 2026 13:49:58 +0000 (16:49 +0300)] 
[3.15] Docs: Replace hardcoded `SOURCE_URI` with `patchlevel` check (GH-150850) (#150855)

3 days ago[3.15] gh-91099: fix[imaplib]: call Exception with string instance (GH-31823) (#150811)
Miss Islington (bot) [Wed, 3 Jun 2026 13:12:46 +0000 (15:12 +0200)] 
[3.15] gh-91099: fix[imaplib]: call Exception with string instance (GH-31823) (#150811)

* bpo-46943: fix[imaplib]: call Exception with string instance

Adjust the behavior of 'login' to be similar to `authenticate()`,
where self.error is called with a str() instance.
(cherry picked from commit 29805f00a1b65163230d17584c30e2b955086abb)

Co-authored-by: Florian Best <spaceone@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
3 days ago[3.15] gh-141004: Document unstable perf map functions in `ceval.h` (GH-143492) ...
Miss Islington (bot) [Wed, 3 Jun 2026 12:44:34 +0000 (14:44 +0200)] 
[3.15] gh-141004: Document unstable perf map functions in `ceval.h` (GH-143492) (GH-150849)

gh-141004: Document unstable perf map functions in `ceval.h` (GH-143492)
(cherry picked from commit 6453065db9ff31e3f737240030f8311d2b087851)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
3 days ago[3.15] Fix a typo in `SSLSocket` docs (GH-150839) (GH-150848)
Miss Islington (bot) [Wed, 3 Jun 2026 12:27:56 +0000 (14:27 +0200)] 
[3.15] Fix a typo in `SSLSocket` docs (GH-150839) (GH-150848)

Fix a typo in `SSLSocket` docs (GH-150839)
(cherry picked from commit 5553e003ca56ecc67340962b2d0f7ca561d64197)

Co-authored-by: Robsdedude <dev@rouvenbauer.de>
3 days ago[3.15] gh-149805: Fix `SystemError` when compiling `__classdict__` class annotation...
Miss Islington (bot) [Wed, 3 Jun 2026 08:39:22 +0000 (10:39 +0200)] 
[3.15] gh-149805: Fix `SystemError` when compiling `__classdict__` class annotation (GH-149806)

(cherry picked from commit c52d2b16ddda3995f0f935b1a3815f1aac498da6)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 days ago[3.15] gh-148587: Document `sys.lazy_modules` (GH-150742)
Miss Islington (bot) [Wed, 3 Jun 2026 08:36:50 +0000 (10:36 +0200)] 
[3.15] gh-148587: Document `sys.lazy_modules` (GH-150742)

(cherry picked from commit e3fa52d953492772d36f5a4397262483bcf67641)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
4 days ago[3.15] gh-150723: Fix perf jitdump files on macOS (GH-150728) (#150832)
Miss Islington (bot) [Wed, 3 Jun 2026 00:41:24 +0000 (02:41 +0200)] 
[3.15] gh-150723: Fix perf jitdump files on macOS (GH-150728) (#150832)

gh-150723: Fix perf jitdump files on macOS (GH-150728)

The perf jitdump format defines the thread id field of the JR_CODE_LOAD
record as a 32-bit value, but on macOS it was declared as a uint64_t
(since pthread_threadid_np() returns a uint64_t). Those extra 8 bytes
plus alignment padding shifted every following field, so parsers reading
the file by the spec misread code_size as the code address and failed to
resolve any Python frames.

Declare thread_id as uint32_t on all platforms and truncate the macOS
thread id when writing the record. The value is only informational.
Symbols are resolved by address, and not thread ids so truncation is
safe here.

* Use mach_absolute_time for macOS jitdump timestamps

On macOS the jitdump file is consumed by profilers such as samply, which
timestamp their samples using mach_absolute_time(). The jitdump events were
stamped with clock_gettime(CLOCK_MONOTONIC), a different clock domain that
keeps advancing while the system is asleep, so the JIT code mappings could be
off by days relative to the samples and no Python frame would resolve. Stamp
jitdump events with mach_absolute_time() on macOS so they share the sampler's
clock domain. Linux continues to use CLOCK_MONOTONIC to stay aligned with perf.

Exercise the -Xperf_jit (jitdump) backend through samply and assert that
Python frames resolve, exercising the binary jitdump path end to end.
Skipped when samply is not installed.
(cherry picked from commit 494f2e3c92cc1b7774cca16fca5c7d1ff18c0de2)

Co-authored-by: Nazım Can Altınova <canaltinova@gmail.com>
4 days ago[3.15] gh-150319: Replace all documentation which says "See PEP 585" (GH-150325)...
Miss Islington (bot) [Tue, 2 Jun 2026 20:40:52 +0000 (22:40 +0200)] 
[3.15] gh-150319: Replace all documentation which says "See PEP 585" (GH-150325) (#150808)

gh-150319: Replace all documentation which says "See PEP 585" (GH-150325)

* Replace all documentation which says "See PEP 585"

The following classes in the stdlib get simple updates:

- array.array
- asyncio.Future
- asyncio.Task
- collections.defaultdict
- collections.deque
- contextvars.ContextVar
- contextvars.Token
- ctypes.Array
- os.DirEntry
- re.Match
- re.Pattern
- string.templatelib.Interpolation
- string.templatelib.Template
- types.MappingProxyType
- queue.SimpleQueue
- weakref.ref

The following classes are documented publicly as functions, and are
therefore updated internally (`__class_getitem__.__doc__`) but not in the
public docs:

- functools.partial
- itertools.chain

The following builtin types have updates to `__class_getitem__.__doc__`
but not to any documentation pages:

- BaseExceptionGroup
- coroutines (from generators)
- dict
- enumerate
- frozendict
- frozenset
- generators (and async generators)
- list
- memoryview
- set
- slice
- tuple

Special cases:

- union objects are now documented as "supporting class-level []",
  rather than anything to do with generics.

- Templates might be generic over a single type (union, in theory) or
  over a TypeVarTuple. As this is not currently fully settled, it is
  marked with a comment and a mild hint that it is a single type is used
  (namely, "type" is singular rather than "types", plural)

* Apply suggestions from code review

* Correct several class getitem docs

And expand the text for tuples.

* Add notes on generic typing of builtins

* Fix typo in tuple.__class_getitem__ docstring

* Typo fix: malformed refs

Fix `generic` links which weren't marked as `:ref:`.

* Strike unnecessary docs on generic-ness

* Apply suggestions from code review

These are applied at both the originally indicated locations and in the
corresponding docstring definitions.

* Update Doc/library/re.rst

* Update Objects/enumobject.c

* Remove tuple generic doc in 'stdtypes' page

This is covered in more detail in the cross-linked typing documentation.
The other copy of this documentation -- in the docstring for
`tuple.__class_getitem__` -- is left in place.

* Fix whitespace around new doc of generics

Per review, do not introduce or remove whitespace such that section
breaks are altered by the introduction of doc on various generic types.

In most cases, this is a removal of an extra line.

In one case (Arrays), it is the reintroduction of a line.

Additionally, two other minor fixes are included:
- incorrect indent on 'defaultdicts'
- make `mappingproxy.__class_getitem__.__doc__` consistent with other
  mapping type generic docs

* Move placement of memoryview generic note

Previous placement was at the end of the main docstring, which is
consistent with other types but places it after a section on various
methods (which makes it read somewhat inconsistently). Moving it up
helps resolve.

* Ensure sphinxdoc does not start sentences lowercase

Lowercase class names at the start of sentences are marked out with the
`class` role. In the case of `deque`, documentation already refers to
these as `Deques`, so this form is preferred.

* Apply suggestions from code review

* Fix line endings and wrap more tightly

Line endings fixed by pre-commit ; also re-wrapped the MappingProxyType
text which was too long.

* Use 'ContextVars' style in sphinx doc

---------
(cherry picked from commit 50fe49c879af352914da3baa40c7fd1fb170028c)

Co-authored-by: Stephen Rosen <sirosen@globus.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Jelle Zijlstra <906600+JelleZijlstra@users.noreply.github.com>
Co-authored-by: Alex Waygood <66076021+AlexWaygood@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 days ago[3.15] gh-141627: Fix BufferedRandom inheritance documentation (GH-141629) (GH-150801)
Miss Islington (bot) [Tue, 2 Jun 2026 19:23:15 +0000 (21:23 +0200)] 
[3.15] gh-141627: Fix BufferedRandom inheritance documentation (GH-141629) (GH-150801)

BufferedRandom does not inherit from BufferedReader and BufferedWriter
in the C implementation.
(cherry picked from commit 551bc2cb5ed4719c35ca3ea0f320167dd750389e)

Co-authored-by: Mohsin Mehmood <55545648+mohsinm-dev@users.noreply.github.com>
4 days ago[3.15] Fix description of the function parameter of shutil.register_archive_format...
Miss Islington (bot) [Tue, 2 Jun 2026 19:20:49 +0000 (21:20 +0200)] 
[3.15] Fix description of the function parameter of shutil.register_archive_format() (GH-145087) (GH-150804)

(cherry picked from commit 18c6d3ccc32232a28a5288708818ef9c4fecba1a)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
4 days agoMerge branch '3.15' of https://github.com/python/cpython into 3.15
Hugo van Kemenade [Tue, 2 Jun 2026 17:35:34 +0000 (20:35 +0300)] 
Merge branch '3.15' of https://github.com/python/cpython into 3.15

4 days agoPost 3.15.0b2
Hugo van Kemenade [Tue, 2 Jun 2026 17:34:33 +0000 (20:34 +0300)] 
Post 3.15.0b2

4 days ago[3.15] gh-101913: changed wording of docstring for _parsedate_tz (GH-134446) (#150796)
Miss Islington (bot) [Tue, 2 Jun 2026 15:31:56 +0000 (17:31 +0200)] 
[3.15] gh-101913: changed wording of docstring for _parsedate_tz (GH-134446) (#150796)

Fixed incorrect word.
(cherry picked from commit f7e0fb60cfaf31373c0b78e6eb954a0351e92f09)

Co-authored-by: Gustaf <79180496+gostak-dd@users.noreply.github.com>
Co-authored-by: Gustaf <79180496+GGyll@users.noreply.github.com>
4 days agoPython 3.15.0b2 v3.15.0b2
Hugo van Kemenade [Tue, 2 Jun 2026 15:28:30 +0000 (18:28 +0300)] 
Python 3.15.0b2

4 days ago[3.15] Silence experimental coroutine deprecation warnings (GH-150788) (#150794)
Miss Islington (bot) [Tue, 2 Jun 2026 15:20:39 +0000 (17:20 +0200)] 
[3.15] Silence experimental coroutine deprecation warnings (GH-150788) (#150794)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
4 days ago[3.15] gh-149187: Document `frozendict()` under 'Built-in Functions' (GH-149185)
Miss Islington (bot) [Tue, 2 Jun 2026 14:18:03 +0000 (16:18 +0200)] 
[3.15] gh-149187: Document `frozendict()` under 'Built-in Functions' (GH-149185)

(cherry picked from commit 86867edb84a53d60e3ec9d3d2e83f4ed09692b95)

Co-authored-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
4 days ago[3.15] gh-150766: export `_PyGC_VisitFrameStack` and `_PyGC_VisitStackRef` functions...
Miss Islington (bot) [Tue, 2 Jun 2026 13:36:52 +0000 (15:36 +0200)] 
[3.15] gh-150766: export `_PyGC_VisitFrameStack` and `_PyGC_VisitStackRef` functions (GH-150767) (#150787)

gh-150766: export `_PyGC_VisitFrameStack` and `_PyGC_VisitStackRef` functions (GH-150767)
(cherry picked from commit df34a2f7122dcc6d230493b138e301675a290c49)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
4 days ago[3.15] gh-89554: Document _thread.LockType as a class (GH-150684) (#150785)
Miss Islington (bot) [Tue, 2 Jun 2026 13:07:05 +0000 (15:07 +0200)] 
[3.15] gh-89554: Document _thread.LockType as a class (GH-150684) (#150785)

gh-89554: Document _thread.LockType as a class (GH-150684)

_thread.LockType is a class (the type of lock objects), but was documented
with the ".. data::" directive, so ":class:" cross-references to it cannot
resolve against a py:class target.

Switch the entry to ".. class::", move it next to the lock methods, and
document acquire(), release() and locked() as methods of the class.  Keep
the old _thread.lock.* URL fragments working with raw HTML anchors.
(cherry picked from commit e37ce569773b5e4e5c0e6042d4adfde2e9608f13)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
4 days ago[3.15] Update `SOURCE_URI` for `3.15` branch (#150783)
Hugo van Kemenade [Tue, 2 Jun 2026 12:05:14 +0000 (15:05 +0300)] 
[3.15] Update `SOURCE_URI` for `3.15` branch (#150783)

4 days ago[3.15] gh-150720: Remove '-d 1' in test_script_error_treatment (GH-150736) (#150746)
Miss Islington (bot) [Tue, 2 Jun 2026 11:32:04 +0000 (13:32 +0200)] 
[3.15] gh-150720: Remove '-d 1' in test_script_error_treatment (GH-150736) (#150746)

Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com>
4 days ago[3.15] Fix typos in C API documentation (GH-149588) (#149662)
Miss Islington (bot) [Tue, 2 Jun 2026 11:31:13 +0000 (13:31 +0200)] 
[3.15] Fix typos in C API documentation (GH-149588) (#149662)

Co-authored-by: pengyu lee <lipengyu@kylinos.cn>
4 days ago[3.15] gh-149079: Fix O(n^2) canonical ordering in unicodedata.normalize() (GH-149080...
Miss Islington (bot) [Tue, 2 Jun 2026 10:10:04 +0000 (12:10 +0200)] 
[3.15] gh-149079: Fix O(n^2) canonical ordering in unicodedata.normalize() (GH-149080) (#150776)

Replace the insertion sort used for canonical ordering of combining
characters with a hybrid approach: insertion sort for short runs (< 20)
and counting sort for longer runs, reducing worst-case complexity from
O(n^2) to O(n). This prevents denial of service via crafted Unicode
strings with many combining characters in alternating CCC order.
(cherry picked from commit 991224b1e8311c85f198f6dd8208bf8cff7fc26f)

Co-authored-by: Seth Larson <seth@python.org>
Co-authored-by: ch4n3-yoon <ch4n3.yoon@gmail.com>
Co-authored-by: Seokchan Yoon <13852925+ch4n3-yoon@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
4 days ago[3.15] gh-149738: Fix segmentation fault bug in sqllite3 (GH-149754) (#150768)
Miss Islington (bot) [Tue, 2 Jun 2026 09:36:03 +0000 (11:36 +0200)] 
[3.15] gh-149738: Fix segmentation fault bug in sqllite3 (GH-149754) (#150768)

gh-149738: Fix segmentation fault bug in sqllite3 (GH-149754)

Deleting the `row_factory` or `text_factory` attribute is no longer allowed.
(cherry picked from commit 60fdb3192b897168ec0418fb0ea6c8d2d49ea513)

Co-authored-by: Sepehr Rasouli <sepehrrasouli06@gmail.com>
4 days ago[3.15] gh-123138: Updated email.headerregistry docs to include required keyword parse...
Miss Islington (bot) [Tue, 2 Jun 2026 09:26:05 +0000 (11:26 +0200)] 
[3.15] gh-123138: Updated email.headerregistry docs to include required keyword parse_tree (GH-134450) (GH-150623)

(cherry picked from commit 2c20f9ce17abcbc36a105fd9de0b15797b6401ae)

Co-authored-by: Gustaf <79180496+gostak-dd@users.noreply.github.com>
4 days ago[3.15] Fix two typos in 'Exception Handling' C-API documentation (GH-150674) (#150772)
Miss Islington (bot) [Tue, 2 Jun 2026 09:22:17 +0000 (11:22 +0200)] 
[3.15] Fix two typos in 'Exception Handling' C-API documentation (GH-150674) (#150772)

(cherry picked from commit cee3327b9264a653cdbd2f9bb1ffa74a95be66e9)

Co-authored-by: Manoj K M <manojkm24dev@gmail.com>
4 days ago[3.15] gh-89554: Document typing.ParamSpecArgs and ParamSpecKwargs as classes (GH...
Miss Islington (bot) [Tue, 2 Jun 2026 08:16:05 +0000 (10:16 +0200)] 
[3.15] gh-89554: Document typing.ParamSpecArgs and ParamSpecKwargs as classes (GH-150677) (GH-150763)

Use the directive "class" instead of "data" for ParamSpecArgs and ParamSpecKwargs.
(cherry picked from commit 35c314d2b7282e729c2d86716fc94e1fe38f25da)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
4 days ago[3.15] gh-89554: Document standard type objects in types as classes (GH-150676) ...
Miss Islington (bot) [Tue, 2 Jun 2026 08:11:19 +0000 (10:11 +0200)] 
[3.15] gh-89554: Document standard type objects in types as classes (GH-150676) (GH-150761)

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>
4 days ago[3.15] gh-89554: Document weakref type objects as classes (GH-150678) (GH-150760)
Miss Islington (bot) [Tue, 2 Jun 2026 08:08:01 +0000 (10:08 +0200)] 
[3.15] gh-89554: Document weakref type objects as classes (GH-150678) (GH-150760)

Use the "class" directive instead of "data" for ReferenceType,
ProxyType and CallableProxyType.
(cherry picked from commit 10c421970beca89df92a918f2247fb8850d3b6cc)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
4 days ago[3.15] gh-89554: Document NoneType, NotImplementedType and EllipsisType as classes...
Miss Islington (bot) [Tue, 2 Jun 2026 08:03:51 +0000 (10:03 +0200)] 
[3.15] gh-89554: Document NoneType, NotImplementedType and EllipsisType as classes (GH-150682) (GH-150755)

Always use the directive and the role "class" instead of "data" for
NoneType, NotImplementedType and EllipsisType.
(cherry picked from commit e40190e104c81b61cdc6f71a391e28de53bbc1d8)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
4 days ago[3.15] gh-150228: Improve the PEP 829 batch processing APIs (GH-150542) (#150748)
Miss Islington (bot) [Tue, 2 Jun 2026 02:11:51 +0000 (04:11 +0200)] 
[3.15] gh-150228: Improve the PEP 829 batch processing APIs (GH-150542) (#150748)

gh-150228: Improve the PEP 829 batch processing APIs (GH-150542)

* gh-150228: Improve the PEP 829 batch processing APIs

As previously discussed with @ncoghlan and approved for 3.15b2 by @hugovk,
this implements the batch processing APIs for addsitedir() and friends.  We
remove the `defer_processing_start_files` flag which required some implicit
module global state, and promote StartupState to the public documented API.

This also moves the bulk of the module global functions into methods of the
`StartupState` class, so it removes the awkward APIs in 3.15b1.  Now, instances
of this class are an accumulator for startup state, using `StartupState.process()`
to process them.  Callers can now batch up startup state themselves by using
the methods on this class.  The module global functions are shims for this
which preserve the legacy APIs and semantics using the new state class.

This PR also fixes the interleaving regression identified by @ncoghlan in the
same issue.  Now, .pth file sys.path extensions are added to sys.path after
the sitedir that the .pth file is found in, restoring the legacy behavior.

Along the way, I've made a lot of improvements to function docstrings,
site.rst documentation, and comments in the code explaining what's going on.

* Add a note that if known_paths is provided to StartupState.__init__(), it
  will get mutated in place.
* Improve some conditional flows.
* Improve some comments.
* Improve the what's new entry.

* Make test_impl_exec_imports_suppressed_by_matching_start() more robust

Based on PR comment, we need to read both the .pth and .start files, and prove
that the .pth file's import line (which passes a bigger increment) is not
called, but the .start file's entry point (which uses the default increment)
is called.

* As per review, move some methods to the private API

_read_pth_file() and _read_start_file() are not intended to be part of the
public API surface outside of the site module, so even though they are used by
methods outside of the StartupState class, make them privately named.

* Resolve several review feedbacks

* Move a `versionadded`
* Better list comprehension formatting (use the output from
  `ruff format --line-length 78`)

* Add docs for site.makepath() and point the case-normalization requirement to
  this utility function.
* Note that StartupState.process() is not idempotent.

* Address another feedback comment

This time, we get rid of the legacy implementation `reset` local, which was
always difficult to understand, and just implement a return value based on the
processing mode selected.

* Changes based on gh-150228 review

The comment by @encukou that started this change:

```
I still see two red flags here though: an argument that doesn't combine with
other arguments, and (another instance of) changing the return type based on
an argument.

Did you consider adding a StartupState.addsitedir(sitedir) method, instead of
the startup_state argument?
```

As it turns out, this is an even cleaner design.  By moving the bulk of the
previous module global functions into `StartupState` methods, we can get rid
of all the awkward `startup_state` keyword-only arguments which conflict
with `known_path` (Petr's first point).  We can also get rid of the
return value dichotomy (Petr's second point) because now we can preserve
exactly the Python 3.14 API in the module global functions, and implement
the better APIs in the class methods.  We also generally don't have to
pass around `process_known_sitedirs`.

Now the following module global functions are essentially shims around
class methods:

* site.addsitedir() -> StartupState.addsitedir()
* site.addusersitepackages() -> StartupState.addusersitepackages()
* site.addsitepackages() -> StartupState.addsitepackages()
* Additional minor changes
* Remove a now unused parameter

(cherry picked from commit 27ebd9abce76543e95748a7534e5218acd514db2)

Co-authored-by: Barry Warsaw <barry@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
5 days ago[3.15] gh-150644: Tag Apple system log messages as public. (GH-150645) (#150738)
Miss Islington (bot) [Mon, 1 Jun 2026 22:53:51 +0000 (00:53 +0200)] 
[3.15] gh-150644: Tag Apple system log messages as public. (GH-150645) (#150738)

macOS 26 changed the default visibility of "dynamic" system messages. This
changes the logging strategy to tag all messages as "public" so they are
visible in the system log without special configuration.
(cherry picked from commit 71fc4c66d3e675a5481b6b76e6c707c9b6f1e0e0)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
5 days ago[3.15] gh-148508: Add another common pattern for iOS SSL failures to test_ssl (GH...
Miss Islington (bot) [Mon, 1 Jun 2026 22:24:31 +0000 (00:24 +0200)] 
[3.15] gh-148508: Add another common pattern for iOS SSL failures to test_ssl (GH-150442) (#150697)

gh-148508: Add another common pattern for iOS SSL failures to test_ssl (GH-150442)

Match also '[SSL: HTTP_REQUEST] http request (_ssl.c:1143)'.
(cherry picked from commit 540b3d0a7fa7cd842f064f79b1410cbd6868bffa)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
5 days ago[3.15] gh-150429: Fix sampling profiler generator stack test (GH-150433) (#150734)
Miss Islington (bot) [Mon, 1 Jun 2026 20:58:05 +0000 (22:58 +0200)] 
[3.15] gh-150429: Fix sampling profiler generator stack test (GH-150433) (#150734)

5 days ago[3.15] gh-148672: Document namespace subpackages inside regular packages (GH-150056...
Miss Islington (bot) [Mon, 1 Jun 2026 19:31:36 +0000 (21:31 +0200)] 
[3.15] gh-148672: Document namespace subpackages inside regular packages (GH-150056) (#150729)

gh-148672: Document namespace subpackages inside regular packages (GH-150056)
(cherry picked from commit 9ba2a891798a06508f63e216d3a1b6907b39eec4)

Co-authored-by: Taeknology <20297177+Taeknology@users.noreply.github.com>
5 days ago[3.15] gh-121109: Fix performance of tarfile reading with "r|*" (GH-121296) (GH-150604)
Miss Islington (bot) [Mon, 1 Jun 2026 17:39:51 +0000 (19:39 +0200)] 
[3.15] gh-121109: Fix performance of tarfile reading with "r|*" (GH-121296) (GH-150604)

(cherry picked from commit 6d7a19e5334636f77cac135120fe81f343a73876)

Co-authored-by: Tomi Belan <tomi.belan@gmail.com>
5 days ago[3.15] gh-149534: Fix unification of `defaultdict` and `frozendict` with `|` (GH...
Miss Islington (bot) [Mon, 1 Jun 2026 16:07:33 +0000 (18:07 +0200)] 
[3.15] gh-149534: Fix unification of `defaultdict` and `frozendict` with `|` (GH-149539) (#150709)

gh-149534: Fix unification of `defaultdict` and `frozendict` with `|` (GH-149539)
(cherry picked from commit cc0269334fdf7be12de79316882befd5cdb4cf7e)

Co-authored-by: sobolevn <mail@sobolevn.me>
5 days ago[3.15] gh-150157: Fix critical section for PyDict_Next() in _pickle.c (GH-150158...
Miss Islington (bot) [Mon, 1 Jun 2026 14:59:09 +0000 (16:59 +0200)] 
[3.15] gh-150157: Fix critical section for PyDict_Next() in _pickle.c (GH-150158) (#150711)

(cherry picked from commit c5516e7e371f7b273eb37c7b65f14ef14ee81f11)

Co-authored-by: Thomas Kowalski <thom.kowa@gmail.com>
5 days ago[3.15] gh-149046: fix: correctly handle `str` subclasses in `io.StringIO` (GH-149047...
Miss Islington (bot) [Mon, 1 Jun 2026 13:33:02 +0000 (15:33 +0200)] 
[3.15] gh-149046: fix: correctly handle `str` subclasses in `io.StringIO` (GH-149047) (#150706)

gh-149046: fix: correctly handle `str` subclasses in `io.StringIO` (GH-149047)
(cherry picked from commit c98773633c97463e35eb51fac81d1095e8061fe0)

Co-authored-by: Thomas Kowalski <thom.kowa@gmail.com>
5 days ago[3.15] gh-150368: Change Windows user group to secure identifier in test_tempfile...
Miss Islington (bot) [Mon, 1 Jun 2026 12:05:52 +0000 (14:05 +0200)] 
[3.15] gh-150368: Change Windows user group to secure identifier in test_tempfile (GH-150369) (#150701)

gh-150368: Change Windows user group to secure identifier in test_tempfile (GH-150369)
(cherry picked from commit 9d64c355b5471e2d27e036d3662e97567d259c61)

Co-authored-by: Dawid Konrad Kohnke <51542233+anytokin@users.noreply.github.com>
5 days ago[3.15] gh-150372: Add missing null check on completer_word_break_characters in readli...
Miss Islington (bot) [Mon, 1 Jun 2026 10:00:55 +0000 (12:00 +0200)] 
[3.15] gh-150372: Add missing null check on completer_word_break_characters in readline.c (GH-150251) (GH-150628)

(cherry picked from commit 56bd9ea676d5ab4d5f6c68aefc3125ef5a216157)

Co-authored-by: Thomas Kowalski <thom.kowa@gmail.com>
5 days ago[3.15] gh-148605: Remove irepeat() thread test from test_bytes (GH-150576) (#150660)
Miss Islington (bot) [Mon, 1 Jun 2026 09:31:52 +0000 (11:31 +0200)] 
[3.15] gh-148605: Remove irepeat() thread test from test_bytes (GH-150576) (#150660)

gh-148605: Remove irepeat() thread test from test_bytes (GH-150576)
(cherry picked from commit 350e9de7650e224fd3abe8f389976071e8fae6d2)

Co-authored-by: Victor Stinner <vstinner@python.org>
6 days ago[3.15] gh-150685: update bundled pip to 26.1.2 (gh-150686) (gh-150687)
Miss Islington (bot) [Sun, 31 May 2026 20:12:22 +0000 (22:12 +0200)] 
[3.15] gh-150685: update bundled pip to 26.1.2 (gh-150686) (gh-150687)

6 days ago[3.15] gh-140553: Mark `*gettext` parameters as positionaly only in documentation...
Miss Islington (bot) [Sun, 31 May 2026 19:21:08 +0000 (21:21 +0200)] 
[3.15] gh-140553: Mark `*gettext` parameters as positionaly only in documentation (GH-140598)

(cherry picked from commit 1837c17bc78b8169cd6c1c5799dcf6a71c3eac83)

Co-authored-by: Stan Ulbrych <stan@python.org>
6 days ago[3.15] Clarify docs for scheduler.run(blocking=False) (GH-129575) (GH-150668)
Miss Islington (bot) [Sun, 31 May 2026 12:19:43 +0000 (14:19 +0200)] 
[3.15] Clarify docs for scheduler.run(blocking=False) (GH-129575) (GH-150668)

(cherry picked from commit 2f8f569ba911ab3cff1356a15a3e688adc4ae917)

Co-authored-by: M. Greyson Christoforo <grey@christoforo.net>
6 days ago[3.15] gh-150636: Clarify difference between copy.copy() and the copy() methods ...
Miss Islington (bot) [Sun, 31 May 2026 12:16:58 +0000 (14:16 +0200)] 
[3.15] gh-150636: Clarify difference between copy.copy() and the copy() methods (GH-150637) (GH-150665)

(cherry picked from commit 1de909b32411fc1c4d4c42b4f8221b86096c6353)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
6 days ago[3.15] Correct frexp() docs for zero and non-finite numbers (GH-149753) (GH-150652)
Miss Islington (bot) [Sun, 31 May 2026 10:04:18 +0000 (12:04 +0200)] 
[3.15] Correct frexp() docs for zero and non-finite numbers (GH-149753) (GH-150652)

0.5 <= abs(m) < 1 is only true for finite nonzero numbers
(cherry picked from commit 5b5ffce05c211a5b0b74cd95eeb4c463614ee136)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
6 days ago[3.15] gh-131178: Fix mimetypes CLI docs, mention that errors go to stdout (GH-149683...
Miss Islington (bot) [Sun, 31 May 2026 08:14:15 +0000 (10:14 +0200)] 
[3.15] gh-131178: Fix mimetypes CLI docs, mention that errors go to stdout (GH-149683) (#150655)

gh-131178: Fix mimetypes CLI docs, mention that errors go to stdout (GH-149683)
(cherry picked from commit 2b94b923943a1f75cdbd5a5e4e2eb5f93eb43e23)

Co-authored-by: htjworld <116538001+htjworld@users.noreply.github.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
6 days ago[3.15] gh-150524: Remove outdated note in binascii.a2b_hex() documentation (GH-150525...
Miss Islington (bot) [Sun, 31 May 2026 07:52:55 +0000 (09:52 +0200)] 
[3.15] gh-150524: Remove outdated note in binascii.a2b_hex() documentation (GH-150525) (GH-150627)

bytes.fromhex() accepts ASCII bytes and bytes-like objects as input since 3.14
(cherry picked from commit af10734907d2d7df4c4d754174804aec7c5d6a72)

Co-authored-by: Joshix-1 <57299889+Joshix-1@users.noreply.github.com>
6 days ago[3.15] gh-117291: Explain usage of null bytes in Array(c_char).value (GH-117292)...
Miss Islington (bot) [Sun, 31 May 2026 07:28:45 +0000 (09:28 +0200)] 
[3.15] gh-117291: Explain usage of null bytes in Array(c_char).value (GH-117292) (GH-150649)

(cherry picked from commit 73d8e9a47cc13ce1b9b1bdfdeaa958639b144f55)

Co-authored-by: Patrick Rauscher <prauscher@prauscher.de>
6 days ago[3.15] gh-149857: Clarify multiprocessing Process argument wording (GH-149919) (...
Miss Islington (bot) [Sun, 31 May 2026 04:22:11 +0000 (06:22 +0200)] 
[3.15] gh-149857: Clarify multiprocessing Process argument wording (GH-149919) (#149933)

gh-149857: Clarify multiprocessing Process argument wording (GH-149919)

Use consistent 'picklable' wording
(cherry picked from commit 1bab6c919212cbac9be9e37bbd4d85865051f17f)

Co-authored-by: Mani Salahmand <78011313+ManiSalahmand@users.noreply.github.com>
6 days ago[3.15] gh-141444:fix broken URLs and examples in urllib.request.rst (GH-144863) ...
Miss Islington (bot) [Sun, 31 May 2026 04:08:20 +0000 (06:08 +0200)] 
[3.15] gh-141444:fix broken URLs and examples in urllib.request.rst (GH-144863) (#150642)

gh-141444:fix broken URLs and examples in urllib.request.rst (GH-144863)

* Doc: fix broken URLs and examples in urllib.request.rst (gh-141444)

* Doc: update urllib.request examples to handle gzip compression

---------
(cherry picked from commit 0f1f7c7889873deb7c2e2c3f18695bf636e7752c)

Co-authored-by: Paper Moon <tangyuan0821@email.cn>
Co-authored-by: Senthil Kumaran <senthil@python.org>
7 days ago[3.15] gh-150406: Check result of PyThread_allocate_lock() for netdb_lock (GH-150407...
Miss Islington (bot) [Sat, 30 May 2026 17:15:02 +0000 (19:15 +0200)] 
[3.15] gh-150406: Check result of PyThread_allocate_lock() for netdb_lock (GH-150407) (GH-150616)

(cherry picked from commit 1e18c45495185cb547d43c3dd4c1cbdd8482867b)

Co-authored-by: Thomas Kowalski <thom.kowa@gmail.com>
7 days ago[3.15] gh-129851: Fix the documentation for -m command (GH-129862) (GH-150614)
Miss Islington (bot) [Sat, 30 May 2026 17:03:58 +0000 (19:03 +0200)] 
[3.15] gh-129851: Fix the documentation for -m command (GH-129862) (GH-150614)

(cherry picked from commit 9baa7c63bee1ad2b243f16109a3fd206a1f13a6a)

Co-authored-by: Dhruv Singla <68206552+d-s-dc@users.noreply.github.com>
7 days ago[3.15] gh-135898: Add section to free-threading howto about memory usage (GH-143279...
Miss Islington (bot) [Sat, 30 May 2026 10:49:26 +0000 (12:49 +0200)] 
[3.15] gh-135898: Add section to free-threading howto about memory usage (GH-143279) (#150607)

gh-135898: Add section to free-threading howto about memory usage (GH-143279)
(cherry picked from commit 62a45fa91c64bd1e1ad46ed66c07b65a7971042e)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
7 days ago[3.15] gh-150501: Correct `inspect.getattr_static` docs signature (GH-150504) (#150601)
Miss Islington (bot) [Sat, 30 May 2026 09:25:38 +0000 (11:25 +0200)] 
[3.15] gh-150501: Correct `inspect.getattr_static` docs signature (GH-150504) (#150601)

gh-150501: Correct `inspect.getattr_static` docs signature (GH-150504)
(cherry picked from commit 678fd8452cc2d7f9a50cb5d4e5ae44a60b724248)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
8 days ago[3.15] gh-149489: Fix ElementTree serialization to HTML (GH-149490) (GH-150595)
Serhiy Storchaka [Fri, 29 May 2026 21:48:10 +0000 (00:48 +0300)] 
[3.15] gh-149489: Fix ElementTree serialization to HTML (GH-149490) (GH-150595)

* The content of comments, processing instructions and elements "xmp",
  "iframe", "noembed", "noframes", and "plaintext" is no longer escaped.
* The "plaintext" element no longer have the closing tag.
* Add support of empty attributes (with value None).
(cherry picked from commit bcd29e466f55d8b4e3849ed6ada8ce86a46f5072)

8 days ago[3.15] gh-149056: Properly pass array_hook in json.load() to json.loads() (GH-149057...
Miss Islington (bot) [Fri, 29 May 2026 21:30:50 +0000 (23:30 +0200)] 
[3.15] gh-149056: Properly pass array_hook in json.load() to json.loads() (GH-149057) (GH-150591)

(cherry picked from commit f87d9605d3f9489d33aaf97a97fa9cb81cd7cc40)

Co-authored-by: Thomas Kowalski <thom.kowa@gmail.com>
8 days ago[3.15] gh-150403: Document frozendict in language reference Mappings section (GH...
Miss Islington (bot) [Fri, 29 May 2026 19:48:48 +0000 (21:48 +0200)] 
[3.15] gh-150403: Document frozendict in language reference Mappings section (GH-150404) (GH-150590)

(cherry picked from commit 779694faba3e80b944f528a56e9b756b55637541)

Co-authored-by: Oral Ersoy Dokumacı <oral.ersoy.dokumaci@gmail.com>
8 days ago[3.15] Add a security warning about `pydoc`'s HTTP server (#150573)
Miss Islington (bot) [Fri, 29 May 2026 19:07:29 +0000 (21:07 +0200)] 
[3.15] Add a security warning about `pydoc`'s HTTP server (#150573)

(cherry picked from commit 5535c1f9c08e929f96fa5d798277e3a2c91ed12a)

Co-authored-by: Stan Ulbrych <stan@python.org>
8 days ago[3.15] gh-150107: Fix asyncio sendfile fallback ignoring non-zero offset (GH-150270...
Miss Islington (bot) [Fri, 29 May 2026 13:10:56 +0000 (15:10 +0200)] 
[3.15] gh-150107: Fix asyncio sendfile fallback ignoring non-zero offset (GH-150270) (#150570)

gh-150107: Fix asyncio sendfile fallback ignoring non-zero offset (GH-150270)
(cherry picked from commit c72d5ea638731ec29723ded2d26ec7f997f06f17)

Co-authored-by: Grant Herman <grantlouisherman041@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
8 days ago[3.15] gh-141984: Reword docs on "enclosed" atom grammar (GH-148622) (GH-150552)
Petr Viktorin [Fri, 29 May 2026 08:09:38 +0000 (10:09 +0200)] 
[3.15] gh-141984: Reword docs on "enclosed" atom grammar (GH-148622) (GH-150552)

Reorganize and reword the docs on atoms in parentheses, brackets and braces:
parenthesized groups, list/set/dict/tuple displays, and comprehensions.
(Generator expressions and yield atoms are left for later.)

In the spirit of better matching the underlying grammar, *comprehensions* are
covered separately from non-comprehension displays. Also, parenthesized forms
(with a single expression) and tuple displays are separated.
All sections are rewritten to start with simple cases and build up to the full
formal grammar.

(cherry picked from commit 55f25183263b9a52fa246817344cdb32d6c3d722)

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
9 days ago[3.15] gh-149029: Update SQLite to 3.53.1 for binary releases (GH-149767) (#150559)
Miss Islington (bot) [Thu, 28 May 2026 22:57:04 +0000 (00:57 +0200)] 
[3.15] gh-149029: Update SQLite to 3.53.1 for binary releases (GH-149767) (#150559)

(cherry picked from commit 9242700c149c490c56d2a415b395b5f51d94a49a)

Co-authored-by: Adam Johnson <me@adamj.eu>
Co-authored-by: Ned Deily <nad@python.org>
9 days ago[3.15] gh-150046: Fix `test_add_python_opts` to ignore `PYTHON*` env vars (GH-150089...
Miss Islington (bot) [Thu, 28 May 2026 17:15:27 +0000 (19:15 +0200)] 
[3.15] gh-150046: Fix `test_add_python_opts` to ignore `PYTHON*` env vars (GH-150089) (#150561)

gh-150046: Fix `test_add_python_opts` to ignore `PYTHON*` env vars (GH-150089)

Avoid the runtime environment from affecting the tests' behaviours,
which notably checks the warning filters which can be controlled by
various PYTHON environment variables.
(cherry picked from commit ef2246f788832a64ba7c5215c8e72f8e539e59b4)

Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
9 days ago[3.15] Add prominent crash warning to `ctypes` docs (GH-150410) (GH-150547)
Miss Islington (bot) [Thu, 28 May 2026 10:23:56 +0000 (12:23 +0200)] 
[3.15] Add prominent crash warning to `ctypes` docs (GH-150410) (GH-150547)

(cherry picked from commit b53f6ca850b500621474e82931c3e7216d9a1cb1)

Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
10 days ago[3.15] gh-84353: Preserve non-UTF-8 filenames when appending to ZipFile (GH-150091...
Miss Islington (bot) [Wed, 27 May 2026 21:47:03 +0000 (23:47 +0200)] 
[3.15] gh-84353: Preserve non-UTF-8 filenames when appending to ZipFile (GH-150091) (GH-150527)

Preserve non-UTF-8 filenames when appending to a ZipFile.

---------
(cherry picked from commit 24c6bbc92b6dd0ce9b7ff799049498299f70f97d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
10 days ago[3.15] gh-149861: Fix rule in match statement `case_block` PEG grammar (GH-149908)
Miss Islington (bot) [Wed, 27 May 2026 15:24:47 +0000 (17:24 +0200)] 
[3.15] gh-149861: Fix rule in match statement `case_block` PEG grammar (GH-149908)

(cherry picked from commit 99c254e2f79a4197524bef61bf0d12251ee273e6)

Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
10 days ago[3.15] gh-150389: Make perf profiler tests resilient (GH-150437) (#150515)
Miss Islington (bot) [Wed, 27 May 2026 12:52:48 +0000 (14:52 +0200)] 
[3.15] gh-150389: Make perf profiler tests resilient (GH-150437) (#150515)

10 days ago[3.15] gh-149571: Fix the C implementation of Element.itertext() (GH-149929) (GH...
Miss Islington (bot) [Wed, 27 May 2026 10:52:02 +0000 (12:52 +0200)] 
[3.15] gh-149571: Fix the C implementation of Element.itertext() (GH-149929) (GH-150509)

It no longer emits text for comments and processing instructions.
(cherry picked from commit 7de4fcd44585f572acbcee23f5c7018b2b3f0983)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
11 days ago[3.15] gh-150175: Fix ThreadingMock call_count race condition (GH-150176) (#150182)
Miss Islington (bot) [Tue, 26 May 2026 19:46:16 +0000 (21:46 +0200)] 
[3.15] gh-150175: Fix ThreadingMock call_count race condition (GH-150176) (#150182)

gh-150175: Fix ThreadingMock call_count race condition (GH-150176)

ThreadingMock._increment_mock_call() was not thread-safe.
Multiple threads calling the mock simultaneously could lose
increments due to race conditions on call_count and other
attributes.

Fix by overriding _increment_mock_call in ThreadingMixin
and wrapping it with the existing _mock_calls_events_lock.
(cherry picked from commit 388e023fe1197c1ffed374520ed45df4ac72b8f5)

Co-authored-by: saisneha196 <156835592+saisneha196@users.noreply.github.com>
11 days ago[3.15] gh-88726: Stop using non-standard charset names eucgb2312_cn and big5_tw in...
Miss Islington (bot) [Tue, 26 May 2026 19:21:36 +0000 (21:21 +0200)] 
[3.15] gh-88726: Stop using non-standard charset names eucgb2312_cn and big5_tw in email (GH-149959) (GH-150491)

(cherry picked from commit 5e467f4331d4cb7a8e2986c27af7eb68ccaccb37)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>