]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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>
4 weeks ago[3.15] gh-149738: Fix segmentation fault bug in sqllite3 (GH-149754) (#150768)
Miss Islington (bot) [Tue, 2 Jun 2026 09:36:03 +0000 (11:36 +0200)] 
[3.15] gh-149738: Fix segmentation fault bug in sqllite3 (GH-149754) (#150768)

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

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

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

(cherry picked from commit 2c20f9ce17abcbc36a105fd9de0b15797b6401ae)

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

(cherry picked from commit cee3327b9264a653cdbd2f9bb1ffa74a95be66e9)

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

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

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

Use the directive and the role "class" instead of "data" for classes
exposed in the types module.
(cherry picked from commit bc055444e4ade9e210139d07200f602a4a9feb67)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
4 weeks ago[3.15] gh-89554: Document weakref type objects as classes (GH-150678) (GH-150760)
Miss Islington (bot) [Tue, 2 Jun 2026 08:08:01 +0000 (10:08 +0200)] 
[3.15] gh-89554: Document weakref type objects as classes (GH-150678) (GH-150760)

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

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

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

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

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

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

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

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

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

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

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

* Make test_impl_exec_imports_suppressed_by_matching_start() more robust

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

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

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

* Resolve several review feedbacks

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

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

* Address another feedback comment

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

* Changes based on gh-150228 review

The comment by @encukou that started this change:

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

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

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

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

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

(cherry picked from commit 27ebd9abce76543e95748a7534e5218acd514db2)

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

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

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

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

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

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

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

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

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

(cherry picked from commit 6d7a19e5334636f77cac135120fe81f343a73876)

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

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

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

(cherry picked from commit c5516e7e371f7b273eb37c7b65f14ef14ee81f11)

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

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

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

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

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

(cherry picked from commit 56bd9ea676d5ab4d5f6c68aefc3125ef5a216157)

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

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

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

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

(cherry picked from commit 1837c17bc78b8169cd6c1c5799dcf6a71c3eac83)

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

(cherry picked from commit 2f8f569ba911ab3cff1356a15a3e688adc4ae917)

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

(cherry picked from commit 1de909b32411fc1c4d4c42b4f8221b86096c6353)

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

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

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

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

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

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

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

(cherry picked from commit 73d8e9a47cc13ce1b9b1bdfdeaa958639b144f55)

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

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

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

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

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

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

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

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

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

(cherry picked from commit 1e18c45495185cb547d43c3dd4c1cbdd8482867b)

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

(cherry picked from commit 9baa7c63bee1ad2b243f16109a3fd206a1f13a6a)

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

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

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

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

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

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

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

(cherry picked from commit f87d9605d3f9489d33aaf97a97fa9cb81cd7cc40)

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

(cherry picked from commit 779694faba3e80b944f528a56e9b756b55637541)

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

(cherry picked from commit 5535c1f9c08e929f96fa5d798277e3a2c91ed12a)

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

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

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

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

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

(cherry picked from commit 55f25183263b9a52fa246817344cdb32d6c3d722)

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

(cherry picked from commit 9242700c149c490c56d2a415b395b5f51d94a49a)

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

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

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

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

(cherry picked from commit b53f6ca850b500621474e82931c3e7216d9a1cb1)

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

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

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

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

(cherry picked from commit 99c254e2f79a4197524bef61bf0d12251ee273e6)

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

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

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

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

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

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

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

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

(cherry picked from commit 5e467f4331d4cb7a8e2986c27af7eb68ccaccb37)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.15] gh-148557: Use em-config to locate trampoline clang (GH-148556) (#150481)
Miss Islington (bot) [Tue, 26 May 2026 17:05:11 +0000 (19:05 +0200)] 
[3.15] gh-148557: Use em-config to locate trampoline clang (GH-148556) (#150481)

When CC is wrapped by ccache, the Emscripten trampoline rule cannot derive the
matching clang path by treating CC as a single executable path. Query the active
LLVM toolchain path with em-config instead.
(cherry picked from commit 1310d2c25242041f0a218012426fba14e756eef8)

Co-authored-by: Clément Péron <peron.clem@gmail.com>
5 weeks ago[3.15] gh-150443: Exclude explicit dup3 and pipe2 checks on iOS builds. (GH-150444...
Miss Islington (bot) [Tue, 26 May 2026 04:03:35 +0000 (06:03 +0200)] 
[3.15] gh-150443: Exclude explicit dup3 and pipe2 checks on iOS builds. (GH-150444) (#150446)

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

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
5 weeks ago[3.15] gh-149931: Fix memory leaks on failed realloc (GH-149932) (#150439)
Miss Islington (bot) [Tue, 26 May 2026 01:04:49 +0000 (03:04 +0200)] 
[3.15] gh-149931: Fix memory leaks on failed realloc (GH-149932) (#150439)

5 weeks ago[3.15] gh-149619: Harden _remote_debugging error paths (GH-150349) (#150434)
Miss Islington (bot) [Mon, 25 May 2026 23:15:56 +0000 (01:15 +0200)] 
[3.15] gh-149619: Harden _remote_debugging error paths (GH-150349) (#150434)

gh-149619: Harden _remote_debugging error paths (GH-150349)
(cherry picked from commit a5be25d3bdc1b3cbc9638a3249c0e3db5a97ebc6)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
5 weeks ago[3.15] gh-149619: Harden _remote_debugging error paths (GH-150349) (#150435)
Pablo Galindo Salgado [Mon, 25 May 2026 23:02:37 +0000 (00:02 +0100)] 
[3.15] gh-149619: Harden _remote_debugging error paths (GH-150349) (#150435)

(cherry picked from commit a5be25d3bdc1b3cbc9638a3249c0e3db5a97ebc6)

5 weeks ago[3.15] gh-150387: Fix hang in test_run_failed_script_live on slow buildbots (GH-15040...
Miss Islington (bot) [Mon, 25 May 2026 18:46:19 +0000 (20:46 +0200)] 
[3.15] gh-150387: Fix hang in test_run_failed_script_live on slow buildbots (GH-150405) (#150420)

5 weeks ago[3.15] gh-80198: Improve test_pwd and test_grp (GH-150380) (GH-150398)
Serhiy Storchaka [Mon, 25 May 2026 18:43:23 +0000 (21:43 +0300)] 
[3.15] gh-80198: Improve test_pwd and test_grp (GH-150380) (GH-150398)

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 46e8f7a9e794bfb0fdc5ee82348623eb2b91a0b5)

5 weeks ago[3.15] gh-149156: Fix perf trampoline crash after fork (GH-150347) (#150394)
Miss Islington (bot) [Mon, 25 May 2026 18:19:22 +0000 (20:19 +0200)] 
[3.15] gh-149156: Fix perf trampoline crash after fork (GH-150347) (#150394)

5 weeks ago[3.15] gh-145896: Fix typos and stale docstrings in the traceback module (GH-145897...
Miss Islington (bot) [Mon, 25 May 2026 10:13:01 +0000 (12:13 +0200)] 
[3.15] gh-145896: Fix typos and stale docstrings in the traceback module (GH-145897) (GH-150383)

(cherry picked from commit 832afeddcea78e40d39c47cd1893f8137e588e72)

Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
5 weeks ago[3.15] gh-150374: Fix double release of import lock in lazy import reification (GH...
Miss Islington (bot) [Mon, 25 May 2026 09:36:22 +0000 (11:36 +0200)] 
[3.15] gh-150374: Fix double release of import lock in lazy import reification (GH-150376) (#150378)

gh-150374: Fix double release of import lock in lazy import reification (GH-150376)
(cherry picked from commit 5498eba545e950c7550c924f2e458c740a689c69)

Co-authored-by: pengyu lee <lipengyu@kylinos.cn>
5 weeks ago[3.15] gh-150285: Fix too long docstrings in some Python modules (GH-150366) (GH...
Miss Islington (bot) [Mon, 25 May 2026 08:19:36 +0000 (10:19 +0200)] 
[3.15] gh-150285: Fix too long docstrings in some Python modules (GH-150366) (GH-150375)

(cherry picked from commit 01c6d3d76bf222d8b847c97e0a3d3fad0c1b1fe3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.15] gh-150285: Fix too long docstrings in _wmi.exec_query (GH-150373) (GH-150377)
Miss Islington (bot) [Mon, 25 May 2026 08:19:05 +0000 (10:19 +0200)] 
[3.15] gh-150285: Fix too long docstrings in _wmi.exec_query (GH-150373) (GH-150377)

(cherry picked from commit fbeafc062e55a52ba7369c36be0b3eb34eabb560)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.15] gh-149449: Fix use-after-free in `_PyUnicode_GetNameCAPI` (GH-150323) (#150352)
Miss Islington (bot) [Mon, 25 May 2026 07:05:24 +0000 (09:05 +0200)] 
[3.15] gh-149449: Fix use-after-free in `_PyUnicode_GetNameCAPI` (GH-150323) (#150352)

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>
5 weeks ago[3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH...
Serhiy Storchaka [Sun, 24 May 2026 19:31:19 +0000 (22:31 +0300)] 
[3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350)

(cherry picked from commit 287c98f4cb40c15d638651de4b29ae98b92589aa)

5 weeks ago[3.15] gh-110704: Recommend `distclean` target over `clean` when source tree is not...
Miss Islington (bot) [Sun, 24 May 2026 15:47:29 +0000 (17:47 +0200)] 
[3.15] gh-110704: Recommend `distclean` target over `clean` when source tree is not clean (GH-112610) (#150342)

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>
5 weeks ago[3.15] gh-150285: Fix too long docstrings in the os module (GH-150296) (GH-150341)
Serhiy Storchaka [Sun, 24 May 2026 13:53:29 +0000 (16:53 +0300)] 
[3.15] gh-150285: Fix too long docstrings in the os module (GH-150296) (GH-150341)

(cherry picked from commit a5cb7c34dd25aaa639a512f0dbbaaa6c9e03f1a1)

5 weeks ago[3.15] gh-150285: Fix too long docstrings in the sqlite3 module (GH-150290) (GH-150340)
Miss Islington (bot) [Sun, 24 May 2026 13:43:38 +0000 (15:43 +0200)] 
[3.15] gh-150285: Fix too long docstrings in the sqlite3 module (GH-150290) (GH-150340)

(cherry picked from commit 0466560b310fa74c38270328d66d6a16df95ec34)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.15] gh-150285: Fix too long docstrings in the pyexpat module (GH-150294) (GH-150337)
Miss Islington (bot) [Sun, 24 May 2026 13:41:40 +0000 (15:41 +0200)] 
[3.15] gh-150285: Fix too long docstrings in the pyexpat module (GH-150294) (GH-150337)

(cherry picked from commit 9da7923835a4c72e738551bbd78b8179a81286ad)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.15] gh-149619: Fix `_remote_debugging` permissions error on Linux (GH-150012)...
Miss Islington (bot) [Sun, 24 May 2026 13:39:29 +0000 (15:39 +0200)] 
[3.15] gh-149619: Fix `_remote_debugging` permissions error on Linux (GH-150012) (#150339)

gh-149619: Fix `_remote_debugging` permissions error on Linux (GH-150012)

When running profiling on Linux without sudo, attempts to read
process memory would fail with the misleading error 'Failed to find
the PyRuntime section in process <pid> on Linux platform'.

The actual issue is a permissions error because profiling was not
run with sudo. We were clearing the exception on Linux when trying
to read memory, instead, we should bubble up the permissions error
and show it properly.
(cherry picked from commit 0563890872b3c63f94953e983fe396615b708540)

Co-authored-by: ivonastojanovic <80911834+ivonastojanovic@users.noreply.github.com>
5 weeks ago[3.15] gh-149018: Use `XML_SetHashSalt16Bytes` in `pyexpat`/`_elementtree` when possi...
Miss Islington (bot) [Sun, 24 May 2026 13:36:30 +0000 (15:36 +0200)] 
[3.15] gh-149018: Use `XML_SetHashSalt16Bytes` in `pyexpat`/`_elementtree` when possible (#149645)

(cherry picked from commit 24b8f12544468e4cedf5bfbe25442fcd495391e4)

Co-authored-by: Stan Ulbrych <stan@python.org>
5 weeks ago[3.15] gh-150285: Fix too long docstrings in builtins (GH-150293) (GH-150336)
Miss Islington (bot) [Sun, 24 May 2026 13:24:57 +0000 (15:24 +0200)] 
[3.15] gh-150285: Fix too long docstrings in builtins (GH-150293) (GH-150336)

(cherry picked from commit e1e06be11908ddb6935e8df35f972879dd1bc3d8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.15] gh-150285: Fix too long docstrings in the zstd module (GH-150291) (GH-150335)
Miss Islington (bot) [Sun, 24 May 2026 13:24:34 +0000 (15:24 +0200)] 
[3.15] gh-150285: Fix too long docstrings in the zstd module (GH-150291) (GH-150335)

(cherry picked from commit 9fceb1c0c5c5ad527bc257b115bcf45995daf631)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.15] gh-150285: Fix too long docstrings in the decimal module (GH-150288) (GH-150333)
Miss Islington (bot) [Sun, 24 May 2026 13:24:08 +0000 (15:24 +0200)] 
[3.15] gh-150285: Fix too long docstrings in the decimal module (GH-150288) (GH-150333)

(cherry picked from commit 6bed57a3b659a34c4a7d75e76f4fe840f762bf7f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.15] gh-150285: Fix too long docstrings in the io module (GH-150287) (GH-150332)
Miss Islington (bot) [Sun, 24 May 2026 13:23:45 +0000 (15:23 +0200)] 
[3.15] gh-150285: Fix too long docstrings in the io module (GH-150287) (GH-150332)

(cherry picked from commit 160dc74122ed4e31540b2ef2c77bda122b02c94a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.15] gh-150285: Fix too long docstrings in the curses module (GH-150286) (GH-150331)
Miss Islington (bot) [Sun, 24 May 2026 13:23:25 +0000 (15:23 +0200)] 
[3.15] gh-150285: Fix too long docstrings in the curses module (GH-150286) (GH-150331)

(cherry picked from commit 4c0fe2d134f6ddaa4c705ffba073d9d5874b7fe4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.15] gh-150285: Fix too long docstrings in the _remote_debugging module (GH-150289...
Miss Islington (bot) [Sun, 24 May 2026 13:09:13 +0000 (15:09 +0200)] 
[3.15] gh-150285: Fix too long docstrings in the _remote_debugging module (GH-150289) (#150334)

gh-150285: Fix too long docstrings in the _remote_debugging module (GH-150289)
(cherry picked from commit cdc499ae775e5204ef6bbb0a63bb00e85b0b6b72)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.15] gh-148932: Docs / `profiling.sampling` Windows limitations (GH-150272) (#150330)
Miss Islington (bot) [Sun, 24 May 2026 12:02:45 +0000 (14:02 +0200)] 
[3.15] gh-148932: Docs / `profiling.sampling` Windows limitations (GH-150272) (#150330)

gh-148932: Docs / `profiling.sampling` Windows limitations (GH-150272)
(cherry picked from commit 0f32750fe26428de5e439803cf57f51847c81ce8)

Co-authored-by: Eduardo Villalpando Mello <eduardo.villalpando.mello@gmail.com>
5 weeks ago[3.15] gh-149335: Avoid JIT trace buffer asserts with overhead above `FITNESS_INITIAL...
Miss Islington (bot) [Sun, 24 May 2026 07:18:58 +0000 (09:18 +0200)] 
[3.15] gh-149335: Avoid JIT trace buffer asserts with overhead above `FITNESS_INITIAL` (GH-149633) (#150245)

gh-149335: Avoid JIT trace buffer asserts with overhead above `FITNESS_INITIAL` (GH-149633)
(cherry picked from commit 441af3a93426c5e7e3c056fee27e6f4505988584)

Co-authored-by: Hai Zhu <haiizhu@outlook.com>
5 weeks ago[3.15] gh-150178: Fix refcount leaks in hamt allocation failure paths (GH-150179...
Miss Islington (bot) [Sat, 23 May 2026 19:27:27 +0000 (21:27 +0200)] 
[3.15] gh-150178: Fix refcount leaks in hamt allocation failure paths (GH-150179) (#150303)

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>
5 weeks ago[3.15] gh-150258: Show relative percentage on Tachyon flamegraph (GH-150266) (#150312)
Miss Islington (bot) [Sat, 23 May 2026 15:30:19 +0000 (17:30 +0200)] 
[3.15] gh-150258: Show relative percentage on Tachyon flamegraph (GH-150266) (#150312)

gh-150258: Show relative percentage on Tachyon flamegraph (GH-150266)

When running profiling, users rarely care about the global percentage of
the runtime. Often, they want to select a function and measure child
percentages relative to that.

This PR updates the flamegraph tooltips to show both "Percentage" and
"Relative Percentage" when the user clicks a specific function.
(cherry picked from commit fad06746051f6bd95a255d49e38ebf049e965109)

Co-authored-by: Eduardo Villalpando Mello <eduardovil@microsoft.com>
5 weeks ago[3.15] gh-149816: add missing critical section on self in buffered_iternext (GH-15029...
Miss Islington (bot) [Sat, 23 May 2026 09:25:56 +0000 (11:25 +0200)] 
[3.15] gh-149816: add missing critical section on self in buffered_iternext (GH-150295) (#150305)

gh-149816: add missing critical section on self in buffered_iternext (GH-150295)
(cherry picked from commit e8545ed3eafbf349b51ea308126a67dc70416a62)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
5 weeks ago[3.15] gh-148450: `abc.register` needs to update `type_version` when `tp_flags` is...
Miss Islington (bot) [Sat, 23 May 2026 08:53:12 +0000 (10:53 +0200)] 
[3.15] gh-148450: `abc.register` needs to update `type_version` when `tp_flags` is changed (GH-148623) (#150300)

gh-148450: `abc.register` needs to update `type_version` when `tp_flags` is changed (GH-148623)
(cherry picked from commit e7eaed56149aa08f7fd5012784cc1deef8e483de)

Co-authored-by: Hai Zhu <haiizhu@outlook.com>
5 weeks ago[3.15] gh-150232: update Thread group parameter doc (GH-150283) (#150297)
Miss Islington (bot) [Sat, 23 May 2026 08:34:48 +0000 (10:34 +0200)] 
[3.15] gh-150232: update Thread group parameter doc (GH-150283) (#150297)

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

Co-authored-by: My-ABC <569817555@qq.com>
5 weeks ago[3.15] gh-146452: Fix pickle segfault on concurrent mutation of dict in pickle (GH...
Miss Islington (bot) [Sat, 23 May 2026 07:33:21 +0000 (09:33 +0200)] 
[3.15] gh-146452: Fix pickle segfault on concurrent mutation of dict in pickle (GH-146470) (#150292)

gh-146452: Fix pickle segfault on concurrent mutation of dict in pickle (GH-146470)
(cherry picked from commit e62a61177f8b793d787e337034a740ca75c1ab44)

Co-authored-by: Farhan Saif <fsaif@uic.edu>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
5 weeks ago[3.15] Revert "[3.15] gh-146452: Improve locking granularity in pickle's batch_dict_e...
Victor Stinner [Sat, 23 May 2026 06:57:27 +0000 (08:57 +0200)] 
[3.15] Revert "[3.15] gh-146452: Improve locking granularity in pickle's batch_dict_exact and fix race condition (GH-150025) (#150039)" (#150262)

Revert "[3.15] gh-146452: Improve locking granularity in pickle's batch_dict_exact and fix race condition (GH-150025) (#150039)"

This reverts commit 66ade2861fec1d6c18998710938a1c71fde5f76b.

5 weeks ago[3.15] gh-82907: Document mtime=0 for reproducible tarfile gzip output (GH-150269...
Miss Islington (bot) [Fri, 22 May 2026 21:17:51 +0000 (23:17 +0200)] 
[3.15] gh-82907: Document mtime=0 for reproducible tarfile gzip output (GH-150269) (GH-150271)

(cherry picked from commit 9df2b6ccc719b0bc0167da65b72b57f9da39398b)

Co-authored-by: Omkar Kabde <omkarkabde@gmail.com>
5 weeks ago[3.15] gh-149189: Revert "Modern defaults for `pprint` (GH-149190)" (GH-150249) ...
Miss Islington (bot) [Fri, 22 May 2026 20:49:36 +0000 (22:49 +0200)] 
[3.15] gh-149189: Revert "Modern defaults for `pprint` (GH-149190)" (GH-150249) (#150268)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
5 weeks ago[3.15] gh-148829: Make sentinels' repr and module customizable (GH-149654) (#150092)
Miss Islington (bot) [Fri, 22 May 2026 14:44:34 +0000 (16:44 +0200)] 
[3.15] gh-148829: Make sentinels' repr and module customizable (GH-149654) (#150092)

Implementation of python/peps#4968.
(cherry picked from commit 08218030a507b2ef38db9696216bf3eb24d9a6a1)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
5 weeks ago[3.15] CI: Move Homebrew dependencies into Brewfile (GH-148335) (#149882)
Miss Islington (bot) [Fri, 22 May 2026 14:44:08 +0000 (16:44 +0200)] 
[3.15] CI: Move Homebrew dependencies into Brewfile (GH-148335) (#149882)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
5 weeks ago[3.15] gh-149902: Remove dead packaging docs link and add a new section for external...
Miss Islington (bot) [Fri, 22 May 2026 11:40:49 +0000 (13:40 +0200)] 
[3.15] gh-149902: Remove dead packaging docs link and add a new section for external resources (GH-150030) (#150241)

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>
5 weeks ago[3.15] gh-137571: Protect against possible UnboundLocalError in gzip._GzipReader...
Miss Islington (bot) [Fri, 22 May 2026 09:46:14 +0000 (11:46 +0200)] 
[3.15] gh-137571: Protect against possible UnboundLocalError in gzip._GzipReader.read() (GH-150222) (GH-150229)

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>
5 weeks ago[3.15] gh-133998: Fix gzip file creation when time is out of range (GH-134278) (GH...
Miss Islington (bot) [Fri, 22 May 2026 07:48:42 +0000 (09:48 +0200)] 
[3.15] gh-133998: Fix gzip file creation when time is out of range (GH-134278) (GH-150221)

(cherry picked from commit 1daad8a1630c9ee011f6ff3796c4e7aef243463b)

Co-authored-by: adang1345 <adang1345@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.15] gh-149995: Update typing.py docstrings and documentation (GH-149996) (#150215)
Miss Islington (bot) [Fri, 22 May 2026 06:41:43 +0000 (08:41 +0200)] 
[3.15] gh-149995: Update typing.py docstrings and documentation (GH-149996) (#150215)

gh-149995: Update typing.py docstrings and documentation (GH-149996)

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)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
5 weeks ago[3.15] gh-148294: Make configure find g++ correctly (GH-150212)
Miss Islington (bot) [Fri, 22 May 2026 02:18:28 +0000 (04:18 +0200)] 
[3.15] gh-148294: Make configure find g++ correctly (GH-150212)

The `AC_PATH_TOOL` calls had included a duplicated argument, causing a "`PATH`"
consisting of `notfound` to be searched instead of `$PATH`.
(cherry picked from commit c613f72eeef83340cb369287f7c1a195e086d1d5)

Co-authored-by: sendaoYan <yansendao@126.com>
5 weeks ago[3.15] gh-149819: fix .pth and .start file processing in subprocess when inheriting...
Miss Islington (bot) [Thu, 21 May 2026 22:31:41 +0000 (00:31 +0200)] 
[3.15] gh-149819: fix .pth and .start file processing in subprocess when inheriting PYTHONPATH (GH-150177) (#150202)

gh-149819: fix .pth and .start file processing in subprocess when inheriting PYTHONPATH (GH-150177)

* gh-149819: Fix .pth files not loaded in Python subprocesses

After PR gh-149583 (Fix double evaluation of .pth and .site files in
venvs), .pth files are no longer loaded in subprocesses started with
subprocess.run([sys.executable, ...]).  The root cause: main() seeds
known_paths from removeduppaths() with all sys.path entries inherited
from the parent process.  addsitedir() then skips .pth processing for
every directory already in known_paths.

Fix:
- main(): call removeduppaths() for dedup but start known_paths as a
  fresh empty set, so that addsitedir() processes .pth files in every
  site-packages directory regardless of inherited sys.path.
- addsitedir(): move known_paths.add() before the sys.path.append and
  guard the append with 'sitedir not in sys.path' to avoid creating
  duplicate entries when called with a fresh known_paths.

This preserves the gh-75723 dedup guarantee while allowing subprocesses
to load .pth files.

* Fill out the tests for GH#149888

* Extend _make_start() and _make_pth() to take an optional `basedir` which is used instead of
 `site.tmpdir` if given.
* Add test_pth_processed_when_sitedir_already_on_path() to test the core GH#149819 bug: .pth files
  in subprocesses aren't handled if PYTHONPATH pointing to the .pth directory is inherited.
* Similarly add test_start_processed_when_sitedir_already_on_path() to verify that .start files in
  the same circumstances are also now processed.

* Update Lib/site.py

* Oops!  Remove redundant code

---------
(cherry picked from commit 3c298e2e385fc6f462abaada2fd680deb1a2b58e)

Co-authored-by: Barry Warsaw <barry@python.org>
Co-authored-by: BugBounty Mind <bugbounty-mind@deepseek.tui>
Co-authored-by: scoder <stefan_ml@behnel.de>
5 weeks ago[3.15] gh-107398: Fix tarfile stream mode exception when process the file with the...
Miss Islington (bot) [Thu, 21 May 2026 20:02:10 +0000 (22:02 +0200)] 
[3.15] gh-107398: Fix tarfile stream mode exception when process the file with the gzip extra field (GH-126304) (GH-150199)

(cherry picked from commit 65f99329edf5d0df3ee14d9a242e1a4c8b842211)

Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>