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

(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>
13 hours ago[3.13] Delete mention encoding and errors for importlib.resources.path() (GH-143111...
Miss Islington (bot) [Sat, 6 Jun 2026 11:58:49 +0000 (13:58 +0200)] 
[3.13] Delete mention encoding and errors for importlib.resources.path() (GH-143111) (GH-151016)

(cherry picked from commit fded34d6fe8c300f5625b7fddb86a4c56ecc35c5)

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

(cherry picked from commit fab449bddbc4ff03677d49448cf6ea1f9d6a319f)

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

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.13] Use `time.monotonic` in OrderedDict LRU cache example (GH-150986) (#150993)
Miss Islington (bot) [Fri, 5 Jun 2026 22:59:53 +0000 (00:59 +0200)] 
[3.13] Use `time.monotonic` in OrderedDict LRU cache example (GH-150986) (#150993)

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>
36 hours ago[3.13] gh-150907: Fix dynamic_annotations.h when built with C++ and Valgrind (GH...
Miss Islington (bot) [Fri, 5 Jun 2026 12:29:28 +0000 (14:29 +0200)] 
[3.13] gh-150907: Fix dynamic_annotations.h when built with C++ and Valgrind (GH-150914) (#150964)

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.13] gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328) ...
Miss Islington (bot) [Fri, 5 Jun 2026 12:07:39 +0000 (14:07 +0200)] 
[3.13] gh-129011: Update docs for Raw I/O read, readinto, and write (GH-135328) (#150959)

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>
2 days ago[3.13] gh-150913: Fix sqlite3.Blob validation for empty slice assignment (GH-150915...
Miss Islington (bot) [Thu, 4 Jun 2026 13:59:11 +0000 (15:59 +0200)] 
[3.13] gh-150913: Fix sqlite3.Blob validation for empty slice assignment (GH-150915) (GH-150925)

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.13] gh-106318: Add doctest role and a 'See also' to the `str.split()` docs (GH...
Miss Islington (bot) [Thu, 4 Jun 2026 13:23:07 +0000 (15:23 +0200)] 
[3.13] 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.13] Correct Stable ABI documentation for METH_FASTCALL (GH-149593) (GH-150851)
Miss Islington (bot) [Thu, 4 Jun 2026 09:50:19 +0000 (11:50 +0200)] 
[3.13] Correct Stable ABI documentation for METH_FASTCALL (GH-149593) (GH-150851)

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.13] gh-140553: Mark `*gettext` parameters as positionaly only in documentation...
Miss Islington (bot) [Thu, 4 Jun 2026 08:19:56 +0000 (10:19 +0200)] 
[3.13] 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>
3 days ago[3.13] Docs: Replace hardcoded `SOURCE_URI` with `patchlevel` check (GH-150850) ...
Hugo van Kemenade [Wed, 3 Jun 2026 13:50:07 +0000 (16:50 +0300)] 
[3.13] Docs: Replace hardcoded `SOURCE_URI` with `patchlevel` check (GH-150850) (#150857)

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

* 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.13] Fix a typo in `SSLSocket` docs (GH-150839) (GH-150847)
Miss Islington (bot) [Wed, 3 Jun 2026 12:26:03 +0000 (14:26 +0200)] 
[3.13] Fix a typo in `SSLSocket` docs (GH-150839) (GH-150847)

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

Co-authored-by: Robsdedude <dev@rouvenbauer.de>
4 days ago[3.13] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (...
Alex Waygood [Tue, 2 Jun 2026 22:26:33 +0000 (23:26 +0100)] 
[3.13] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150814)

gh-150319: Replace all documentation which says "See PEP 585" (#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

---------

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: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 days ago[3.13] gh-141627: Fix BufferedRandom inheritance documentation (GH-141629) (GH-150803)
Miss Islington (bot) [Tue, 2 Jun 2026 19:22:45 +0000 (21:22 +0200)] 
[3.13] gh-141627: Fix BufferedRandom inheritance documentation (GH-141629) (GH-150803)

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.13] Fix description of the function parameter of shutil.register_archive_format...
Miss Islington (bot) [Tue, 2 Jun 2026 19:20:16 +0000 (21:20 +0200)] 
[3.13] Fix description of the function parameter of shutil.register_archive_format() (GH-145087) (GH-150806)

(cherry picked from commit 18c6d3ccc32232a28a5288708818ef9c4fecba1a)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
4 days ago[3.13] gh-101913: changed wording of docstring for _parsedate_tz (GH-134446) (#150798)
Miss Islington (bot) [Tue, 2 Jun 2026 17:52:09 +0000 (19:52 +0200)] 
[3.13] gh-101913: changed wording of docstring for _parsedate_tz (GH-134446) (#150798)

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 ago[3.13] gh-149079: Fix O(n^2) canonical ordering in unicodedata.normalize() (GH-149080...
Petr Viktorin [Tue, 2 Jun 2026 16:12:42 +0000 (18:12 +0200)] 
[3.13] gh-149079: Fix O(n^2) canonical ordering in unicodedata.normalize() (GH-149080) (#150780)

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: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
4 days ago[3.13] gh-89554: Document _thread.LockType as a class (#150684) (#150786)
Victor Stinner [Tue, 2 Jun 2026 13:13:35 +0000 (15:13 +0200)] 
[3.13] gh-89554: Document _thread.LockType as a class (#150684) (#150786)

gh-89554: Document _thread.LockType as a class (#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.13] gh-149738: Fix segmentation fault bug in sqllite3 (#149754) (#150770)
Victor Stinner [Tue, 2 Jun 2026 12:52:30 +0000 (14:52 +0200)] 
[3.13] gh-149738: Fix segmentation fault bug in sqllite3 (#149754) (#150770)

gh-149738: Fix segmentation fault bug in sqllite3 (#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.13] Fix a typo in 'Exception Handling' C-API documentation (GH-150674)
Manoj K M [Tue, 2 Jun 2026 11:28:12 +0000 (16:58 +0530)] 
[3.13] Fix a typo in 'Exception Handling' C-API documentation (GH-150674)

(cherry picked from commit cee3327b9264a653cdbd2f9bb1ffa74a95be66e9)

4 days ago[3.13] gh-123138: Updated email.headerregistry docs to include required keyword parse...
Miss Islington (bot) [Tue, 2 Jun 2026 09:26:18 +0000 (11:26 +0200)] 
[3.13] gh-123138: Updated email.headerregistry docs to include required keyword parse_tree (GH-134450) (GH-150625)

(cherry picked from commit 2c20f9ce17abcbc36a105fd9de0b15797b6401ae)

Co-authored-by: Gustaf <79180496+gostak-dd@users.noreply.github.com>
4 days ago[3.13] gh-89554: Document typing.ParamSpecArgs and ParamSpecKwargs as classes (GH...
Miss Islington (bot) [Tue, 2 Jun 2026 08:14:43 +0000 (10:14 +0200)] 
[3.13] gh-89554: Document typing.ParamSpecArgs and ParamSpecKwargs as classes (GH-150677) (GH-150765)

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.13] gh-89554: Document weakref type objects as classes (GH-150678) (GH-150758)
Miss Islington (bot) [Tue, 2 Jun 2026 08:06:04 +0000 (10:06 +0200)] 
[3.13] gh-89554: Document weakref type objects as classes (GH-150678) (GH-150758)

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.13] gh-89554: Document NoneType, NotImplementedType and EllipsisType as classes...
Miss Islington (bot) [Tue, 2 Jun 2026 08:02:01 +0000 (10:02 +0200)] 
[3.13] gh-89554: Document NoneType, NotImplementedType and EllipsisType as classes (GH-150682) (GH-150757)

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>
5 days ago[3.13] gh-150644: Tag Apple system log messages as public. (GH-150645) (#150740)
Miss Islington (bot) [Mon, 1 Jun 2026 22:48:28 +0000 (00:48 +0200)] 
[3.13] gh-150644: Tag Apple system log messages as public. (GH-150645) (#150740)

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.13] gh-148508: Add another common pattern for iOS SSL failures to test_ssl (GH...
Miss Islington (bot) [Mon, 1 Jun 2026 22:19:53 +0000 (00:19 +0200)] 
[3.13] gh-148508: Add another common pattern for iOS SSL failures to test_ssl (GH-150442) (#150699)

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.13] gh-148672: Document namespace subpackages inside regular packages (GH-150056...
Miss Islington (bot) [Mon, 1 Jun 2026 19:29:31 +0000 (21:29 +0200)] 
[3.13] gh-148672: Document namespace subpackages inside regular packages (GH-150056) (#150731)

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.13] gh-150436: Skip subprocess test on STATUS_DLL_INIT_FAILED (#150704) (#150721)
Victor Stinner [Mon, 1 Jun 2026 15:44:54 +0000 (17:44 +0200)] 
[3.13] gh-150436: Skip subprocess test on STATUS_DLL_INIT_FAILED (#150704) (#150721)

gh-150436: Skip subprocess test on STATUS_DLL_INIT_FAILED (#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)

6 days ago[3.13] gh-150685: update bundled pip to 26.1.2 (gh-150686) (gh-150689)
Miss Islington (bot) [Sun, 31 May 2026 20:13:21 +0000 (22:13 +0200)] 
[3.13] gh-150685: update bundled pip to 26.1.2 (gh-150686) (gh-150689)

6 days ago[3.13] gh-141444:fix broken URLs and examples in urllib.request.rst (GH-144863) ...
Senthil Kumaran [Sun, 31 May 2026 19:57:53 +0000 (12:57 -0700)] 
[3.13] gh-141444:fix broken URLs and examples in urllib.request.rst (GH-144863) (#150647)

* 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>
6 days ago[3.13] Clarify docs for scheduler.run(blocking=False) (GH-129575) (GH-150670)
Miss Islington (bot) [Sun, 31 May 2026 12:18:09 +0000 (14:18 +0200)] 
[3.13] Clarify docs for scheduler.run(blocking=False) (GH-129575) (GH-150670)

(cherry picked from commit 2f8f569ba911ab3cff1356a15a3e688adc4ae917)

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

(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.13] gh-150372: Add missing null check on completer_word_break_characters in readli...
Miss Islington (bot) [Sun, 31 May 2026 11:59:05 +0000 (13:59 +0200)] 
[3.13] gh-150372: Add missing null check on completer_word_break_characters in readline.c (GH-150251) (GH-150630)

(cherry picked from commit 56bd9ea676d5ab4d5f6c68aefc3125ef5a216157)

Co-authored-by: Thomas Kowalski <thom.kowa@gmail.com>
6 days ago[3.13] Correct frexp() docs for zero and non-finite numbers (GH-149753) (GH-150654)
Sergey B Kirpichev [Sun, 31 May 2026 07:58:24 +0000 (10:58 +0300)] 
[3.13] Correct frexp() docs for zero and non-finite numbers (GH-149753) (GH-150654)

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

6 days ago[3.13] gh-117291: Explain usage of null bytes in Array(c_char).value (GH-117292)...
Miss Islington (bot) [Sun, 31 May 2026 07:27:33 +0000 (09:27 +0200)] 
[3.13] gh-117291: Explain usage of null bytes in Array(c_char).value (GH-117292) (GH-150651)

(cherry picked from commit 73d8e9a47cc13ce1b9b1bdfdeaa958639b144f55)

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

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>
7 days ago[3.13] gh-129851: Fix the documentation for -m command (GH-129862) (GH-150619) (GH...
Miss Islington (bot) [Sat, 30 May 2026 17:44:52 +0000 (19:44 +0200)] 
[3.13] gh-129851: Fix the documentation for -m command (GH-129862) (GH-150619) (GH-150620)

[3.14] gh-129851: Fix the documentation for -m command (GH-129862) (GH-150619)

(cherry picked from commit 9baa7c63bee1ad2b243f16109a3fd206a1f13a6a)
(cherry picked from commit 088c8ea18829c219d36441a8cb86da6da75fe755)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Dhruv Singla <68206552+d-s-dc@users.noreply.github.com>
7 days ago[3.13] gh-150406: Check result of PyThread_allocate_lock() for netdb_lock (GH-150407...
Miss Islington (bot) [Sat, 30 May 2026 16:56:46 +0000 (18:56 +0200)] 
[3.13] gh-150406: Check result of PyThread_allocate_lock() for netdb_lock (GH-150407) (GH-150618)

(cherry picked from commit 1e18c45495185cb547d43c3dd4c1cbdd8482867b)

Co-authored-by: Thomas Kowalski <thom.kowa@gmail.com>
7 days ago[3.13] gh-149489: Fix ElementTree serialization to HTML (GH-149490) (GH-150596) ...
Miss Islington (bot) [Sat, 30 May 2026 11:16:32 +0000 (13:16 +0200)] 
[3.13] gh-149489: Fix ElementTree serialization to HTML (GH-149490) (GH-150596) (GH-150609)

* The content of elements "xmp", "iframe", "noembed", "noframes",
  and "plaintext" is no longer escaped.
* The "plaintext" element no longer have the closing tag.
(cherry picked from commit c42e6d3f1a066186f74d3971df4c512bc11c7997)

(cherry picked from commit bcd29e466f55d8b4e3849ed6ada8ce86a46f5072)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
7 days ago[3.13] gh-150501: Correct `inspect.getattr_static` docs signature (GH-150504) (#150603)
Miss Islington (bot) [Sat, 30 May 2026 09:26:59 +0000 (11:26 +0200)] 
[3.13] gh-150501: Correct `inspect.getattr_static` docs signature (GH-150504) (#150603)

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.13] Add a security warning about `pydoc`'s HTTP server (GH-150409)
Miss Islington (bot) [Fri, 29 May 2026 19:08:16 +0000 (21:08 +0200)] 
[3.13] Add a security warning about `pydoc`'s HTTP server (GH-150409)

(cherry picked from commit 5535c1f9c08e929f96fa5d798277e3a2c91ed12a)

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

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>
9 days ago[3.13] gh-139808: Add branch protections for aarch64 in asm_trampoline.S (GH-130864...
Miss Islington (bot) [Thu, 28 May 2026 17:10:24 +0000 (19:10 +0200)] 
[3.13] gh-139808: Add branch protections for aarch64 in asm_trampoline.S (GH-130864) (GH-150189) (#150194)

[3.14] gh-139808: Add branch protections for aarch64 in asm_trampoline.S (GH-130864) (GH-150189)

gh-139808: Add branch protections for aarch64 in asm_trampoline.S (GH-130864)

Apply protection against ROP/JOP attacks for aarch64 on asm_trampoline.S.

The BTI flag must be applied in assembler sources for this class
of attacks to be mitigated on newer aarch64 processors.

See also:
https://sourceware.org/annobin/annobin.html/Test-branch-protection.html
and
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/enabling-pac-and-bti-on-aarch64

The 3.14 backport makes Python/jit_unwind.c changes in
Python/perf_jit_trampoline.c.

(cherry picked from commit da8477b25c6124c961306d4d7cd5ec7dafda6be4)
(cherry picked from commit c863e96455ea8b7f1e958eb0c9e188b05f7770a4)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: stratakis <cstratak@redhat.com>
9 days ago[3.13] gh-150046: Fix `test_add_python_opts` to ignore `PYTHON*` env vars (GH-150089...
Miss Islington (bot) [Thu, 28 May 2026 17:08:53 +0000 (19:08 +0200)] 
[3.13] gh-150046: Fix `test_add_python_opts` to ignore `PYTHON*` env vars (GH-150089) (#150563)

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.13] Add a prominent crash warning to the `ctypes` docs (GH-150410)
Stan Ulbrych [Thu, 28 May 2026 15:01:15 +0000 (16:01 +0100)] 
[3.13] Add a prominent crash warning to the `ctypes` docs (GH-150410)

(cherry picked from commit b53f6ca850b500621474e82931c3e7216d9a1cb1)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
10 days ago[3.13] gh-150285: Fix too long docstrings in _wmi.exec_query (GH-150373) (GH-150520...
Serhiy Storchaka [Wed, 27 May 2026 18:22:45 +0000 (21:22 +0300)] 
[3.13] gh-150285: Fix too long docstrings in _wmi.exec_query (GH-150373) (GH-150520) (GH-150531)

(cherry picked from commit 40c80434a68613403ecf278ae0744ffd0867490c)

(cherry picked from commit fbeafc062e55a52ba7369c36be0b3eb34eabb560)

10 days ago[3.13] gh-150285: Fix too long docstrings in some Python modules (GH-150366) (GH...
Serhiy Storchaka [Wed, 27 May 2026 18:22:35 +0000 (21:22 +0300)] 
[3.13] gh-150285: Fix too long docstrings in some Python modules (GH-150366) (GH-150375) (GH-150519) (GH-150530)

(cherry picked from commit 01c6d3d76bf222d8b847c97e0a3d3fad0c1b1fe3)
(cherry picked from commit 03244b9f043a31eaa9243d90d01139294155e1f3)
(cherry picked from commit 2a5e7d5bd05c36a7e0f4b7ed053b0451f3cf2ba0)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
10 days ago[3.13] gh-84353: Preserve non-UTF-8 filenames when appending to ZipFile (GH-150091...
Miss Islington (bot) [Wed, 27 May 2026 18:21:14 +0000 (20:21 +0200)] 
[3.13] gh-84353: Preserve non-UTF-8 filenames when appending to ZipFile (GH-150091) (GH-150529)

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.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH...
Serhiy Storchaka [Wed, 27 May 2026 18:06:50 +0000 (21:06 +0300)] 
[3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526)

(cherry picked from commit 49975a511fdfed2f6dd396c110fb915aedbda686)
(cherry picked from commit cf73b17adfd102a34a01efbad89a83dffdec2806)
(cherry picked from commit 287c98f4cb40c15d638651de4b29ae98b92589aa)

10 days ago[3.13] gh-149861: Fix rule in match statement `case_block` PEG grammar (#150512)
Miss Islington (bot) [Wed, 27 May 2026 15:25:43 +0000 (17:25 +0200)] 
[3.13] gh-149861: Fix rule in match statement `case_block` PEG grammar (#150512)

(cherry picked from commit 99c254e2f79a4197524bef61bf0d12251ee273e6)

Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
10 days ago[3.13] gh-88726: Stop using non-standard charset names eucgb2312_cn and big5_tw in...
Miss Islington (bot) [Wed, 27 May 2026 10:53:08 +0000 (12:53 +0200)] 
[3.13] gh-88726: Stop using non-standard charset names eucgb2312_cn and big5_tw in email (GH-149959) (GH-150493)

(cherry picked from commit 5e467f4331d4cb7a8e2986c27af7eb68ccaccb37)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
10 days ago[3.13] gh-149571: Fix the C implementation of Element.itertext() (GH-149929) (GH...
Miss Islington (bot) [Wed, 27 May 2026 10:49:54 +0000 (12:49 +0200)] 
[3.13] gh-149571: Fix the C implementation of Element.itertext() (GH-149929) (GH-150511)

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.13] gh-150175: Fix ThreadingMock call_count race condition (GH-150176) (#150180)
Miss Islington (bot) [Tue, 26 May 2026 19:47:20 +0000 (21:47 +0200)] 
[3.13] gh-150175: Fix ThreadingMock call_count race condition (GH-150176) (#150180)

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.13] gh-150285: Fix too long docstrings in builtins (GH-150293) (GH-150466) (GH...
Serhiy Storchaka [Tue, 26 May 2026 10:34:50 +0000 (13:34 +0300)] 
[3.13] gh-150285: Fix too long docstrings in builtins (GH-150293) (GH-150466) (GH-150472)

(cherry picked from commit 730fc6a8586218f7b00489b2f8385dcff819411e)
(cherry picked from commit e1e06be11908ddb6935e8df35f972879dd1bc3d8)

11 days ago[3.13] gh-150285: Fix too long docstrings in the io module (GH-150287) (GH-150458...
Serhiy Storchaka [Tue, 26 May 2026 10:29:28 +0000 (13:29 +0300)] 
[3.13] gh-150285: Fix too long docstrings in the io module (GH-150287) (GH-150458) (GH-150470)

(cherry picked from commit 36137e46a8c2bce489b118e2755f9d70d8565dd1)
(cherry picked from commit 160dc74122ed4e31540b2ef2c77bda122b02c94a)

11 days ago[3.13] gh-150285: Fix too long docstrings in the sqlite3 module (GH-150290) (GH-15046...
Serhiy Storchaka [Tue, 26 May 2026 10:11:11 +0000 (13:11 +0300)] 
[3.13] gh-150285: Fix too long docstrings in the sqlite3 module (GH-150290) (GH-150461) (GH-150471)

(cherry picked from commit 7168b02795e5af4f59f9416a2e6a61a13fc45180)
(cherry picked from commit 0466560b310fa74c38270328d66d6a16df95ec34)

11 days ago[3.13] gh-150285: Fix too long docstrings in the pyexpat module (GH-150294) (GH-15046...
Serhiy Storchaka [Tue, 26 May 2026 10:01:15 +0000 (13:01 +0300)] 
[3.13] gh-150285: Fix too long docstrings in the pyexpat module (GH-150294) (GH-150463) (GH-150468)

(cherry picked from commit ad1bb6c14cb6d70bcf6411b84f9aaac07b28b416)
(cherry picked from commit 9da7923835a4c72e738551bbd78b8179a81286ad)

11 days ago[3.13] gh-150285: Fix too long docstrings in the curses module (GH-150286) (GH-150457...
Serhiy Storchaka [Tue, 26 May 2026 09:58:11 +0000 (12:58 +0300)] 
[3.13] gh-150285: Fix too long docstrings in the curses module (GH-150286) (GH-150457) (GH-150469)

(cherry picked from commit e7f1216204b3cd80d840c3e7726290a914c9a6f9)
(cherry picked from commit 4c0fe2d134f6ddaa4c705ffba073d9d5874b7fe4)

11 days ago[3.13] gh-150285: Fix too long docstrings in the decimal module (GH-150288) (GH-15046...
Miss Islington (bot) [Tue, 26 May 2026 09:49:41 +0000 (11:49 +0200)] 
[3.13] gh-150285: Fix too long docstrings in the decimal module (GH-150288) (GH-150460) (GH-150465)

(cherry picked from commit 9d79e71fb68d6a35d26d28d335b466465afaa165)
(cherry picked from commit 6bed57a3b659a34c4a7d75e76f4fe840f762bf7f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
11 days ago[3.13] gh-150443: Exclude explicit dup3 and pipe2 checks on iOS builds. (GH-150444...
Russell Keith-Magee [Tue, 26 May 2026 05:07:20 +0000 (13:07 +0800)] 
[3.13] gh-150443: Exclude explicit dup3 and pipe2 checks on iOS builds. (GH-150444) (#150448)

Exclude explicit dup3 and pipe2 checks on iOS builds.
(cherry picked from commit 629da5c914b4407e01c1dc06cbcbd8dce825fef3)

12 days ago[3.13] gh-80198: Improve test_pwd and test_grp (GH-150380) (GH-150398) (GH-150423)
Miss Islington (bot) [Mon, 25 May 2026 19:10:25 +0000 (21:10 +0200)] 
[3.13] gh-80198: Improve test_pwd and test_grp (GH-150380) (GH-150398) (GH-150423)

Fix tests for non-existing names and ids when getpwall()/getgrall()
don't return all users/groups.

Add tests for out-of-range uids, integer float ids, bytes names,
null-terminated names, names with surrogates, empty names, excessive
arguments.
(cherry picked from commit 4bdff2cc89dad8f3fa63b98dd12ba22a8b3eb6e0)
(cherry picked from commit 46e8f7a9e794bfb0fdc5ee82348623eb2b91a0b5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 days ago[3.13] gh-149156: Fix perf trampoline crash after fork (GH-150347) (#150393)
Miss Islington (bot) [Mon, 25 May 2026 18:19:07 +0000 (20:19 +0200)] 
[3.13] gh-149156: Fix perf trampoline crash after fork (GH-150347) (#150393)

12 days ago[3.13] gh-149449: Fix use-after-free in `_PyUnicode_GetNameCAPI` (GH-150323) (#150354)
Miss Islington (bot) [Mon, 25 May 2026 10:40:48 +0000 (12:40 +0200)] 
[3.13] gh-149449: Fix use-after-free in `_PyUnicode_GetNameCAPI` (GH-150323) (#150354)

gh-149449: Fix use-after-free in `_PyUnicode_GetNameCAPI` (GH-150323)
(cherry picked from commit 43c60ec2fddd316a4a6b7b6c68eae7cb66df0850)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
12 days ago[3.13] gh-145896: Fix typos and stale docstrings in the traceback module (GH-145897...
Miss Islington (bot) [Mon, 25 May 2026 10:07:38 +0000 (12:07 +0200)] 
[3.13] gh-145896: Fix typos and stale docstrings in the traceback module (GH-145897) (GH-150384)

(cherry picked from commit 832afeddcea78e40d39c47cd1893f8137e588e72)

Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
13 days ago[3.13] gh-110704: Recommend `distclean` target over `clean` when source tree is not...
Miss Islington (bot) [Sun, 24 May 2026 15:47:49 +0000 (17:47 +0200)] 
[3.13] gh-110704: Recommend `distclean` target over `clean` when source tree is not clean (GH-112610) (#150344)

gh-110704: Recommend `distclean` target over `clean` when source tree is not clean (GH-112610)

Recommend `distclean` target over `clean` when source tree is not clean
(cherry picked from commit 34631058f2aec6752ebfc50d40958b247532f536)

Co-authored-by: James <6125322+SnoopJ@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
13 days ago[3.13] gh-142516: fix reference leaks in `ssl.SSLContext` objects (GH-143685) (GH...
Bénédikt Tran [Sun, 24 May 2026 09:43:03 +0000 (11:43 +0200)] 
[3.13] gh-142516: fix reference leaks in `ssl.SSLContext` objects (GH-143685) (GH-145075) (#148371)

Cherry picked from commits 3a2a686cc45de2fb685ff332b7b914f27f660680
and 1decc7ee20cf6dce61e07cd8463ed87c1eb5fcd7 with minor amendments.

13 days ago[3.13] Document that `import sys.monitoring` raises `ModuleNotFoundError` (GH-148320...
Jonathan Dung [Sun, 24 May 2026 07:24:29 +0000 (15:24 +0800)] 
[3.13] Document that `import sys.monitoring` raises `ModuleNotFoundError` (GH-148320) (#148422)

2 weeks ago[3.13] gh-148450: abc.register needs to update type_version when tp_flags is changed...
Hai Zhu [Sat, 23 May 2026 11:50:16 +0000 (19:50 +0800)] 
[3.13] gh-148450: abc.register needs to update type_version when tp_flags is changed (GH-148623) (#150307)

2 weeks ago[3.13] gh-150178: Fix refcount leaks in hamt allocation failure paths (GH-150179...
Miss Islington (bot) [Sat, 23 May 2026 09:24:11 +0000 (11:24 +0200)] 
[3.13] gh-150178: Fix refcount leaks in hamt allocation failure paths (GH-150179) (#150301)

gh-150178: Fix refcount leaks in hamt allocation failure paths (GH-150179)
(cherry picked from commit 32823af153b76b7042fbce28ea8a6e0c3c4f1ca8)

Co-authored-by: pengyu lee <lipengyu@kylinos.cn>
2 weeks ago[3.13] gh-150232: update Thread group parameter doc (GH-150283) (#150299)
Miss Islington (bot) [Sat, 23 May 2026 08:34:15 +0000 (10:34 +0200)] 
[3.13] gh-150232: update Thread group parameter doc (GH-150283) (#150299)

gh-150232: update Thread group parameter doc (GH-150283)
(cherry picked from commit 82191c6d2cdacad6751262a40a44d2cd6d390977)

Co-authored-by: My-ABC <569817555@qq.com>
2 weeks ago[3.13] Remove 'expat' dependency for Linux in `Misc/Brewfile` (GH-150118) (#150254)
Miss Islington (bot) [Fri, 22 May 2026 14:28:10 +0000 (16:28 +0200)] 
[3.13] Remove 'expat' dependency for Linux in `Misc/Brewfile` (GH-150118) (#150254)

Co-authored-by: Brett Cannon <brett@python.org>
2 weeks ago[3.13] gh-149902: Remove dead packaging docs link and add a new section for external...
Miss Islington (bot) [Fri, 22 May 2026 11:45:31 +0000 (13:45 +0200)] 
[3.13] gh-149902: Remove dead packaging docs link and add a new section for external resources (GH-150030) (#150239)

Co-authored-by: Mia Albert <micha@2231puppy.tech>
Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.13] Replace deprecated action with RtD app (GH-149111) (#150234)
Miss Islington (bot) [Fri, 22 May 2026 11:08:42 +0000 (13:08 +0200)] 
[3.13] Replace deprecated action with RtD app (GH-149111) (#150234)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.13] gh-137571: Protect against possible UnboundLocalError in gzip._GzipReader...
Miss Islington (bot) [Fri, 22 May 2026 09:37:57 +0000 (11:37 +0200)] 
[3.13] gh-137571: Protect against possible UnboundLocalError in gzip._GzipReader.read() (GH-150222) (GH-150231)

This has not been observed in practice, but we cannot be 100% sure that
it will not happen with some weird gzip data.
(cherry picked from commit 28eac9a7263ad8dcfa9b536aa238549131857e0f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.13] gh-149995: Update typing.py docstrings and documentation (#150217)
Jelle Zijlstra [Fri, 22 May 2026 05:09:41 +0000 (22:09 -0700)] 
[3.13] gh-149995: Update typing.py docstrings and documentation (#150217)

Some of these docstrings read as if they were written when typing.py was
first written, and things have evolved since then.

A few motivations:
- Call protocols protocols instead of ABCs. They are also ABCs, but the fact
  they are protocols is more relevant to typing.
- Avoid recommending direct use of .__annotations__ and steer users to
  annotationlib instead.
- For TypedDict, mention NotRequired before total=False since it is more
  general and probably more frequently useful.
- For overloads, mention runtime use first instead of stub use. I think early on
  there was talk of allowing overload only in stubs, but it is now heavily used at
  runtime too and that's more likely to be relevant to users.
(cherry picked from commit f159419ae2ef1aebbd90ce9427b55e27738c960c)

2 weeks ago[3.13] gh-107398: Fix tarfile stream mode exception when process the file with the...
Miss Islington (bot) [Thu, 21 May 2026 19:38:54 +0000 (21:38 +0200)] 
[3.13] gh-107398: Fix tarfile stream mode exception when process the file with the gzip extra field (GH-126304) (GH-150201)

(cherry picked from commit 65f99329edf5d0df3ee14d9a242e1a4c8b842211)

Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.13] Fix minor typos in unicode.rst (GH-149587) (#150163)
Stan Ulbrych [Wed, 20 May 2026 15:37:06 +0000 (16:37 +0100)] 
[3.13] Fix minor typos in unicode.rst (GH-149587) (#150163)

(cherry picked from commit 4e97ff3351f381a61b238bd8e805e4e8dd3ea5cf)

Co-authored-by: Manoj K M <manojkmdev24@gmail.com>
2 weeks ago[3.13] gh-150146: Fix NULL dereference in `_Py_subs_parameters` (GH-150147) (#150155)
sobolevn [Wed, 20 May 2026 14:04:17 +0000 (17:04 +0300)] 
[3.13] gh-150146: Fix NULL dereference in `_Py_subs_parameters` (GH-150147) (#150155)

* [3.13] gh-150146: Fix NULL dereference in `_Py_subs_parameters` (GH-150147)
(cherry picked from commit f621ba16b72510e1abc9646a844a632df4ac275c)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.13] gh-142831: Fix use-after-free in json encoder during re-entrant mutation ...
Shamil [Wed, 20 May 2026 03:33:22 +0000 (06:33 +0300)] 
[3.13] gh-142831: Fix use-after-free in json encoder during re-entrant mutation (gh-142851) (#150079)

gh-142831: Fix use-after-free in json encoder during re-entrant mutation (gh-142851)

User callbacks invoked during JSON encoding (e.g. the `default` callback or
a custom string encoder) can mutate or clear the dict or sequence being
encoded, invalidating borrowed references to items, keys, and values. Hold
strong references unconditionally while iterating.

(cherry picked from commit 235fa7244a0474c492ae98ee444529c7ba2a9047)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 weeks ago[3.13] gh-134887: Add references to `locale` module for locale-aware number formattin...
Miss Islington (bot) [Wed, 20 May 2026 00:55:24 +0000 (02:55 +0200)] 
[3.13] gh-134887: Add references to `locale` module for locale-aware number formatting references in `string` module docs (GH-134888) (GH-150122)

(cherry picked from commit 47723af4e74ae1a65108837fe15795e2f70f9d02)

Co-authored-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
2 weeks ago[3.13] gh-149983: Fix PyErr_NoMemory call without GIL in winconsoleio.c (GH-149984...
Miss Islington (bot) [Tue, 19 May 2026 21:11:28 +0000 (23:11 +0200)] 
[3.13] gh-149983: Fix PyErr_NoMemory call without GIL in winconsoleio.c (GH-149984) (GH-150112)

(cherry picked from commit 3d2aa899bad1c0e274640dc0c4323f1744e73435)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2 weeks ago[3.13] gh-69619: Clarify whitespace definition in str.strip docs (GH-150021) (GH...
Miss Islington (bot) [Tue, 19 May 2026 21:07:20 +0000 (23:07 +0200)] 
[3.13] gh-69619: Clarify whitespace definition in str.strip docs (GH-150021) (GH-150047)

(cherry picked from commit 17eb17d43f66a0f7985fca05c7c9684bc01fabcd)

Co-authored-by: Daniil <d.mayorov@innopolis.university>
2 weeks ago[3.13] gh-149590: Remove faulthandler_traverse (GH-150023) (#150087)
Armaan Vakharia [Tue, 19 May 2026 15:04:13 +0000 (08:04 -0700)] 
[3.13] gh-149590: Remove faulthandler_traverse (GH-150023) (#150087)

`faulthandler_traverse` visits Python objects owned by `_PyRuntime`, not
by the module instance. With multi-phase init allowing multiple module
instances, each instance's GC traversal decrements `gc_refs` on the same
runtime-owned objects, driving it negative when two instances are
collected simultaneously.
(cherry picked from commit 56737483c2ffdaadfec648fd38d409c6b10941c0)

2 weeks ago[3.13] gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994) (GH...
Miss Islington (bot) [Tue, 19 May 2026 08:44:21 +0000 (10:44 +0200)] 
[3.13] gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994) (GH-150066)

(cherry picked from commit ba0aca3bffce431fe2fbd53ca4cd6a717a2e2c19)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Sebastian Gassner <sebastian.gassner@gmail.com>
2 weeks ago[3.13] gh-95816: Fix TLS version range example in docs (GH-148574) (#150010)
Miss Islington (bot) [Mon, 18 May 2026 21:47:35 +0000 (23:47 +0200)] 
[3.13] gh-95816: Fix TLS version range example in docs (GH-148574) (#150010)

gh-95816: Fix TLS version range example in docs (GH-148574)

docs(ssl): Fix TLS version range example
(cherry picked from commit dbd8985e8262055ed091de9a72660b7c112a4ce7)

Co-authored-by: Jan Brasna <1784648+janbrasna@users.noreply.github.com>
2 weeks ago[3.13] gh-146211: Reject CR/LF in HTTP tunnel request headers (GH-146212) (#148343)
Miss Islington (bot) [Mon, 18 May 2026 17:44:36 +0000 (19:44 +0200)] 
[3.13] gh-146211: Reject CR/LF in HTTP tunnel request headers (GH-146212) (#148343)

gh-146211: Reject CR/LF in HTTP tunnel request headers (GH-146212)
(cherry picked from commit 05ed7ce7ae9e17c23a04085b2539fe6d6d3cef69)

Co-authored-by: Seth Larson <seth@python.org>
Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
2 weeks ago[3.13] CI: Move Homebrew dependencies into Brewfile (GH-148335) (#149884)
Hugo van Kemenade [Mon, 18 May 2026 13:33:04 +0000 (16:33 +0300)] 
[3.13] CI: Move Homebrew dependencies into Brewfile (GH-148335) (#149884)

Co-authored-by: Brett Cannon <brett@python.org>
2 weeks ago[3.13] gh-149921: Fix reference leaks in _interpchannels and _interpqueues modules...
AN Long [Sun, 17 May 2026 13:36:32 +0000 (22:36 +0900)] 
[3.13] gh-149921: Fix reference leaks in _interpchannels and _interpqueues modules (GH-149922) (#149954)

(cherry picked from commit acefff95eab3db6b7cf837f3ce2707bbf9199376)

2 weeks ago[3.13] gh-149916: Restore the commented out part of test_body_encode in test_email...
Miss Islington (bot) [Sun, 17 May 2026 08:29:33 +0000 (10:29 +0200)] 
[3.13] gh-149916: Restore the commented out part of test_body_encode in test_email (GH-149917) (GH-149939)

(cherry picked from commit 1cbe035723698f15aa1b1af5deef615b28aae2e5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.13] gh-134837: Correct and improve base85 documentation for base64 module (GH...
Miss Islington (bot) [Fri, 15 May 2026 18:36:47 +0000 (20:36 +0200)] 
[3.13] gh-134837: Correct and improve base85 documentation for base64 module (GH-145843) (GH-149743) (GH-149893)

(cherry picked from commit e667d62f114b54dcba17bdfad3835b9c91fda348)
(cherry picked from commit 9ad8a1b955033ebbf05456de2cfad85d1de2503d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: David Huggins-Daines <dhd@ecolingui.ca>
3 weeks ago[3.13] gh-149801: Add IANA registered names and aliases with leading zeros (GH-149804...
Miss Islington (bot) [Fri, 15 May 2026 12:08:50 +0000 (14:08 +0200)] 
[3.13] gh-149801: Add IANA registered names and aliases with leading zeros (GH-149804) (GH-149872)

Like IBM00858, CP00858, IBM01140, CP01140.
(cherry picked from commit 20438866aefc2e63949d8bb85d8f8e55633fd977)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.13] gh-149707: Fix compiler warning in _ctypes_test on strchr() (#149791) (#149867)
Victor Stinner [Fri, 15 May 2026 11:32:58 +0000 (13:32 +0200)] 
[3.13] gh-149707: Fix compiler warning in _ctypes_test on strchr() (#149791) (#149867)

gh-149707: Fix compiler warning in _ctypes_test on strchr() (#149791)

Change my_strchr() return type to "const char*" (add "const").

Fix the compiler warning:

Modules/_ctypes/_ctypes_test.c: In function 'my_strchr':
Modules/_ctypes/_ctypes_test.c:451:12: warning: return discards
'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  451 |     return strchr(s, c);
      |            ^~~~~~

When using C23, strchr(text, ch) return type is "const char*" if text
type is "const char*".

(cherry picked from commit 5465b69255890650df99debb8256e0a7bc68138b)

3 weeks ago[3.13] gh-149763: Improve availablity docs in `select.rst` (GH-149764) (#149856)
sobolevn [Fri, 15 May 2026 07:33:33 +0000 (10:33 +0300)] 
[3.13] gh-149763: Improve availablity docs in `select.rst` (GH-149764) (#149856)

(cherry picked from commit 7e98debdf4bfcf1c3f592c9424bc654117c2723e)

3 weeks ago[3.13] Link to existing rules in compound_stmts.rst (GH-149811) (GH-149838)
Miss Islington (bot) [Thu, 14 May 2026 17:34:29 +0000 (19:34 +0200)] 
[3.13] Link to existing rules in compound_stmts.rst (GH-149811) (GH-149838)

Link to existing rules in compound_stmts.rst (GH-149811)

In gh-138418, `!` was added to links to rules that don't exist in
the docs, in order to silence broken link warnings.
However, productionlist doesn't parse the `!`, which ends up in
the rendered documentation. (It's possible that gh-127835 broke
the `!` support.)

Replace the names with ones that appear in docs:

- `star_named_expression` in the grammar corresponds to
  `flexible_expression` in the docs
- `star_named_expressions` in the grammar corresponds to
  `flexible_expression_list` in the docs
- `named_expression` in the grammar corresponds to
  `assignment_expression` in the docs

Having two sets of names isn't great of course. Consolidating them
is tracked in (subissues of) gh-127833.
(cherry picked from commit c37529293d1e05081cb4e8668162c76583b88007)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
3 weeks ago[3.13] gh-149698: Update bundled expat to 2.8.1 (GH-149699) (#149827)
Miss Islington (bot) [Thu, 14 May 2026 15:24:39 +0000 (17:24 +0200)] 
[3.13] gh-149698: Update bundled expat to 2.8.1 (GH-149699) (#149827)

(cherry picked from commit f1a47e79fb7081d3cde6364530bfa98240ebbe4c)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.13] gh-149017: Upgrade bundled Expat to 2.8.0 (GH-149020) (#149099)
Miss Islington (bot) [Thu, 14 May 2026 15:00:07 +0000 (17:00 +0200)] 
[3.13] gh-149017: Upgrade bundled Expat to 2.8.0 (GH-149020) (#149099)

(cherry picked from commit 005555a3f0ae20ee8154eb4ee172e1e355144c8c)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.13] gh-148821: Add more tests for invalid XML encodings (GH-149820) (GH-149823)
Miss Islington (bot) [Thu, 14 May 2026 10:34:45 +0000 (12:34 +0200)] 
[3.13] gh-148821: Add more tests for invalid XML encodings (GH-149820) (GH-149823)

(cherry picked from commit c6f7368157ecf9f2cdd537d8b6fad6e011bce344)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.13] gh-128110: Fix rfc2047 whitespace handling in email parser address headers...
Miss Islington (bot) [Wed, 13 May 2026 20:29:07 +0000 (22:29 +0200)] 
[3.13] gh-128110: Fix rfc2047 whitespace handling in email parser address headers (GH-130749) (#149789)

RFC 2047 Section 6.2 requires that "any 'linear-white-space' that
separates a pair of adjacent 'encoded-word's is ignored." The modern
header value parser correctly implements that for unstructured headers,
but had missed a case in structured headers. This could cause a parsed
address header to include extraneous spaces in a display-name.

Switch to @bitdancer's fix from review feedback. Recharacterize space
between ews as fws after parsing in get_phrase.

RDM: This fix is dependent on the fact that "subsequent" atoms will never have
leading whitespace because that's been consumed already. I don't think
it's worth adding extra code for the possibility of leading whitespace
because the parser won't produce it. It's a bit of parser fragility in the
face of code changes, but I think that's a minor concern given the
parser design (which is that it consumes whitespace greedily)
(cherry picked from commit 7a4c6dfb8839eb05fb87baf70364680e45001dd4)

Co-authored-by: Mike Edmunds <medmunds@gmail.com>
Co-authored-by: R David Murray <rdmurray@bitdance.com>