]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 months agogh-134538: Add link to shutil.rmtree example in function docs (GH-135540)
Miss Islington (bot) [Wed, 18 Jun 2025 21:16:07 +0000 (23:16 +0200)] 
gh-134538: Add link to shutil.rmtree example in function docs (GH-135540)

(cherry picked from commit e9b647dd30d22cef465972d898a34c4b1bb6615d)

Co-authored-by: alexey semenyuk <alexsemenyuk88@gmail.com>
4 months ago[3.14] gh-135641: Fix flaky `test_capi.test_lock_two_threads` test case (gh-135642...
Miss Islington (bot) [Wed, 18 Jun 2025 18:49:43 +0000 (20:49 +0200)] 
[3.14] gh-135641: Fix flaky `test_capi.test_lock_two_threads` test case (gh-135642) (gh-135687)

The mutex may have the `_Py_HAS_PARKED` bit set.
(cherry picked from commit 17ac3933c3c860e08f7963cf270116a39a063be7)

Co-authored-by: Sam Gross <colesbury@gmail.com>
4 months ago[3.14] Docs: Fix markups for emphasis (GH-135598) (GH-135685)
Miss Islington (bot) [Wed, 18 Jun 2025 17:39:06 +0000 (19:39 +0200)] 
[3.14] Docs: Fix markups for emphasis (GH-135598) (GH-135685)

Docs: Fix markups for emphasis (GH-135598)

The word emphasis character `_` is not supported as sphinx markup, so changed to `*`.
(cherry picked from commit 46c60e0d0b716e8e6f0b74a0f9d0542605b1efd4)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
4 months ago[3.14] gh-135376: Fix and improve test_random (GH-135377) (GH-135680)
Miss Islington (bot) [Wed, 18 Jun 2025 15:51:47 +0000 (17:51 +0200)] 
[3.14] gh-135376: Fix and improve test_random (GH-135377) (GH-135680)

* Remove duplicated code. Tests for Random and SystemRandom now share
  the code.
* Move implementation agnostic tests that was only run for SystemRandom,
  so they are now run for Random too.
* Add tests for __index__() support.
* Add tests for randint().
(cherry picked from commit c55512311b7cb8b7c27c19f56cd8f872be29aedc)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 months ago[3.14] gh-135676: lexical analysis: Improve section on Numeric literals (GH-134850...
Miss Islington (bot) [Wed, 18 Jun 2025 14:40:28 +0000 (16:40 +0200)] 
[3.14] gh-135676: lexical analysis: Improve section on Numeric literals (GH-134850) (GH-135677)

gh-135676: lexical analysis: Improve section on Numeric literals (GH-134850)
(cherry picked from commit 21f3d15534c08d9a49d5c119a0e690855173fde4)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
4 months ago[3.14] gh-135646: Raise consistent `NameError` exceptions in `ForwardRef.evaluate...
Miss Islington (bot) [Wed, 18 Jun 2025 13:26:58 +0000 (15:26 +0200)] 
[3.14] gh-135646: Raise consistent `NameError` exceptions in `ForwardRef.evaluate()` (GH-135663) (#135673)

gh-135646: Raise consistent `NameError` exceptions in `ForwardRef.evaluate()` (GH-135663)
(cherry picked from commit 343719d98e60d28d6102002f8ad3fd9dc5a58bd1)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
4 months ago[3.14] gh-135335: flush stdout/stderr in forkserver after preloading modules (GH...
Miss Islington (bot) [Wed, 18 Jun 2025 12:42:18 +0000 (14:42 +0200)] 
[3.14] gh-135335: flush stdout/stderr in forkserver after preloading modules (GH-135338) (#135670)

gh-135335: flush stdout/stderr in forkserver after preloading modules (GH-135338)

If a preloaded module writes to stdout or stderr, and the stream is buffered,
child processes will inherit the buffered data after forking. Attempt to
prevent this by flushing the streams after preload.
(cherry picked from commit 9877d191f441741fc27ae5e7a6dd7ab6d4bcc6b7)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 months ago[3.14] gh-135627: Remove documentation for LOAD_CONST_IMMORTAL opcode (GH-135632...
Miss Islington (bot) [Wed, 18 Jun 2025 07:27:26 +0000 (09:27 +0200)] 
[3.14] gh-135627: Remove documentation for LOAD_CONST_IMMORTAL opcode (GH-135632) (GH-135649)

gh-135627: Remove documentation for LOAD_CONST_IMMORTAL opcode (GH-135632)

Remove documentation for LOAD_CONST_IMMORTAL opcode
(cherry picked from commit 711700259135b5f9e21c56b199f4ebc0048b18b4)

Co-authored-by: Vladyslav Lazoryk <80263725+lazorikv@users.noreply.github.com>
4 months ago[3.14] gh-134632: Add iOS/Android test skip for C API check for headers. (GH-135656...
Miss Islington (bot) [Wed, 18 Jun 2025 06:48:03 +0000 (08:48 +0200)] 
[3.14] gh-134632: Add iOS/Android test skip for C API check for headers. (GH-135656) (#135657)

iOS and Android don't ship headers in the testbed, so we can't test for their existence.
(cherry picked from commit 1c7efaf58a62d848421b2da97360ba3df7d7856b)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
4 months ago[3.14] gh-127146: Enable large files on Emscripten (GH-135635) (#135655)
Miss Islington (bot) [Wed, 18 Jun 2025 04:53:01 +0000 (06:53 +0200)] 
[3.14] gh-127146: Enable large files on Emscripten (GH-135635) (#135655)

Large files have been fully supported by Emscripten for a long time.
(cherry picked from commit 01c80b265060f016d3534eb74d540363808804e1)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
4 months ago[3.14] gh-119180: Only fetch globals and locals if necessary in `annotationlib.get_an...
Miss Islington (bot) [Wed, 18 Jun 2025 04:24:08 +0000 (06:24 +0200)] 
[3.14] gh-119180: Only fetch globals and locals if necessary in `annotationlib.get_annotations()` (GH-135644) (#135654)

gh-119180: Only fetch globals and locals if necessary in `annotationlib.get_annotations()` (GH-135644)
(cherry picked from commit 504ae606e192a88805996a7e934f38bc5cb7f28a)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
4 months ago[3.14] gh-127146: Emscripten: Fix pathlib glob_dotdot test (GH-135624) (#135653)
Miss Islington (bot) [Wed, 18 Jun 2025 04:19:43 +0000 (06:19 +0200)] 
[3.14] gh-127146: Emscripten: Fix pathlib glob_dotdot test (GH-135624) (#135653)

The Emscripten path resolver uses the same mechanism for resolving `..`
at a file system root as for resolving symlinks. This is because
roots don't store their mountpoints. If the parent of a node is itself,
it is a root but it might be a mountpoint in some other file system.

If a path has enough `..`'s at the root, it will return ELOOP.
Enough turns out to be 49.
(cherry picked from commit e4ccd46bf75fff2938d7c21c7284e49b0ab795b0)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
4 months ago[3.14] gh-127146: Emscripten: Fix test failure due to missing os.link (GH-135626...
Miss Islington (bot) [Wed, 18 Jun 2025 04:03:32 +0000 (06:03 +0200)] 
[3.14] gh-127146: Emscripten: Fix test failure due to missing os.link (GH-135626) (#135652)

Check for existence of os.link, rather than assuming it exists.
(cherry picked from commit ce58afb400672aeec79f2017ab99acbbc65cb4ab)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
4 months ago[3.14] gh-127146: Emscripten: Skip test_url2pathname_resolve_host (GH-135634) (#135651)
Miss Islington (bot) [Wed, 18 Jun 2025 03:23:31 +0000 (05:23 +0200)] 
[3.14] gh-127146: Emscripten: Skip test_url2pathname_resolve_host (GH-135634) (#135651)

Emscripten currently `gethostbyname_r()` returns an incorrect
IP address for `localhost`. Will be resolved by upstream PR:
https://github.com/emscripten-core/emscripten/pull/24593
(cherry picked from commit 2a49c54ab2c5cf0ee96a8e577971c1525a966940)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
4 months ago[3.14] gh-127146: Allow ignored keys to be missing in test_sysconfig (GH-135622)...
Miss Islington (bot) [Wed, 18 Jun 2025 03:17:22 +0000 (05:17 +0200)] 
[3.14] gh-127146: Allow ignored keys to be missing in test_sysconfig (GH-135622) (#135650)

Fixes the test on Emscripten where userbase can be missing.
(cherry picked from commit 28c71ee4b2eb66983b78018896ca56892580816a)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
4 months ago[3.14] gh-132775: Fix Interpreter.call() __main__ Visibility (gh-135638)
Miss Islington (bot) [Tue, 17 Jun 2025 20:24:08 +0000 (22:24 +0200)] 
[3.14] gh-132775: Fix Interpreter.call() __main__ Visibility (gh-135638)

As noted in the new tests, there are a few situations we must carefully accommodate
for functions that get pickled during interp.call().  We do so by running the script
from the main interpreter's __main__ module in a hidden module in the other
interpreter.  That hidden module is used as the function __globals__.

(cherry picked from commit 269e19e0a7, AKA gh-135595)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
4 months agoPost 3.14.0b3
Hugo van Kemenade [Tue, 17 Jun 2025 18:31:06 +0000 (21:31 +0300)] 
Post 3.14.0b3

4 months agoPython 3.14.0b3 v3.14.0b3
Hugo van Kemenade [Tue, 17 Jun 2025 15:40:33 +0000 (18:40 +0300)] 
Python 3.14.0b3

4 months ago[3.14] gh-132815: Add support for JUMP_BACKWARD in specialization stats (GH-135606...
Miss Islington (bot) [Tue, 17 Jun 2025 12:38:22 +0000 (14:38 +0200)] 
[3.14] gh-132815: Add support for JUMP_BACKWARD in specialization stats (GH-135606) (#135612)

gh-132815: Add support for JUMP_BACKWARD in specialization stats (GH-135606)
(cherry picked from commit a9e66a7c506680263b39bc8c150ddc5e72213c45)

Co-authored-by: PuQing <me@puqing.work>
4 months ago[3.14] gh-134262: Catch both URLError and ConnectionError in retries (GH-135365)...
Miss Islington (bot) [Tue, 17 Jun 2025 12:16:17 +0000 (14:16 +0200)] 
[3.14] gh-134262: Catch both URLError and ConnectionError in retries (GH-135365) (#135611)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
4 months ago[3.14] gh-134262: increase retries in `Tools/build/generate_sbom.py` … (#135596)
Emma Smith [Tue, 17 Jun 2025 11:50:15 +0000 (07:50 -0400)] 
[3.14] gh-134262: increase retries in `Tools/build/generate_sbom.py` … (#135596)

4 months ago[3.14] gh-134632: Fix `build-details.json` to use `INCLUDEPY` path (GH-134633) (...
Miss Islington (bot) [Tue, 17 Jun 2025 08:31:10 +0000 (10:31 +0200)] 
[3.14] gh-134632: Fix `build-details.json` to use `INCLUDEPY` path (GH-134633) (#135605)

gh-134632: Fix `build-details.json` to use `INCLUDEPY` path (GH-134633)

* gh-134632: Fix `build-details.json` to use `INCLUDEPY` path

Fix ``build-details.json`` generation to use ``INCLUDEPY``, in order to
reference the ``pythonX.Y`` subdirectory of the include directory, as
required in :pep:`739`, instead of the top-level include directory.

* test_build_details: Add tests for the c_api section

* test_build_details: Expect pkgconfig for CPython unconditionally
(cherry picked from commit 0d582def34babca7417ece8a9e4e16cc2a752d44)

Co-authored-by: Michał Górny <mgorny@gentoo.org>
4 months ago[3.14] gh-123299: Add PEP 779 to What's New in Python 3.14 (GH-135555) (#135602)
Miss Islington (bot) [Tue, 17 Jun 2025 06:10:24 +0000 (08:10 +0200)] 
[3.14] gh-123299: Add PEP 779 to What's New in Python 3.14 (GH-135555) (#135602)

gh-123299: Add PEP 779 to What's New in Python 3.14 (GH-135555)
(cherry picked from commit c51f241c97c5bcc8ae6830842db5b00f76d6a592)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
4 months ago[3.14] gh-135489: Show verbose output for failing tests during PGO profiling step...
Miss Islington (bot) [Tue, 17 Jun 2025 05:37:39 +0000 (07:37 +0200)] 
[3.14] gh-135489: Show verbose output for failing tests during PGO profiling step with `--enable-optimizations` (#135599)

(cherry picked from commit 5b3a826888ed3b598dc4bcdc6a48d5f6ae231f8d)

Co-authored-by: PuQing <me@puqing.work>
4 months ago[3.14] gh-135443: Sometimes Fall Back to __main__.__dict__ For Globals (gh-135593)
Miss Islington (bot) [Mon, 16 Jun 2025 23:59:30 +0000 (01:59 +0200)] 
[3.14] gh-135443: Sometimes Fall Back to __main__.__dict__ For Globals (gh-135593)

For several builtin functions, we now fall back to __main__.__dict__ for the globals
when there is no current frame and _PyInterpreterState_IsRunningMain() returns
true.  This allows those functions to be run with Interpreter.call().

The affected builtins:

* exec()
* eval()
* globals()
* locals()
* vars()
* dir()

We take a similar approach with "stateless" functions, which don't use any
global variables.

(cherry picked from commit a450a0ddec, AKA gh-135491)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
4 months ago[3.14] gh-119132: Update 'Using Python on macOS' documentation. (GH-135591) (#135594)
Miss Islington (bot) [Mon, 16 Jun 2025 23:43:24 +0000 (01:43 +0200)] 
[3.14] gh-119132: Update 'Using Python on macOS' documentation. (GH-135591) (#135594)

Remove `experimental` qualification for free-threading in the document text. Note that images included in the document will be updated later in the release cycle.
(cherry picked from commit 7c685894cd9c2c669f09fad31365e3ad6c0c3861)

Co-authored-by: Ned Deily <nad@python.org>
4 months ago[3.14] gh-128627: Emscripten: Add missing semicolon in ios detection code (GH-135590...
Miss Islington (bot) [Mon, 16 Jun 2025 23:41:46 +0000 (01:41 +0200)] 
[3.14] gh-128627: Emscripten: Add missing semicolon in ios detection code (GH-135590) (#135592)

(cherry picked from commit 68b7e1a6677d7a8fb47fbd28cb5d39a87217273c)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
4 months ago[3.14] Use replacements to update versions in "Using Python on macOS" (GH-130400...
Miss Islington (bot) [Mon, 16 Jun 2025 22:15:15 +0000 (00:15 +0200)] 
[3.14] Use replacements to update versions in "Using Python on macOS" (GH-130400) (#135586)

(cherry picked from commit 21bac3aecd03805ea74ca67a3a291a9eb347588f)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
4 months ago[3.14] gh-116738: Make _heapq module thread-safe (GH-135036) (gh-135309)
Miss Islington (bot) [Mon, 16 Jun 2025 17:27:43 +0000 (19:27 +0200)] 
[3.14] gh-116738: Make _heapq module thread-safe (GH-135036) (gh-135309)

Use critical sections to make heapq methods that update the heap thread-safe when the GIL is disabled.
(cherry picked from commit a58026a5e3da9ca2d09ef51aa90fe217f9a975ec)

Co-authored-by: Alper <alperyoney@fb.com>
Co-authored-by: mpage <mpage@meta.com>
4 months ago[3.14] gh-132617: Fix `dict.update()` mutation check (gh-134815) (gh-135581)
Miss Islington (bot) [Mon, 16 Jun 2025 17:19:58 +0000 (19:19 +0200)] 
[3.14] gh-132617: Fix `dict.update()` mutation check (gh-134815) (gh-135581)

Use `ma_used` instead of `ma_keys->dk_nentries` for modification check
so that we only check if the dictionary is modified, not if new keys are
added to a different dictionary that shared the same keys object.
(cherry picked from commit d8994b0a77cc9821772d05db00a6ab23382fa17d)

Co-authored-by: Sam Gross <colesbury@gmail.com>
4 months ago[3.14] gh-135513: Fix unused variable warning in `crossinterp.c` (GH-135514) (#135577)
Miss Islington (bot) [Mon, 16 Jun 2025 16:37:26 +0000 (18:37 +0200)] 
[3.14] gh-135513: Fix unused variable warning in `crossinterp.c` (GH-135514) (#135577)

gh-135513: Fix unused variable warning in `crossinterp.c` (GH-135514)
(cherry picked from commit 4c15505071498439407483004721d0369f110229)

Co-authored-by: sobolevn <mail@sobolevn.me>
4 months ago[3.14] gh-134160: Split extension module init from PyModule docs; emphasize multi...
Miss Islington (bot) [Mon, 16 Jun 2025 15:01:09 +0000 (17:01 +0200)] 
[3.14] gh-134160: Split extension module init from PyModule docs; emphasize multi-phase init (GH-135126) (#135470)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
4 months ago[3.14] gh-119132: Remove "experimental" tag from the CPython free-threading. (gh...
Miss Islington (bot) [Mon, 16 Jun 2025 14:58:14 +0000 (16:58 +0200)] 
[3.14] gh-119132: Remove "experimental" tag from the CPython free-threading. (gh-135550) (gh-135565)

---------
(cherry picked from commit f0799795994bfd9ab0740c4d70ac54270991ba47)

Co-authored-by: Donghee Na <donghee.na@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: T. Wouters <thomas@python.org>
4 months ago[3.14] GH-135171: Revert async generator expressions behavior (#135352)
Mikhail Efimov [Mon, 16 Jun 2025 14:45:42 +0000 (17:45 +0300)] 
[3.14] GH-135171: Revert async generator expressions behavior (#135352)

4 months ago[3.14] gh-120608: fix NEWS entry typo (GH-135535) (#135558)
Miss Islington (bot) [Mon, 16 Jun 2025 10:17:37 +0000 (12:17 +0200)] 
[3.14] gh-120608: fix NEWS entry typo (GH-135535) (#135558)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
4 months ago[3.14] gh-127319: Disable port reuse on HTTP, XMLRPC, and logging TCP servers (GH...
Miss Islington (bot) [Mon, 16 Jun 2025 07:05:26 +0000 (09:05 +0200)] 
[3.14] gh-127319: Disable port reuse on HTTP, XMLRPC, and logging TCP servers (GH-135405) (GH-135538)

(cherry picked from commit 2bd3895fcabb2dfdae5c0c72e60483e3d3267f0f)

4 months ago[3.14] gh-111178: fix UBSan failures for `RemoteUnwinderObject` (GH-135539) (#135547)
Miss Islington (bot) [Sun, 15 Jun 2025 20:54:23 +0000 (22:54 +0200)] 
[3.14] gh-111178: fix UBSan failures for `RemoteUnwinderObject` (GH-135539) (#135547)

4 months ago[3.14] gh-67022: Document bytes/str inconsistency in email.header.decode_header(...
Miss Islington (bot) [Sun, 15 Jun 2025 20:02:16 +0000 (22:02 +0200)] 
[3.14] gh-67022: Document bytes/str inconsistency in email.header.decode_header() and suggest email.headerregistry.HeaderRegistry as a sane alternative (GH-92900) (#135548)

gh-67022: Document bytes/str inconsistency in email.header.decode_header() and suggest email.headerregistry.HeaderRegistry as a sane alternative (GH-92900)

* gh-67022: Document bytes/str inconsistency in email.header.decode_header()

This function's possible return types have been surprising and error-prone
for the entirety of its Python 3.x history. It can return either:

1. `typing.List[typing.Tuple[bytes, typing.Optional[str]]]` of length >1
2. or `typing.List[typing.Tuple[str, None]]`, of length exactly 1

This means that any user of this function must be prepared to accept either
`bytes` or `str` for the first member of the 2-tuples it returns, which is a
very surprising behavior in Python 3.x, particularly given that the second
member of the tuple is supposed to represent the charset/encoding of the
first member.

This patch documents the behavior of this function, and adds test cases
to demonstrate it.

As discussed in bpo-22833, this cannot be changed in a backwards-compatible
way, and some users of this function depend precisely on the existing
behavior.

Add warnings about obsolescence of 'email.header.decode_header' and 'email.header.make_header' functions.

Recommend use of `email.headerregistry.HeaderRegistry` instead, as suggested
in https://github.com/python/cpython/pull/92900#discussion_r1112472177
(cherry picked from commit 60181f4ed0e48ff35dc296da6b51473bfc553d16)

Co-authored-by: Dan Lenski <dlenski@gmail.com>
4 months ago[3.14] gh-135371: Clean tags from pointers in all cases in remote debugging module...
Miss Islington (bot) [Sun, 15 Jun 2025 19:05:39 +0000 (21:05 +0200)] 
[3.14] gh-135371: Clean tags from pointers in all cases in remote debugging module (GH-135534) (#135545)

4 months ago[3.14] gh-135361: update documentation for `remote_debugger_script` audit event ...
Miss Islington (bot) [Sun, 15 Jun 2025 18:55:24 +0000 (20:55 +0200)] 
[3.14] gh-135361: update documentation for `remote_debugger_script` audit event (GH-135362) (#135546)

4 months ago[3.14] gh-135371: Fix asyncio introspection output to include internal coroutine...
Miss Islington (bot) [Sun, 15 Jun 2025 18:38:56 +0000 (20:38 +0200)] 
[3.14] gh-135371: Fix asyncio introspection output to include internal coroutine chains (GH-135436) (#135509)

gh-135371: Fix asyncio introspection output to include internal coroutine chains (GH-135436)
(cherry picked from commit 028309fb47869b665f55d10e9eabf7952bf7dbd3)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
4 months ago[3.14] gh-65697: Improved error msg for configparser key validation (GH-135527) ...
Miss Islington (bot) [Sun, 15 Jun 2025 16:38:15 +0000 (18:38 +0200)] 
[3.14] gh-65697: Improved error msg for configparser key validation (GH-135527) (#135541)

gh-65697: Improved error msg for configparser key validation (GH-135527)

* Improved error msg for configparser key validation and added note in 3.14 whatsnew

* Properly added change to configparser

* 📜🤖 Added by blurb_it.

---------
(cherry picked from commit 81237fbcf6adc962647566eafca62dd5a905375e)

Co-authored-by: Jacob Austin Lincoln <99031153+lincolnj1@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
4 months ago[3.14] gh-135171: Update documentation for the generator expression (GH-135351) ...
Miss Islington (bot) [Sun, 15 Jun 2025 00:38:19 +0000 (02:38 +0200)] 
[3.14] gh-135171: Update documentation for the generator expression (GH-135351) (#135524)

gh-135171: Update documentation for the generator expression (GH-135351)

* gh-135171: Update documentation for the generator expression

Document that the iterator for the leftmost "for" clause is created
immediately.

* Update Doc/reference/expressions.rst

---------
(cherry picked from commit 8979d3afe376c67931665070a79f6939ebcd940b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Brian Skinn <brian.skinn@gmail.com>
4 months ago[3.14] gh-135497: fix `MAXLOGNAME` detection in `configure.ac` (GH-135508) (#135516)
Miss Islington (bot) [Sat, 14 Jun 2025 16:50:48 +0000 (18:50 +0200)] 
[3.14] gh-135497: fix `MAXLOGNAME` detection in `configure.ac` (GH-135508) (#135516)

gh-135497: fix `MAXLOGNAME` detection in `configure.ac` (GH-135508)
(cherry picked from commit 2e15a50851da66eb8227ec6ea07a9cc7ed08fbf3)

Co-authored-by: Caleb Xu <calebcenter@live.com>
4 months ago[3.14] gh-135504: Document `LIBZSTD_CFLAGS` and `LIBZSTD_LIBS` config options (GH...
Miss Islington (bot) [Sat, 14 Jun 2025 15:13:03 +0000 (17:13 +0200)] 
[3.14] gh-135504: Document `LIBZSTD_CFLAGS` and `LIBZSTD_LIBS` config options (GH-135505) (#135515)

4 months ago[3.14] gh-135368: Fix mocks on dataclass specs with `instance=True` (GH-135421) ...
Miss Islington (bot) [Sat, 14 Jun 2025 09:11:31 +0000 (11:11 +0200)] 
[3.14] gh-135368: Fix mocks on dataclass specs with `instance=True` (GH-135421) (#135503)

gh-135368: Fix mocks on dataclass specs with `instance=True` (GH-135421)

* gh-135368: Fix mocks on dataclass specs with `instance=True`

* Extend dataclass mock_methods

---------
(cherry picked from commit c8319a3fea9ff7f9b49008be3b5d681112bbe7f3)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
4 months ago[3.14] gh-135496: Fix f string exclamation mark error typo (GH-135495) (#135499)
Miss Islington (bot) [Sat, 14 Jun 2025 05:05:55 +0000 (07:05 +0200)] 
[3.14] gh-135496: Fix f string exclamation mark error typo (GH-135495) (#135499)

gh-135496: Fix f string exclamation mark error typo (GH-135495)
(cherry picked from commit c2bb3f9843bc4763d6d41e883dbe9525f5155a4a)

Co-authored-by: GiGaGon <107241144+MeGaGiGaGon@users.noreply.github.com>
4 months ago[3.14] gh-132775: Clean Up Cross-Interpreter Error Handling (gh-135492)
Miss Islington (bot) [Sat, 14 Jun 2025 02:08:25 +0000 (04:08 +0200)] 
[3.14] gh-132775: Clean Up Cross-Interpreter Error Handling (gh-135492)

In this refactor we:

* move some code around
* make a couple of typedefs opaque
* decouple errors from session state
* improve tracebacks for propagated exceptions

This change helps simplify several upcoming changes.

(cherry picked from commit c7f4a80079, AKA gh-135369)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
4 months ago[3.14] gh-135437: Account For Duplicate Names in _PyCode_SetUnboundVarCounts() (gh...
Miss Islington (bot) [Fri, 13 Jun 2025 23:14:00 +0000 (01:14 +0200)] 
[3.14] gh-135437: Account For Duplicate Names in _PyCode_SetUnboundVarCounts() (gh-135493)

(cherry picked from commit 56eabea, AKA gh-135438)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
4 months ago[3.14] gh-135462: Fix quadratic complexity in processing special input in HTMLParser...
Miss Islington (bot) [Fri, 13 Jun 2025 17:23:48 +0000 (19:23 +0200)] 
[3.14] gh-135462: Fix quadratic complexity in processing special input in HTMLParser (GH-135464) (GH-135481)

End-of-file errors are now handled according to the HTML5 specs --
comments and declarations are automatically closed, tags are ignored.
(cherry picked from commit 6eb6c5dbfb528bd07d77b60fd71fd05d81d45c41)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 months ago[3.14] doc: Remove what was essentially duplicate wording. (GH-135431) (GH-135440)
Miss Islington (bot) [Fri, 13 Jun 2025 16:54:20 +0000 (18:54 +0200)] 
[3.14] doc: Remove what was essentially duplicate wording. (GH-135431) (GH-135440)

(cherry picked from commit f273fd77d790300506c6443baa94d027b643f603)

4 months agogh-135455: Fix version and architecture detection in PC/layout script. (GH-135461)
Miss Islington (bot) [Fri, 13 Jun 2025 16:10:29 +0000 (18:10 +0200)] 
gh-135455: Fix version and architecture detection in PC/layout script. (GH-135461)

(cherry picked from commit afc5ab6cce9d7095b99c1410a6762bc4a96504dd)

Co-authored-by: Steve Dower <steve.dower@python.org>
4 months ago[3.14] gh-106318: Add example for `str.expandtabs()` (GH-134525) (#135476)
Miss Islington (bot) [Fri, 13 Jun 2025 15:50:16 +0000 (17:50 +0200)] 
[3.14] gh-106318: Add example for `str.expandtabs()` (GH-134525) (#135476)

Co-authored-by: Blaise Pabon <blaise@gmail.com>
4 months ago[3.14] gh-135244: improve wording of `uuid8` docs about CSPRNG (GH-135433) (#135467)
Miss Islington (bot) [Fri, 13 Jun 2025 14:11:51 +0000 (16:11 +0200)] 
[3.14] gh-135244: improve wording of `uuid8` docs about CSPRNG (GH-135433) (#135467)

gh-135244: improve wording of `uuid8` docs about CSPRNG (GH-135433)
(cherry picked from commit 394d7985da50189e123d0908e9a282f6da31ed78)

Co-authored-by: LamentXU <108666168+LamentXU123@users.noreply.github.com>
4 months ago[3.14] gh-132969: Fix error/hang when shutdown(wait=False) and task exited abnormall...
Miss Islington (bot) [Fri, 13 Jun 2025 13:49:54 +0000 (15:49 +0200)] 
[3.14] gh-132969:  Fix error/hang when shutdown(wait=False) and task exited abnormally (GH-133222) (GH-135344)

gh-132969:  Fix error/hang when shutdown(wait=False) and task exited abnormally (GH-133222)

When shutdown is called with wait=False, the executor thread keeps running
even after the ProcessPoolExecutor's state is reset. The executor then tries
to replenish the worker processes pool resulting in an error and a potential hang
when it comes across a worker that has died. Fixed the issue by having
_adjust_process_count() return without doing anything if the ProcessPoolExecutor's
state has been reset.

Added unit tests to validate two scenarios:
max_workers < num_tasks (exception)
max_workers > num_tasks (exception + hang)
(cherry picked from commit 598aa7cc98bc1b39f10ec41decddd8dd88799fe1)

Co-authored-by: Ajay Kamdar <140011370+ogbiggles@users.noreply.github.com>
4 months ago[3.14] gh-106318: Add example for `str.endswith()` (GH-134523) (#135459)
Miss Islington (bot) [Fri, 13 Jun 2025 12:14:21 +0000 (14:14 +0200)] 
[3.14] gh-106318: Add example for `str.endswith()` (GH-134523) (#135459)

gh-106318: Add example for `str.endswith()` (GH-134523)
(cherry picked from commit eed827ed091c6e55f11164046d287a76e30fbc0e)

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
4 months ago[3.14] gh-106318: Add example for `str.encode()` (GH-134520) (#135457)
Miss Islington (bot) [Fri, 13 Jun 2025 11:46:06 +0000 (13:46 +0200)] 
[3.14] gh-106318: Add example for `str.encode()` (GH-134520) (#135457)

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
4 months ago[3.14] Revert "gh-135410: use a critical section around `StringIO.__next__` (GH-13541...
Miss Islington (bot) [Thu, 12 Jun 2025 22:58:58 +0000 (00:58 +0200)] 
[3.14] Revert "gh-135410: use a critical section around `StringIO.__next__` (GH-135412)" (GH-135439) (gh-135449)

Revert "gh-135410: use a critical section around `StringIO.__next__` (GH-135412)" (GH-135439)

This reverts commit e6c3039cb39e68ae9af9ddcaca341c5af8f9cf23.
(cherry picked from commit 73431356d324842cac0d545018c3ad21c85bc883)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
4 months ago[3.14] gh-135429: Fix the argument mismatch in lsprof throw event (GH-135442) (#135446)
Miss Islington (bot) [Thu, 12 Jun 2025 22:13:36 +0000 (00:13 +0200)] 
[3.14] gh-135429: Fix the argument mismatch in lsprof throw event (GH-135442) (#135446)

gh-135429: Fix the argument mismatch in lsprof throw event (GH-135442)
(cherry picked from commit b03309fe5fca2eef51bf739fb13d9acef70cb964)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
4 months ago[3.14] gh-134939: Add the concurrent.interpreters Module (gh-135414)
Eric Snow [Thu, 12 Jun 2025 14:19:26 +0000 (08:19 -0600)] 
[3.14] gh-134939: Add the concurrent.interpreters Module (gh-135414)

PEP-734 has been accepted (for 3.14).

(FTR, I'm opposed to putting this under the concurrent package, but
doing so is the SC condition under which the module can land in 3.14.)

(cherry picked from commit 62143736b, AKA gh-133958)

4 months ago[3.14] gh-135410: use a critical section around `StringIO.__next__` (GH-135412) ...
Miss Islington (bot) [Thu, 12 Jun 2025 11:36:44 +0000 (13:36 +0200)] 
[3.14] gh-135410: use a critical section around `StringIO.__next__` (GH-135412) (#135425)

gh-135410: use a critical section around `StringIO.__next__` (GH-135412)
(cherry picked from commit e6c3039cb39e68ae9af9ddcaca341c5af8f9cf23)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
4 months ago[3.14] gh-128627: Fix iPad detection in wasm-gc (GH-135388) (#135419)
Miss Islington (bot) [Thu, 12 Jun 2025 04:28:47 +0000 (06:28 +0200)] 
[3.14] gh-128627: Fix iPad detection in wasm-gc (GH-135388) (#135419)

On some iPad versions, Safari reports as "macOS". Modifies the GC trampoline detection
to add a feature-based check to detect this case.
(cherry picked from commit d4471297586335d8c24db8b2c030d32c94570344)

Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
4 months ago[3.14] Fix presentation of dataclasses' `unsafe_hash` default value (GH-116532) ...
Miss Islington (bot) [Thu, 12 Jun 2025 01:36:17 +0000 (03:36 +0200)] 
[3.14] Fix presentation of dataclasses' `unsafe_hash` default value (GH-116532) (#135416)

Fix presentation of dataclasses' `unsafe_hash` default value (GH-116532)

(cherry picked from commit 71f5fafdfb2e509f59cd584d45949c6496f88d41)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
4 months ago[3.14] gh-133264: Correct documentation of how Py_Main and Py_RunMain handle SystemEx...
Miss Islington (bot) [Wed, 11 Jun 2025 15:29:46 +0000 (17:29 +0200)] 
[3.14] gh-133264: Correct documentation of how Py_Main and Py_RunMain handle SystemExit (GH-135337) (#135394)

gh-133264: Correct documentation of how Py_Main and Py_RunMain handle SystemExit (GH-135337)
(cherry picked from commit b706ff003c536c5bca24dfdd3a8917bffcfa3df1)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
4 months ago[3.14] gh-135321: Always raise a correct exception for BINSTRING argument > 0x7ffffff...
Miss Islington (bot) [Wed, 11 Jun 2025 11:01:15 +0000 (13:01 +0200)] 
[3.14] gh-135321: Always raise a correct exception for BINSTRING argument > 0x7fffffff in pickle (GH-135322) (GH-135382)

(cherry picked from commit 2b8b4774d29a707330d463f226630185cbd3ceff)

Co-authored-by: Justin Applegate <70449145+Legoclones@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 months ago[3.14] gh-133967: Do not normalize locale name 'C.UTF-8' to 'en_US.UTF-8' (GH-135347...
Miss Islington (bot) [Wed, 11 Jun 2025 09:43:20 +0000 (11:43 +0200)] 
[3.14] gh-133967: Do not normalize locale name 'C.UTF-8' to 'en_US.UTF-8' (GH-135347) (GH-135349)

(cherry picked from commit 0f866cbfefd797b4dae25962457c5579bb90dde5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 months ago[3.14] gh-135326: Test support of __index__ in random.getrandbits() (GH-135356) ...
Miss Islington (bot) [Wed, 11 Jun 2025 02:17:06 +0000 (04:17 +0200)] 
[3.14] gh-135326: Test support of __index__ in random.getrandbits() (GH-135356) (#135373)

gh-135326: Test support of __index__ in random.getrandbits() (GH-135356)
(cherry picked from commit 5ae669fc4e674968529cc32f7f31d14dddd76607)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 months ago[3.14] gh-91048: Reorder result tuple of parse_code_object (GH-134898) (#134956)
Miss Islington (bot) [Wed, 11 Jun 2025 01:33:46 +0000 (03:33 +0200)] 
[3.14] gh-91048:  Reorder result tuple of parse_code_object (GH-134898) (#134956)

* gh-91048:  Reorder result tuple of parse_code_object (GH-134898)

Reorder result tuple of parse_code_object

The standard followed by APIs like pstat.Stats is to take a file, line,
function triplet. The parse_code_object function (and callers exposing
this in Python like RemoteUnwinder.get_stack_trace) return function,
file, line triplets which requires the caller to reorder these when
using it in classes like pstat.Stats.
(cherry picked from commit 8e8786f8986353e20c1c4406c34409a6139fa073)

Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com>
* Reorder asyncio

---------

Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
4 months ago[3.14] gh-130077: Properly match full soft keywords in the parser (GH-135317) (#135348)
Miss Islington (bot) [Wed, 11 Jun 2025 01:01:37 +0000 (03:01 +0200)] 
[3.14] gh-130077: Properly match full soft keywords in the parser (GH-135317) (#135348)

gh-130077: Properly match full soft keywords in the parser (GH-135317)
(cherry picked from commit ff2b5f40c2bf5c71255caac8a743c09ba0758c02)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
4 months ago[3.14] gh-128605: Add branch protections for x86_64 in asm_trampoline.S (#128606...
stratakis [Tue, 10 Jun 2025 15:41:39 +0000 (17:41 +0200)] 
[3.14] gh-128605: Add branch protections for x86_64 in asm_trampoline.S (#128606) (#135345)

Apply Intel Control-flow Technology for x86-64 on asm_trampoline.S.

Required for mitigation against return-oriented programming (ROP)
and Call or Jump Oriented Programming (COP/JOP) attacks.

Manual application is required for the assembly files.

See also: https://sourceware.org/annobin/annobin.html/Test-cf-protection.html

4 months ago[3.14] gh-118928: Amend sqlite3 execute*() deprecation notes (GH-135163) (#135342)
Miss Islington (bot) [Tue, 10 Jun 2025 11:30:19 +0000 (13:30 +0200)] 
[3.14] gh-118928: Amend sqlite3 execute*() deprecation notes (GH-135163) (#135342)

(cherry picked from commit ee7345d507884aaaa000e51858c64852ac4f6d02)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
4 months ago[3.14] Docs: fix docstring of `email.message.Message.add_header` (GH-134355) (#135339)
Miss Islington (bot) [Tue, 10 Jun 2025 11:00:25 +0000 (13:00 +0200)] 
[3.14] Docs: fix docstring of `email.message.Message.add_header` (GH-134355) (#135339)

Docs: fix docstring of `email.message.Message.add_header` (GH-134355)
(cherry picked from commit c23eec29602eb090d6f3e854e41c22c1e2c6dfc2)

Co-authored-by: Alexander Shadchin <shadchin@yandex-team.com>
4 months ago[3.14] gh-133157: remove usage of `_Py_NO_SANITIZE_UNDEFINED` in `Parser/pegen.c...
Miss Islington (bot) [Tue, 10 Jun 2025 00:34:49 +0000 (02:34 +0200)] 
[3.14] gh-133157: remove usage of `_Py_NO_SANITIZE_UNDEFINED` in `Parser/pegen.c` (GH-134048) (#135320)

gh-133157: remove usage of `_Py_NO_SANITIZE_UNDEFINED` in `Parser/pegen.c` (GH-134048)
(cherry picked from commit 754e7c9b5187fcad22acf7555479603f173a4a09)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 months ago[3.14] Fix warnings `set but not used [-Wunused-but-set-variable]` in remote_debug...
Miss Islington (bot) [Tue, 10 Jun 2025 00:29:28 +0000 (02:29 +0200)] 
[3.14] Fix warnings `set but not used [-Wunused-but-set-variable]` in remote_debug.h (GH-135290) (#135319)

Fix warnings `set but not used [-Wunused-but-set-variable]` in remote_debug.h (GH-135290)
(cherry picked from commit 49fc1f215aeb0f71445505191ccb65517b58a5aa)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
4 months ago[3.14] Fix definition of `_Py_RemoteDebug_` symbols for static linking (GH-135146...
Miss Islington (bot) [Tue, 10 Jun 2025 00:28:42 +0000 (02:28 +0200)] 
[3.14] Fix definition of `_Py_RemoteDebug_` symbols for static linking (GH-135146) (#135318)

Fix definition of `_Py_RemoteDebug_` symbols for static linking (GH-135146)
(cherry picked from commit 2e1ad6eb26871a379e5d3aa626d6fc93eba72a86)

Co-authored-by: Zanie Blue <contact@zanie.dev>
5 months ago[3.14] Heavily comment Python/perf_jit_trampoline.c to improve maintainability (GH...
Miss Islington (bot) [Mon, 9 Jun 2025 21:09:48 +0000 (23:09 +0200)] 
[3.14] Heavily comment Python/perf_jit_trampoline.c to improve maintainability (GH-134527) (#135299)

5 months ago[3.14] gh-127833: Reword and expand the Notation section (GH-134443) (GH-135301)
Miss Islington (bot) [Mon, 9 Jun 2025 13:56:24 +0000 (15:56 +0200)] 
[3.14] gh-127833: Reword and expand the Notation section (GH-134443) (GH-135301)

Prepare the docs for using the notation used in the `python.gram`
file. If we want to sync the two, the meta-syntax should be the same.

Link the Full Grammar docs here; keep only a few extras.

Also, remove the distinction between lexical and syntactic rules,
except for whitespace handling.
With f- and t-strings, the line between the two is blurry.
(cherry picked from commit 28d91d06f13ceda3df0cefacec497c370eff4802)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Colin Marquardt <cmarqu42@gmail.com>
5 months ago[3.14] bpo-45210: Document that error indicator may be set in tp_dealloc (GH-28358...
Miss Islington (bot) [Mon, 9 Jun 2025 13:01:33 +0000 (15:01 +0200)] 
[3.14] bpo-45210: Document that error indicator may be set in tp_dealloc (GH-28358) (#135298)

bpo-45210: Document that error indicator may be set in tp_dealloc (GH-28358)
(cherry picked from commit 8441b263af964f353bf02d56c32a4fc547cdc330)

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Co-authored-by: Edward Z. Yang <ezyang@mit.edu>
Co-authored-by: Victor Stinner <vstinner@python.org>
5 months ago[3.14] gh-133968: Add PyUnicodeWriter_WriteASCII() function (#133973) (#134974)
Victor Stinner [Mon, 9 Jun 2025 12:37:26 +0000 (14:37 +0200)] 
[3.14] gh-133968: Add PyUnicodeWriter_WriteASCII() function (#133973) (#134974)

gh-133968: Add PyUnicodeWriter_WriteASCII() function (#133973)

Replace most PyUnicodeWriter_WriteUTF8() calls with
PyUnicodeWriter_WriteASCII().

(cherry picked from commit f49a07b531543dd8a42d90f5b1c89c0312fbf806)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 months ago[3.14] GH-135287: clang-cl PGO builds on Windows fail with `could not open '/GENPROFI...
Miss Islington (bot) [Mon, 9 Jun 2025 12:18:51 +0000 (14:18 +0200)] 
[3.14] GH-135287: clang-cl PGO builds on Windows fail with `could not open '/GENPROFILE'` (GH-135289)

GH-135287: clang-cl PGO builds on Windows fail with `could not open '/GENPROFILE'` (GH-135289)
(cherry picked from commit 0045100ccbc3919e8990fa59bc413fe38d21b075)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
5 months ago[3.14] GH-135171: Fix generator expressions one last time (hopefully) (GH-135225)
Mark Shannon [Mon, 9 Jun 2025 10:04:23 +0000 (11:04 +0100)] 
[3.14] GH-135171: Fix generator expressions one last time (hopefully) (GH-135225)

* Add NULL check to FOR_ITER

* Move GET_ITER back to genexpr creation

5 months ago[3.14] Use f-strings in csv docs example (GH-135245) (#135285)
Miss Islington (bot) [Mon, 9 Jun 2025 06:37:15 +0000 (08:37 +0200)] 
[3.14] Use f-strings in csv docs example (GH-135245) (#135285)

Use f-strings in csv docs example (GH-135245)
(cherry picked from commit 2677dd017a033eaaad3b8e1e0eb5664a44e7e231)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
5 months ago[3.14] gh-135263: Fix typo in token.NAME documentation (GH-135275) (#135280)
Miss Islington (bot) [Sun, 8 Jun 2025 21:55:04 +0000 (23:55 +0200)] 
[3.14] gh-135263: Fix typo in token.NAME documentation (GH-135275) (#135280)

gh-135263: Fix typo in token.NAME documentation (GH-135275)
(cherry picked from commit 8d17a412da7e7d8412efc625d48dcb5eecea50b0)

Co-authored-by: Vladyslav Lazoryk <80263725+lazorikv@users.noreply.github.com>
5 months ago[3.14] gh-135276: Refresh `zipfile.Path` from zipp 3.23 (GH-135277) (#135278)
Miss Islington (bot) [Sun, 8 Jun 2025 20:12:25 +0000 (22:12 +0200)] 
[3.14] gh-135276: Refresh `zipfile.Path` from zipp 3.23 (GH-135277) (#135278)

* gh-135276: Refresh `zipfile.Path` from zipp 3.23 (GH-135277)

Apply changes from zipp 3.23
(cherry picked from commit 8d6eb0c26276c4013346622580072908d46d2341)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* Removed features slated for Python 3.15 only.

---------

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
5 months ago[3.14] Update tutorial for new "Copy" button (GH-135007) (#135270)
Miss Islington (bot) [Sun, 8 Jun 2025 16:40:07 +0000 (18:40 +0200)] 
[3.14] Update tutorial for new "Copy" button (GH-135007) (#135270)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
5 months ago[3.14] gh-134976: document the exception type that can be raised by `s[i]` (GH-134977...
Miss Islington (bot) [Sun, 8 Jun 2025 12:37:29 +0000 (14:37 +0200)] 
[3.14] gh-134976: document the exception type that can be raised by `s[i]` (GH-134977) (#135258)

gh-134976: document the exception type that can be raised by `s[i]` (GH-134977)
(cherry picked from commit 158e5162bfaa8a49178ce2c3f2455c3e03b60157)

Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
5 months ago[3.14] gh-135244: generate UUID random Node ID with a CSPRNG as per RFC 9562, §6...
Miss Islington (bot) [Sun, 8 Jun 2025 12:13:04 +0000 (14:13 +0200)] 
[3.14] gh-135244: generate UUID random Node ID with a CSPRNG as per RFC 9562, §6.10.3 (GH-135226) (#135255)

gh-135244: generate UUID random Node ID with a CSPRNG as per RFC 9562, §6.10.3 (GH-135226)

This aligns with the recommendations of RFC 9562, Section 6.10, paragraph 3 [1].

[1]: https://www.rfc-editor.org/rfc/rfc9562.html#section-6.10-3.

---------
(cherry picked from commit 1cb716387255a7bdab5b580bcf8ac1b6fa32cc41)

Co-authored-by: LamentXU <108666168+LamentXU123@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 months ago[3.14] gh-134151 Fix `TypeError` in `email.utils.decode_params` when sorting RFC...
Miss Islington (bot) [Sun, 8 Jun 2025 07:38:39 +0000 (09:38 +0200)] 
[3.14] gh-134151 Fix `TypeError` in `email.utils.decode_params` when sorting RFC 2231 continuations (GH-134687) (#135247)

gh-134151 Fix `TypeError` in `email.utils.decode_params` when sorting RFC 2231 continuations (GH-134687)

- Fix sorting logic in `email.utils.decode_params` to handle None values.
- Update tests for RFC 2231 continuation sorting.
(cherry picked from commit bcb6b45cb86a2f9f65b6c41f27c36059ba86a50b)

Co-authored-by: Jiucheng(Oliver) <git.jiucheng@gmail.com>
5 months ago[3.14] gh-134876: Add fallback for when process_vm_readv fails with ENOSYS (GH-134878...
Miss Islington (bot) [Sat, 7 Jun 2025 18:56:38 +0000 (20:56 +0200)] 
[3.14] gh-134876: Add fallback for when process_vm_readv fails with ENOSYS (GH-134878) (#135240)

gh-134876: Add fallback for when process_vm_readv fails with ENOSYS (GH-134878)
(cherry picked from commit ac9c3431cc5916a795c42b3e2b965233ceffe6f0)

Co-authored-by: Daniel Golding <goldingd89@gmail.com>
5 months ago[3.14] gh-134155: fix AttributeError in email._header_value_parser.get_address (GH...
Miss Islington (bot) [Fri, 6 Jun 2025 18:13:30 +0000 (20:13 +0200)] 
[3.14] gh-134155: fix AttributeError in email._header_value_parser.get_address (GH-134194) (#135191)

gh-134155: fix AttributeError in email._header_value_parser.get_address (GH-134194)

Append the defect to defects instead of to the parse tree.
(cherry picked from commit d9cad074d52fe31327429fd81e4d2eeea3dbe35b)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
5 months ago[3.14] Docs: Update `PyExc_*` tables in the c-api documentation (GH-131640) (GH-135220)
Miss Islington (bot) [Fri, 6 Jun 2025 15:57:37 +0000 (17:57 +0200)] 
[3.14] Docs: Update `PyExc_*` tables in the c-api documentation (GH-131640) (GH-135220)

Docs: Update `PyExc_*` tables in the c-api documentation (GH-131640)

Add `PyExc_BaseExceptionGroup` and `PyExc_EncodingWarning`
(cherry picked from commit f00512db20561370faad437853f6ecee0eec4856)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
5 months ago[3.14] gh-134160: Use PyModuleDef.m_free in the example module xxlimited (GH-135174...
Miss Islington (bot) [Fri, 6 Jun 2025 15:08:45 +0000 (17:08 +0200)] 
[3.14] gh-134160: Use PyModuleDef.m_free in the example module xxlimited (GH-135174) (GH-135213)

gh-134160: Use PyModuleDef.m_free in the example module xxlimited (GH-135174)
(cherry picked from commit 1adca08d658ee2d520f3193960eaf3ae2ead1cef)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
5 months ago[3.14] gh-57089: Note _layout_ in the bitfield docs (GH-134148) (GH-135216)
Miss Islington (bot) [Fri, 6 Jun 2025 14:58:48 +0000 (16:58 +0200)] 
[3.14] gh-57089: Note _layout_ in the bitfield docs (GH-134148) (GH-135216)

(cherry picked from commit b22b964a5c245e13ae0439c5efbb8984acf607ab)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Meador Inge <meadori@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
5 months ago[3.14] feat(docs): type fix - apply pep8 by using docstring instead of comment in...
Miss Islington (bot) [Fri, 6 Jun 2025 13:22:50 +0000 (15:22 +0200)] 
[3.14] feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. (GH-135181) (#135212)

feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. (GH-135181)

Giving the right example incitates the tutorial readers to do the same in the future.
(cherry picked from commit 343182853f19a42c0ba8980d3104076a8c7bcfe7)

Co-authored-by: Jean-Louis GUENEGO <jlguenego@gmail.com>
5 months ago[3.14] gh-135120: Add test.support.subTests() (GH-135121) (GH-135208)
Serhiy Storchaka [Fri, 6 Jun 2025 13:03:28 +0000 (16:03 +0300)] 
[3.14] gh-135120: Add test.support.subTests() (GH-135121) (GH-135208)

(cherry picked from commit 6ef06fad84244261c695ec337c7d2734277054db)

5 months ago[3.14] gh-134993: Add os.lstat() to os.supports_dir_fd (GH-135188) (#135205)
Miss Islington (bot) [Fri, 6 Jun 2025 12:38:59 +0000 (14:38 +0200)] 
[3.14] gh-134993: Add os.lstat() to os.supports_dir_fd (GH-135188) (#135205)

gh-134993: Add os.lstat() to os.supports_dir_fd (GH-135188)
(cherry picked from commit e004cf8fd5c006a7a1c60807a03066f4c43452e5)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 months ago[3.14] Fix versionadded directive rendering in c-api/arg.rst (GH-135199) (#135207)
Miss Islington (bot) [Fri, 6 Jun 2025 12:30:33 +0000 (14:30 +0200)] 
[3.14] Fix versionadded directive rendering in c-api/arg.rst (GH-135199) (#135207)

Fix versionadded directive rendering in c-api/arg.rst (GH-135199)
(cherry picked from commit 39859fcac5c8335ca9c1bddc5945a7d3e934aebc)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
5 months ago[3.14] gh-128605: Revert "Add branch protections for x86_64 in asm_tr…ampoline.S...
Petr Viktorin [Fri, 6 Jun 2025 11:55:26 +0000 (13:55 +0200)] 
[3.14] gh-128605: Revert "Add branch protections for x86_64 in asm_tr…ampoline.S (#128606) (#135077)" (GH-135175)

This reverts commit 899cca6dbf76bf3e06a99f60a5f996ad6ba0761f,
which broke buildbots.

5 months ago[3.14] gh-135155: Added dependencies required for compiling the _zstd module (GH...
Miss Islington (bot) [Fri, 6 Jun 2025 01:09:08 +0000 (03:09 +0200)] 
[3.14] gh-135155: Added dependencies required for compiling the _zstd module (GH-135156) (#135197)

gh-135155: Added dependencies required for compiling the _zstd module (GH-135156)
(cherry picked from commit a7d41e8aab5211f4ed7f636c41d63adcab0affba)

Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
5 months ago[3.14] gh-134889: Fix handling of a few opcodes when optimizing `LOAD_FAST` (#134958...
mpage [Thu, 5 Jun 2025 20:06:51 +0000 (13:06 -0700)] 
[3.14] gh-134889: Fix handling of a few opcodes when optimizing `LOAD_FAST` (#134958) (#135187)

We were incorrectly handling a few opcodes that leave their operands on the stack. Treat all of these conservatively; assume that they always leave operands on the stack.

(cherry picked from commit 6b77af257c25d31f1f137e477cb23e63692ddf29)