]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 weeks ago[3.15] GHA: Display output when a sanitizer test fails (GH-151268) (#151272)
Miss Islington (bot) [Wed, 10 Jun 2026 17:37:52 +0000 (19:37 +0200)] 
[3.15] GHA: Display output when a sanitizer test fails (GH-151268) (#151272)

GHA: Display output when a sanitizer test fails (GH-151268)

Modify GitHub Action "Reusable Sanitizer" to display output when a
test fails: pass -W option.
(cherry picked from commit 3a8bebd86f36be05442fa2f3adcc83c2a4b00ef2)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (GH-151215)...
Miss Islington (bot) [Wed, 10 Jun 2026 16:48:10 +0000 (18:48 +0200)] 
[3.15] gh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (GH-151215) (GH-151225)

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
2 weeks ago[3.15] gh-151126: Fix missing memory errors in `_interpchannelsmodule.c` (GH-151239...
Miss Islington (bot) [Wed, 10 Jun 2026 16:26:38 +0000 (18:26 +0200)] 
[3.15] gh-151126: Fix missing memory errors in `_interpchannelsmodule.c` (GH-151239) (#151265)

gh-151126: Fix missing memory errors in `_interpchannelsmodule.c` (GH-151239)
(cherry picked from commit 9fd1a125bc0ebdc26eae684da6e48ef24ee23b34)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-141984: Reword the Generator expressions section (GH-150518) (GH-151261)
Miss Islington (bot) [Wed, 10 Jun 2026 16:04:48 +0000 (18:04 +0200)] 
[3.15] gh-141984: Reword the Generator expressions section (GH-150518) (GH-151261)

(cherry picked from commit 7bbb9607a2e7d1f8a7de11ce02f0a2402d6e7262)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-143988: Fix re-entrant mutation crashes in socket sendmsg/recvmsg_into...
Miss Islington (bot) [Wed, 10 Jun 2026 14:25:33 +0000 (16:25 +0200)] 
[3.15] gh-143988: Fix re-entrant mutation crashes in socket sendmsg/recvmsg_into (GH-143987) (#151246)

gh-143988: Fix re-entrant mutation crashes in socket sendmsg/recvmsg_into (GH-143987)

Fix crashes in socket.sendmsg() and socket.recvmsg_into() that could
occur if buffer sequences are mutated re-entrantly during argument
parsing via __buffer__ protocol callbacks.

The bug occurs because:

1. PySequence_Fast() returns the original list object when the input
   is already a list (not a copy).
2. During iteration, PyObject_GetBuffer() triggers __buffer__
   callbacks which may clear the list.
3. Subsequent iterations access invalid memory (heap OOB read).

The fix replaces PySequence_Fast() with PySequence_Tuple() which
always creates a new tuple, ensuring the sequence cannot be mutated
during iteration.
(cherry picked from commit 896f7fdc7d0ba6d4ace06935b9d67c4da0f9ecbe)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: tonghuaroot <23011166+tonghuaroot@users.noreply.github.com>
2 weeks ago[3.15] add asyncio guide for Free-Threaded Python (GH-150456) (#151257)
Miss Islington (bot) [Wed, 10 Jun 2026 14:11:26 +0000 (16:11 +0200)] 
[3.15] add asyncio guide for Free-Threaded Python (GH-150456) (#151257)

add asyncio guide for Free-Threaded Python (GH-150456)
(cherry picked from commit e2bd50d2e1cfe474f3b1f88a3d2b7e26cfda1295)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks ago[3.15] Add yet one assertion in test_set_text_charset_cp949 (GH-151224) (GH-151237)
Miss Islington (bot) [Wed, 10 Jun 2026 13:36:58 +0000 (15:36 +0200)] 
[3.15] Add yet one assertion in test_set_text_charset_cp949 (GH-151224) (GH-151237)

Add yet one assertion in test_set_text_charset_cp949 (GH-151224)

Check bytes(m), not only str(m).
(cherry picked from commit 3ca93ab198497da9451101019b67c52e7873377d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.15] Docs: Fix typos in the "Memory Management" section (GH-151243) (GH-151247)
Miss Islington (bot) [Wed, 10 Jun 2026 13:21:48 +0000 (15:21 +0200)] 
[3.15] Docs: Fix typos in the "Memory Management" section (GH-151243) (GH-151247)

Docs: Fix typos in the "Memory Management" section (GH-151243)
(cherry picked from commit 8c0e2515bb0059b75e264cc5baeb27bb17337c83)

Co-authored-by: Manoj K M <manojkm24dev@gmail.com>
2 weeks ago[3.15] gh-89554: Document socket.SocketType as a class (GH-150683) (#151244)
Miss Islington (bot) [Wed, 10 Jun 2026 13:09:28 +0000 (15:09 +0200)] 
[3.15] gh-89554: Document socket.SocketType as a class (GH-150683) (#151244)

gh-89554: Document socket.SocketType as a class (GH-150683)

socket.SocketType is a class (re-exported from _socket as an alias of
_socket.socket, the base class of socket.socket), 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::", correct the misleading description
(SocketType is the base class of the socket type, not "type(socket(...))"
which is socket.socket; addresses gh-88427), move it into the Socket
Objects section, and document the socket object methods and attributes
nested under the socket class, dropping the redundant "socket." prefix.
(cherry picked from commit a621e8ad811e7d51d69b0969a2bd07888a02db1e)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
2 weeks ago[3.15] gh-150988: Fix refleak in `OSError` when attrs are set before `super().__init_...
Miss Islington (bot) [Wed, 10 Jun 2026 12:56:54 +0000 (14:56 +0200)] 
[3.15] gh-150988: Fix refleak in `OSError` when attrs are set before `super().__init__()` (GH-150990) (#151240)

gh-150988: Fix refleak in `OSError` when attrs are set before `super().__init__()` (GH-150990)
(cherry picked from commit f2a0f82282d6307f7fd2d4ccf52a8fd95ac3922f)

Co-authored-by: Lukas Geiger <lukas.geiger94@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-98894: Fix DTrace test_check_probes for shared builds (GH-151122) (#151235)
Miss Islington (bot) [Wed, 10 Jun 2026 11:35:01 +0000 (13:35 +0200)] 
[3.15] gh-98894: Fix DTrace test_check_probes for shared builds (GH-151122) (#151235)

gh-98894: Fix DTrace test_check_probes for shared builds (GH-151122)

When building with --enable-shared, the SystemTap/DTrace notes
live in libpython. Add detection logic to be used by readelf.

Force the C locale on readelf output.
(cherry picked from commit 3a08e9373977788e7691ec0a973fbe1abe170c91)

Co-authored-by: stratakis <cstratak@redhat.com>
2 weeks ago[3.15] gh-80384: Fix docs for PyWeakref_NewRef() and PyWeakref_NewProxy() (GH-151146)
Serhiy Storchaka [Wed, 10 Jun 2026 10:41:19 +0000 (13:41 +0300)] 
[3.15] gh-80384: Fix docs for PyWeakref_NewRef() and PyWeakref_NewProxy() (GH-151146)

The type of the callback argument is not checked.

2 weeks ago[3.15] gh-143008: Fix race re-initializing TextIOWrapper (#151203)
Cody Maloney [Wed, 10 Jun 2026 09:13:46 +0000 (02:13 -0700)] 
[3.15] gh-143008: Fix race re-initializing TextIOWrapper (#151203)

__init__() changes multiple variables and may be called more than once
from multiple threads.

2 weeks ago[3.15] gh-150700: Fix class-scope inline comprehensions when nested scopes reference...
Miss Islington (bot) [Tue, 9 Jun 2026 23:33:04 +0000 (01:33 +0200)] 
[3.15] gh-150700: Fix class-scope inline comprehensions when nested scopes reference `__class__` and friends (GH-150735) (#151211)

gh-150700: Fix class-scope inline comprehensions when nested scopes reference `__class__` and friends (GH-150735)

* Fix class-scope inline comprehensions when nested scopes reference `__class__` and friends

In `inline_comprehension()`, when `__class__` / `__classdict__` /
`__conditional_annotations__` appears as `FREE` in a comprehension's
symbol table because a nested scope captured it (e.g. nested lambdas),
this name is still discarded from `comp_free` unconditionally.

This prevents `drop_class_free()` from seeing it, so the appropriate
`ste_needs_(...)` flag is never set on the enclosing class.
That leads to `codegen_make_closure()` throwing `SystemError` when it
couldn't find `__class__` / `__classdict__` /
`__conditional_annotations__` in the class's cellvars.

From now on we just discard from `comp_free` when no child scope
(e.g. a lambda) still needs the name as `FREE`. When a child scope does
need it, keep it in `comp_free` so `drop_class_free()` can set the
appropriate flag and the class creates the implicit cell.

* Fix tests

* Fix typo

* Fix formatting

* Add test checking validity of `__class__` returned

* Prefer 'used' to 'deferred'
(cherry picked from commit ce916dc50644bb1de940f5fb580bd9907cceb959)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
3 weeks ago[3.15] gh-151112: Fix double free in `assemble_init` when out of memory (GH-151142...
Miss Islington (bot) [Tue, 9 Jun 2026 20:16:42 +0000 (22:16 +0200)] 
[3.15] gh-151112: Fix double free in `assemble_init` when out of memory (GH-151142) (#151205)

gh-151112: Fix double free in `assemble_init` when out of memory (GH-151142)
(cherry picked from commit 580499177ca91477b53b4a40afcec7d3370265b0)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.15] gh-151163: Update Android, macOS installer, and Windows builds to SQLite 3...
Miss Islington (bot) [Tue, 9 Jun 2026 18:56:57 +0000 (20:56 +0200)] 
[3.15] gh-151163: Update Android, macOS installer, and Windows builds to SQLite 3.53.2 (GH-151204)

(cherry picked from commit ab8ebe9034a85c441d1bb4208fa2d667fd38cc4d)

Co-authored-by: Zachary Ware <zach@python.org>
3 weeks ago[3.15] gh-151159: Update CI to use latest SSL library versions (GH-151199)
Miss Islington (bot) [Tue, 9 Jun 2026 17:57:09 +0000 (19:57 +0200)] 
[3.15] gh-151159: Update CI to use latest SSL library versions (GH-151199)

(cherry picked from commit 7053bbd7fd4967b8782bf0c8f6ad00248f0b0c5b)

Co-authored-by: Zachary Ware <zach@python.org>
3 weeks ago[3.15] gh-151159: Bump OpenSSL versions for iOS and Android (GH-151197)
Miss Islington (bot) [Tue, 9 Jun 2026 17:54:25 +0000 (19:54 +0200)] 
[3.15] gh-151159: Bump OpenSSL versions for iOS and Android (GH-151197)

(cherry picked from commit 627dd14346b4c4c13d9203430c32556467b7fbd3)

Co-authored-by: Zachary Ware <zach@python.org>
3 weeks ago[3.15] gh-151159: Update Windows builds to use OpenSSL 3.5.7 (GH-151189)
Miss Islington (bot) [Tue, 9 Jun 2026 17:44:44 +0000 (19:44 +0200)] 
[3.15] gh-151159: Update Windows builds to use OpenSSL 3.5.7 (GH-151189)

(cherry picked from commit 6688b0c71536ac99ed629fbd5ea4b226245ffac6)

Co-authored-by: Zachary Ware <zach@python.org>
3 weeks ago[3.15] gh-151159: Update macOS installer to use OpenSSL 3.5.7. (GH-151171) (#151192)
Miss Islington (bot) [Tue, 9 Jun 2026 17:33:23 +0000 (19:33 +0200)] 
[3.15] gh-151159: Update macOS installer to use OpenSSL 3.5.7. (GH-151171) (#151192)

(cherry picked from commit 720fb82603a3c93b5941144feac1f25eacf74c03)

Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
3 weeks ago[3.15] GH-59633: Clarify dest collisions in argparse docs (GH-150987) (#151188)
Miss Islington (bot) [Tue, 9 Jun 2026 17:15:41 +0000 (19:15 +0200)] 
[3.15] GH-59633: Clarify dest collisions in argparse docs (GH-150987) (#151188)

GH-59633: Clarify dest collisions in argparse docs (GH-150987)
(cherry picked from commit 82cb7d4bf62041b75a08628baa1f9fe761fd6a79)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
3 weeks ago[3.15] gh-151126: Add missing `PyErr_NoMemory` in `_winapi` module (GH-151154) (...
Miss Islington (bot) [Tue, 9 Jun 2026 17:10:18 +0000 (19:10 +0200)] 
[3.15] gh-151126: Add missing `PyErr_NoMemory` in `_winapi` module (GH-151154) (#151180)

gh-151126: Add missing `PyErr_NoMemory` in `_winapi` module (GH-151154)
(cherry picked from commit 8d94fa7b8696db6a7942f8a4b930289e69e9b174)

Co-authored-by: sobolevn <mail@sobolevn.me>
3 weeks ago[3.15] gh-150285: Fix too long docstrings in the asyncio package (GH-151074) (GH...
Miss Islington (bot) [Tue, 9 Jun 2026 16:41:54 +0000 (18:41 +0200)] 
[3.15] gh-150285: Fix too long docstrings in the asyncio package (GH-151074) (GH-151172)

(cherry picked from commit ed2b04248aa1f608099e03437aa280d1be6e80c3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.15] gh-150285: Fix too long docstrings in the concurrent package (GH-151076) ...
Miss Islington (bot) [Tue, 9 Jun 2026 16:41:26 +0000 (18:41 +0200)] 
[3.15] gh-150285: Fix too long docstrings in the concurrent package (GH-151076) (GH-151173)

(cherry picked from commit 0fa06f4d7fb3494a62ba2631362ce8b98a7eec25)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.15] GH-61082: Clarify nargs='*' positional default behavior (GH-150989) (#151168)
Miss Islington (bot) [Tue, 9 Jun 2026 15:46:39 +0000 (17:46 +0200)] 
[3.15] GH-61082: Clarify nargs='*' positional default behavior (GH-150989) (#151168)

GH-61082: Clarify nargs='*' positional default behavior (GH-150989)
(cherry picked from commit bc37a227b2f481d0f260f9beae5229e8d432a0cc)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
3 weeks ago[3.15] GH-54732: Tweak wording around empty lines in argument files (GH-150980) ...
Miss Islington (bot) [Tue, 9 Jun 2026 15:45:23 +0000 (17:45 +0200)] 
[3.15] GH-54732: Tweak wording around empty lines in argument files (GH-150980) (#151165)

GH-54732: Tweak wording around empty lines in argument files (GH-150980)
(cherry picked from commit 528550e0e753d64714f65a02d567bdc1d63ae3f1)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
3 weeks ago[3.15] Docs: Only add `profiling-sampling-visualization.{css,js}` to files when neces...
Miss Islington (bot) [Tue, 9 Jun 2026 13:24:28 +0000 (15:24 +0200)] 
[3.15] Docs: Only add `profiling-sampling-visualization.{css,js}` to files when necessary (GH-151150)

(cherry picked from commit 0a179e748bcf158bdcdd47f0e57a1983993f4610)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.15] gh-109503: Fix document for shutil.move() on usage of os.rename() since it...
Miss Islington (bot) [Tue, 9 Jun 2026 13:06:30 +0000 (15:06 +0200)] 
[3.15] gh-109503: Fix document for shutil.move() on usage of os.rename() since it's inaccurate (GH-109507) (GH-150611)

Nonatomic move might be used even if the files are
on the same filesystem in some cases.
(cherry picked from commit 6ecd197c03c43412fc400235949fd8297f142e89)

Co-authored-by: Fang Li <fangli@users.noreply.github.com>
3 weeks ago[3.15] gh-151039: Fix a crash when `_datetime` types outlive `_datetime` module ...
Miss Islington (bot) [Tue, 9 Jun 2026 12:14:47 +0000 (14:14 +0200)] 
[3.15] gh-151039: Fix a crash when `_datetime` types outlive `_datetime` module (GH-151044) (#151143)

gh-151039: Fix a crash when `_datetime` types outlive `_datetime` module (GH-151044)
(cherry picked from commit 9fdbade99e6bcc607d9f12416bfca5bbf94022b9)

Co-authored-by: sobolevn <mail@sobolevn.me>
3 weeks ago[3.15] gh-151130: Add more tests for PyWeakref_* C API (GH-151131) (GH-151140)
Miss Islington (bot) [Tue, 9 Jun 2026 11:37:56 +0000 (13:37 +0200)] 
[3.15] gh-151130: Add more tests for PyWeakref_* C API (GH-151131) (GH-151140)

(cherry picked from commit c3cd75afdf86f6a811663c71da22cc24c784a6f4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.15] gh-151126: Fix missing `PyErr_NoMemory()` in `remove_unused_consts` (GH-151127...
Miss Islington (bot) [Tue, 9 Jun 2026 10:33:02 +0000 (12:33 +0200)] 
[3.15] gh-151126: Fix missing `PyErr_NoMemory()` in `remove_unused_consts` (GH-151127) (#151134)

gh-151126: Fix missing `PyErr_NoMemory()` in `remove_unused_consts` (GH-151127)
(cherry picked from commit 3186547c1ec76e1afab82ec32271ec5b9467fdeb)

Co-authored-by: sobolevn <mail@sobolevn.me>
3 weeks ago[3.15] gh-149321: Remove lazy_imports=none startup mode (GH-149389) (#150129)
Pablo Galindo Salgado [Mon, 8 Jun 2026 22:55:57 +0000 (23:55 +0100)] 
[3.15] gh-149321: Remove lazy_imports=none startup mode (GH-149389) (#150129)

3 weeks ago[3.15] gh-148932: Fix `profiling.sampling` on Windows virtual environments (GH-150541...
Miss Islington (bot) [Mon, 8 Jun 2026 22:04:06 +0000 (00:04 +0200)] 
[3.15] gh-148932: Fix `profiling.sampling` on Windows virtual environments (GH-150541) (#151097)

gh-148932: Fix `profiling.sampling` on Windows virtual environments (GH-150541)
(cherry picked from commit 5c1321731403031d933ca469977e4bb3859c8680)

Co-authored-by: Eduardo Villalpando Mello <eduardovil@microsoft.com>
3 weeks ago[3.15] gh-150633: Minor improvement of a newly added test (GH-151103) (#151106)
Miss Islington (bot) [Mon, 8 Jun 2026 20:04:02 +0000 (22:04 +0200)] 
[3.15] gh-150633: Minor improvement of a newly added test (GH-151103) (#151106)

gh-150633: Minor improvement of a newly added test (GH-151103)

Minor improvement of a newly added test.
(cherry picked from commit fccf67a35449920484ea11d8a16566b58b0c4519)

Co-authored-by: Barry Warsaw <barry@python.org>
3 weeks ago[3.15] gh-151070: Fix class referencing typo in collections.abc docs (GH-151088)...
Miss Islington (bot) [Mon, 8 Jun 2026 19:47:05 +0000 (21:47 +0200)] 
[3.15] gh-151070: Fix class referencing typo in collections.abc docs (GH-151088) (GH-151110)

(cherry picked from commit 29a920e80e21490b5bdb7178373f80fe606a4403)

Co-authored-by: Arshal Aromal <arshalaromal19@gmail.com>
3 weeks ago[3.15] gh-150633: Properly handle null characters in the name when importing frozen...
Miss Islington (bot) [Mon, 8 Jun 2026 18:58:11 +0000 (20:58 +0200)] 
[3.15] gh-150633: Properly handle null characters in the name when importing frozen modules (GH-150634) (GH-151100)

(cherry picked from commit 54de5475cd753e2519692c3e54af0f150e0a8b62)

Co-authored-by: Thomas Kowalski <thom.kowa@gmail.com>
3 weeks ago[3.15] gh-119949: Refactor test_exc() helper in test_format.py (GH-135452) (GH-150329)
Miss Islington (bot) [Mon, 8 Jun 2026 18:01:52 +0000 (20:01 +0200)] 
[3.15] gh-119949: Refactor test_exc() helper in test_format.py (GH-135452) (GH-150329)

Use assertRaisesRegex() context and fix
https://github.com/python/cpython/pull/119781#pullrequestreview-2088240959

(cherry picked from commit 0851700a9d99ca4bebd8d5f9d73c8c9ab1084405)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
3 weeks ago[3.15] gh-149816: Fix SNI callback callable race (GH-150018) (GH-150099)
Miss Islington (bot) [Mon, 8 Jun 2026 18:01:31 +0000 (20:01 +0200)] 
[3.15] gh-149816: Fix SNI callback callable race (GH-150018) (GH-150099)

(cherry picked from commit 8b31d08e62b9714cf8dd1d8b19afa5ecbad2414a)

Co-authored-by: Kirill Ignatev <kiri11@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
3 weeks ago[3.15] gh-151019: Fix test_os on 32-bit FreeBSD (GH-151087) (#151093)
Miss Islington (bot) [Mon, 8 Jun 2026 17:25:50 +0000 (19:25 +0200)] 
[3.15] gh-151019: Fix test_os on 32-bit FreeBSD (GH-151087) (#151093)

gh-151019: Fix test_os on 32-bit FreeBSD (GH-151087)

Remove references to server.handler_instance. This attribute has been
removed in 2022 by commit 3ae975f1ac880c47d51cca6c9e305547bd365be7.
(cherry picked from commit a9002349cbe3f2243fe53a9fcadd02318dd0caf9)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks ago[3.15] gh-106318: Add examples to the `str.isdigit()` method docs (GH-144721)
Miss Islington (bot) [Mon, 8 Jun 2026 12:59:46 +0000 (14:59 +0200)] 
[3.15] gh-106318: Add examples to the `str.isdigit()` method docs  (GH-144721)

(cherry picked from commit f051c68923b4060b03566d0ea1df06d911ebe238)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.15] gh-141623: Clarify operator function descriptions (GH-141846)
Miss Islington (bot) [Mon, 8 Jun 2026 12:21:22 +0000 (14:21 +0200)] 
[3.15] gh-141623: Clarify operator function descriptions (GH-141846)

(cherry picked from commit bd5fa31c5ff47866f0f93ef2a674e78d56d2e44c)

Co-authored-by: Doron Behar <doron.behar@gmail.com>
3 weeks ago[3.15] Mention `frozendict` in `object.__hash__()` documentation (GH-148867) (#151077)
Miss Islington (bot) [Mon, 8 Jun 2026 11:47:55 +0000 (13:47 +0200)] 
[3.15] Mention `frozendict` in `object.__hash__()` documentation (GH-148867) (#151077)

(cherry picked from commit e3762114e514f7790e9b4cf3a7b9478f2f306901)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
3 weeks ago[3.15] gh-101100: Fix Sphinx warnings in 'Buffer Object Structures' documentation...
Miss Islington (bot) [Mon, 8 Jun 2026 10:32:43 +0000 (12:32 +0200)] 
[3.15] gh-101100: Fix Sphinx warnings in 'Buffer Object Structures' documentation (GH-151058)

(cherry picked from commit a1873300eebe9c634f59592c3333035768f09de9)

Co-authored-by: Christian Zinck <christian.zinck@gmail.com>
3 weeks ago[3.15] Docs: Fix missing colon in `bisect` example function (GH-151061) (GH-151067)
Miss Islington (bot) [Mon, 8 Jun 2026 09:47:41 +0000 (11:47 +0200)] 
[3.15] Docs: Fix missing colon in `bisect` example function (GH-151061) (GH-151067)

Docs: Fix missing colon in `bisect` example function (GH-151061)
(cherry picked from commit 16ede813ebad81e41874f1c0a1b3c83fc98a38ca)

Co-authored-by: Sergio López Gómez <sergiolopezgmz.dam@gmail.com>
3 weeks ago[3.15] Update an error message in the 'Functional Programming HOWTO' (GH-151047)
Miss Islington (bot) [Sun, 7 Jun 2026 17:25:37 +0000 (19:25 +0200)] 
[3.15] Update an error message in the 'Functional Programming HOWTO' (GH-151047)

(cherry picked from commit 81965c1683d7129a70e3fde22ea8a02b9398e227)

Co-authored-by: saber-bit <bryanventura0324@gmail.com>
3 weeks ago[3.15] gh-150599: Prevent bz2 decompressor reuse after errors (GH-150600)
Miss Islington (bot) [Sun, 7 Jun 2026 16:48:30 +0000 (18:48 +0200)] 
[3.15] gh-150599: Prevent bz2 decompressor reuse after errors (GH-150600)

(cherry picked from commit 5755d0f083949ff3c5bf3a37e673e24e306b036e)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.15] gh-151021: Fix mmap empty searches past the end (GH-151023) (GH-151041)
Miss Islington (bot) [Sun, 7 Jun 2026 13:27:26 +0000 (15:27 +0200)] 
[3.15] gh-151021: Fix mmap empty searches past the end (GH-151023) (GH-151041)

(cherry picked from commit f2cab7b0cf019fcc3112018db5e20c00976f33d4)

Co-authored-by: esadomer <54475303+esadomer@users.noreply.github.com>
3 weeks ago[3.15] gh-148954: Escape methodname in xmlrpc.client.dumps() to prevent XML injection...
Miss Islington (bot) [Sun, 7 Jun 2026 07:52:40 +0000 (09:52 +0200)] 
[3.15] gh-148954: Escape methodname in xmlrpc.client.dumps() to prevent XML injection (GH-148968) (GH-151033)

(cherry picked from commit ab930175e7e909aaa3ec7e761bfdbb886677bebb)

Co-authored-by: Sanyam Kumat <124618873+sanyamk23@users.noreply.github.com>
3 weeks ago[3.15] gh-50948: IDLE: Warn if saving a file will overwrite a newer version (GH-17578...
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>
3 weeks 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>
3 weeks 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)

3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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)

3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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>
3 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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 weeks agoPost 3.15.0b2
Hugo van Kemenade [Tue, 2 Jun 2026 17:34:33 +0000 (20:34 +0300)] 
Post 3.15.0b2

4 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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>