]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
15 months ago[3.13] gh-121295: Fix blocked console after interrupting a long paste (GH-121815...
Miss Islington (bot) [Tue, 16 Jul 2024 06:29:04 +0000 (08:29 +0200)] 
[3.13] gh-121295: Fix blocked console after interrupting a long paste (GH-121815) (GH-121826)

(cherry picked from commit 498a94c198e72525b8a7f4cb4f4a8957560f593a)

Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
15 months ago[3.13] gh-121610: pyrepl - handle extending blocks when multi-statement blocks are...
Miss Islington (bot) [Tue, 16 Jul 2024 06:28:41 +0000 (08:28 +0200)] 
[3.13] gh-121610: pyrepl - handle extending blocks when multi-statement blocks are pasted (GH-121757) (GH-121825)

console.compile with the "single" param throws an exception when
there are multiple statements, never allowing to adding newlines
to a pasted code block (gh-121610)

This adds a few extra checks to allow extending when in an indented
block, and tests for a few examples.

(cherry picked from commit 7d111dac160c658b277ec0fac75eee8edcfbe9dc)

Co-authored-by: saucoide <32314353+saucoide@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
15 months ago[3.13] gh-120831: Increase the default minimum supported iOS version to 13.0 (GH...
Miss Islington (bot) [Tue, 16 Jul 2024 04:57:05 +0000 (06:57 +0200)] 
[3.13] gh-120831: Increase the default minimum supported iOS version to 13.0 (GH-121250) (#121833)

gh-120831: Increase the default minimum supported iOS version to 13.0 (GH-121250)

Increases the default minimum iOS version to 13.0.

(cherry picked from commit 7e91e0dcfe2faab1e1a4630e6f745aa30ca87b3d)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
15 months ago[3.13] gh-121605: Fix test hang when pyrepl is not available (GH-121820) (GH-121823)
Miss Islington (bot) [Mon, 15 Jul 2024 23:15:18 +0000 (01:15 +0200)] 
[3.13] gh-121605: Fix test hang when pyrepl is not available (GH-121820) (GH-121823)

The fallback repl does not support "exit" without parentheses, so the
test would hang until the timeout expired.
(cherry picked from commit 4134261ab831863565fefc7a04d05a1fc1bca2f8)

Co-authored-by: Sam Gross <colesbury@gmail.com>
15 months ago[3.13] gh-121790: Fix interactive console initialization (GH-121793) (GH-121822)
Miss Islington (bot) [Mon, 15 Jul 2024 22:49:41 +0000 (00:49 +0200)] 
[3.13] gh-121790: Fix interactive console initialization (GH-121793) (GH-121822)

(cherry picked from commit e5c7216f376a06d2c931daf999e2980e494e747e)

Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
15 months ago[3.13] gh-121794: Don't set `ob_tid` to zero in fast-path dealloc (GH-121799) (#121821)
Miss Islington (bot) [Mon, 15 Jul 2024 22:15:23 +0000 (00:15 +0200)] 
[3.13] gh-121794: Don't set `ob_tid` to zero in fast-path dealloc (GH-121799) (#121821)

We should maintain the invariant that a zero `ob_tid` implies the
refcount fields are merged.

* Move the assignment in `_Py_MergeZeroLocalRefcount` to immediately
  before the refcount merge.
* Update `_PyTrash_thread_destroy_chain` to set `ob_ref_shared` to
  `_Py_REF_MERGED` when setting `ob_tid` to zero.

Also check this invariant with assertions in the GC in debug builds.
That uncovered a bug when running out of memory during GC.
(cherry picked from commit d23be3947ced081914f4458c84f729c9c37f0219)

Co-authored-by: Sam Gross <colesbury@gmail.com>
15 months ago[3.13] gh-117657: Skip tests that fork with threads under TSan (GH-121599) (#121819)
Miss Islington (bot) [Mon, 15 Jul 2024 21:10:37 +0000 (23:10 +0200)] 
[3.13] gh-117657: Skip tests that fork with threads under TSan (GH-121599) (#121819)

This avoids messages like:

  ThreadSanitizer: starting new threads after multi-threaded fork is not
  supported. Dying (set die_after_fork=0 to override)
(cherry picked from commit 82a4dac9f6131954c32dac9d0277283fc5b499a9)

Co-authored-by: Sam Gross <colesbury@gmail.com>
15 months ago[3.13] gh-121546: Disable contextvar caching on free-threading build (GH-121740)...
Miss Islington (bot) [Mon, 15 Jul 2024 20:53:52 +0000 (22:53 +0200)] 
[3.13] gh-121546: Disable contextvar caching on free-threading build (GH-121740) (#121808)

gh-121546: Disable contextvar caching on free-threading build (GH-121740)
(cherry picked from commit e904300882055bed71cae59f8ca9161066659b7c)

Co-authored-by: Ken Jin <kenjin@python.org>
15 months ago[3.13] gh-121245: Refactor site.register_readline() (GH-121659) (GH-121816)
Miss Islington (bot) [Mon, 15 Jul 2024 20:49:18 +0000 (22:49 +0200)] 
[3.13] gh-121245: Refactor site.register_readline() (GH-121659) (GH-121816)

(cherry picked from commit 05d413764c8ae793b8321c21cb10094c934b8cb3)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
15 months ago[3.13] gh-121359: make clean environment (no PYTHON* vars) for test_pyrepl.TestMain...
Miss Islington (bot) [Mon, 15 Jul 2024 20:32:28 +0000 (22:32 +0200)] 
[3.13] gh-121359: make clean environment (no PYTHON* vars) for test_pyrepl.TestMain (GH-121672) (GH-121810)

(cherry picked from commit fd085a411ed2ccc9bde2338cf50068bc7f213ece)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
15 months ago[3.13] gh-76785: Expand How Interpreter Channels Handle Interpreter Finalization...
Miss Islington (bot) [Mon, 15 Jul 2024 20:15:47 +0000 (22:15 +0200)] 
[3.13] gh-76785: Expand How Interpreter Channels Handle Interpreter Finalization (gh-121811)

See 6b98b274b6 for an explanation of the problem and solution.  Here I've applied the solution to channels.

(cherry picked from commit 8b209fd4f8a9bf9603888bda2c44b5cfd4ebf47a, AKA gh-121805)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
15 months ago[3.13] gh-121657: Display correct error message for yield from outsid… (GH-121768)
Kirill Podoprigora [Mon, 15 Jul 2024 19:25:54 +0000 (22:25 +0300)] 
[3.13] gh-121657: Display correct error message for yield from outsid… (GH-121768)

(cherry picked from commit 178e44de8f023be7a5dc400044ab61983b191f24)

Co-authored-by: Gregor <36135323+gege-hoho@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
15 months ago[3.13] gh-76785: Expand How Interpreter Queues Handle Interpreter Finalization (gh...
Miss Islington (bot) [Mon, 15 Jul 2024 19:13:51 +0000 (21:13 +0200)] 
[3.13] gh-76785: Expand How Interpreter Queues Handle Interpreter Finalization (gh-121807)

Any cross-interpreter mechanism for passing objects between interpreters must be very careful to respect isolation, even when the object is effectively immutable (e.g. int, str).  Here this especially relates to when an interpreter sends one of its objects, and then is destroyed while the inter-interpreter machinery (e.g. queue) still holds a reference to the object.

When I added interpreters.Queue, I dealt with that case (using an atexit hook) by silently removing all items from the queue that were added by the finalizing interpreter.

Later, while working on concurrent.futures.InterpreterPoolExecutor (gh-116430), I noticed it was somewhat surprising when items were silently removed from the queue when the originating interpreter was destroyed.  (See my comment on that PR.)
 It took me a little while to realize what was going on.  I expect that users, which much less context than I have, would experience the same pain.

My approach, here, to improving the situation is to give users three options:

1. return a singleton (interpreters.queues.UNBOUND) from Queue.get() in place of each removed item
2. raise an exception (interpreters.queues.ItemInterpreterDestroyed) from Queue.get() in place of each removed item
3. existing behavior: silently remove each item (i.e. Queue.get() skips each one)

The default will now be (1), but users can still explicitly opt in any of them, including to the silent removal behavior.

The behavior for each item may be set with the corresponding Queue.put() call. and a queue-wide default may be set when the queue is created.  (This is the same as I did for "synconly".)

(cherry picked from commit 6b98b274b60a15b490d2ea85069638c037b2a9cd, AKA gh-116431)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
15 months ago[3.13] gh-118297: Make Sure All Pending Calls Run in _Py_FinishPendingCalls() (gh...
Miss Islington (bot) [Mon, 15 Jul 2024 19:09:40 +0000 (21:09 +0200)] 
[3.13] gh-118297: Make Sure All Pending Calls Run in _Py_FinishPendingCalls() (gh-121806)

(cherry picked from commit 985dd8e17b55ae35fc31546384fc9364f2f59f86, AKA gh-118298)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
15 months ago[3.13] gh-121746: Bind Alt+Enter to "accept" in the REPL (GH-121754) (GH-121803)
Miss Islington (bot) [Mon, 15 Jul 2024 18:14:50 +0000 (20:14 +0200)] 
[3.13] gh-121746: Bind Alt+Enter to "accept" in the REPL (GH-121754) (GH-121803)

(cherry picked from commit 6522f0e438a8c56a8f3cce2095b193ea6e3f5016)

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
15 months ago[3.13] gh-121621: Use PyMutex for writes to asyncio state (GH-121622) (#121774)
Sam Gross [Mon, 15 Jul 2024 05:14:35 +0000 (01:14 -0400)] 
[3.13] gh-121621: Use PyMutex for writes to asyncio state (GH-121622) (#121774)

(cherry picked from commit 5d6861ad06b524358f52603f242e7c0d57532a58)

Co-authored-by: Ken Jin <kenjin@python.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
15 months ago[3.13] gh-57141: Make shallow argument to filecmp.dircmp keyword-only (GH-121767...
Miss Islington (bot) [Sun, 14 Jul 2024 23:17:26 +0000 (01:17 +0200)] 
[3.13] gh-57141: Make shallow argument to filecmp.dircmp keyword-only (GH-121767) (#121777)

It is our general practice to make new optional parameters keyword-only,
even if the existing parameters are all positional-or-keyword. Passing
this parameter as positional would look confusing and could be error-prone
if additional parameters are added in the future.
(cherry picked from commit 50eec501fef46f0887df6f2f47d74f4defb35515)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
15 months ago[3.13] Generalize reusable Windows CI jobs (GH-121766) (#121775)
Miss Islington (bot) [Sun, 14 Jul 2024 21:46:37 +0000 (23:46 +0200)] 
[3.13] Generalize reusable Windows CI jobs (GH-121766) (#121775)

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk@sydorenko.org.ua>
15 months ago[3.13] gh-121731: Fix mimalloc compile error on GNU/Hurd (GH-121732) (#121773)
Miss Islington (bot) [Sun, 14 Jul 2024 17:14:30 +0000 (19:14 +0200)] 
[3.13] gh-121731: Fix mimalloc compile error on GNU/Hurd (GH-121732) (#121773)

(cherry picked from commit d005f2c1861dbf0ab3d9f80b54d05d0c0b522c3c)

Co-authored-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
15 months ago[3.13] gh-121660: Fix `ga_getitem` by explicitly checking for `NULL` result (GH-12166...
Miss Islington (bot) [Sun, 14 Jul 2024 11:48:33 +0000 (13:48 +0200)] 
[3.13] gh-121660: Fix `ga_getitem` by explicitly checking for `NULL` result (GH-121661) (#121761)

gh-121660: Fix `ga_getitem` by explicitly checking for `NULL` result (GH-121661)
(cherry picked from commit bb802db8cfa35a88582be32fae05fe1cf8f237b1)

Co-authored-by: sobolevn <mail@sobolevn.me>
15 months ago[3.13] Fix cache restoration for Hypothesis CI job (GH-121756) (#121759)
Miss Islington (bot) [Sun, 14 Jul 2024 11:47:07 +0000 (13:47 +0200)] 
[3.13] Fix cache restoration for Hypothesis CI job (GH-121756) (#121759)

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk@sydorenko.org.ua>
15 months ago[3.13] gh-121700 Emscripten trampolines not quite right since GH-106219 (GH-121701...
Miss Islington (bot) [Sun, 14 Jul 2024 10:37:00 +0000 (12:37 +0200)] 
[3.13] gh-121700 Emscripten trampolines not quite right since GH-106219 (GH-121701) (GH-121744)

(cherry picked from commit 3086b86cfda829e23a71569908edbfbcdc16327f)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
15 months ago[3.13] gh-121749: Fix discrepancy in docs for `PyModule_AddObjectRef` (GH-121750...
Miss Islington (bot) [Sun, 14 Jul 2024 10:31:46 +0000 (12:31 +0200)] 
[3.13] gh-121749: Fix discrepancy in docs for `PyModule_AddObjectRef` (GH-121750) (GH-121752)

(cherry picked from commit 26dfb2771236bfd96cdaa1081103f75141ecff47)

Co-authored-by: Dominic H <dom@dominic.sk>
15 months ago[3.13] gh-120012: clarify the behaviour of `multiprocessing.Queue.empty` on closed...
Miss Islington (bot) [Sun, 14 Jul 2024 10:24:58 +0000 (12:24 +0200)] 
[3.13] gh-120012: clarify the behaviour of `multiprocessing.Queue.empty` on closed queues. (GH-120102) (#120469)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
15 months ago[3.13] gh-121698 Emscripten: Use updated WebAssembly type reflection proposal (GH...
Miss Islington (bot) [Sun, 14 Jul 2024 10:01:03 +0000 (12:01 +0200)] 
[3.13] gh-121698 Emscripten: Use updated WebAssembly type reflection proposal (GH-121699) (GH-121745)

(cherry picked from commit cae15267166e217822e3c58ac22b7817162f323a)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
15 months ago[3.13] gh-64308: Remove TestProgram from the unittest docs (GH-121675) (GH-121742)
Miss Islington (bot) [Sun, 14 Jul 2024 09:41:08 +0000 (11:41 +0200)] 
[3.13] gh-64308: Remove TestProgram from the unittest docs (GH-121675) (GH-121742)

(cherry picked from commit f6f4022a357f70f1c40945403065e81b6c2e4854)

Co-authored-by: Jan Musílek <jan.musilek@nic.cz>
15 months ago[3.13] gh-121609: Fix pasting of characters containing unicode character joiner ...
Miss Islington (bot) [Sun, 14 Jul 2024 09:02:46 +0000 (11:02 +0200)] 
[3.13] gh-121609: Fix pasting of characters containing unicode character joiner (GH-121667) (#121733)

Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
15 months ago[3.13] gh-121708: Improve test coverage for `unittest.util` (GH-121713) (GH-121738)
Miss Islington (bot) [Sun, 14 Jul 2024 08:32:41 +0000 (10:32 +0200)] 
[3.13] gh-121708: Improve test coverage for `unittest.util` (GH-121713) (GH-121738)

(cherry picked from commit 901ea411bf51f59f2a4b0b4fec6f60d29c76ca05)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
16 months ago[3.13] gh-120642: Move _PyCode_CODE() to the internal C API (GH-121644) (#121729)
Miss Islington (bot) [Sat, 13 Jul 2024 21:31:30 +0000 (23:31 +0200)] 
[3.13] gh-120642: Move _PyCode_CODE() to the internal C API (GH-121644) (#121729)

gh-120642: Move _PyCode_CODE() to the internal C API (GH-121644)

Move _PyCode_CODE() and _PyCode_NBYTES() macros to the internal C API
since they use _Py_CODEUNIT which is only part of the internal C API.
(cherry picked from commit a2bec77d25b11f50362a7117223f6d1d5029a909)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-73159 Added clarifications in multiprocessing docs on that objects are...
Miss Islington (bot) [Sat, 13 Jul 2024 20:26:15 +0000 (22:26 +0200)] 
[3.13] gh-73159 Added clarifications in multiprocessing docs on that objects are pickled. (GH-121686) (#121727)

gh-73159 Added clarifications in multiprocessing docs on that objects are pickled. (GH-121686)

Added explicit comments about that objects are pickled when transmitted via multiprocessing queues and pipes.
(cherry picked from commit b5805892d55e769335c11a994b586355720263ba)

Co-authored-by: Ulrik Södergren <ulrik@digitalfotografen.se>
16 months ago[3.13] gh-121652: Handle `allocate_weakref` returning NULL (GH-121653) (#121721)
Miss Islington (bot) [Sat, 13 Jul 2024 16:31:50 +0000 (18:31 +0200)] 
[3.13] gh-121652: Handle `allocate_weakref` returning NULL (GH-121653) (#121721)

The `allocate_weakref` may return NULL when out of memory. We need to
handle that case and propagate the error.
(cherry picked from commit a640a605a8a1a3f73b98f948d0c2a7d42134f692)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-121711: Set `-m asyncio` return_code to 1 for ENOTTY (GH-121714) (GH-121718)
Miss Islington (bot) [Sat, 13 Jul 2024 16:24:52 +0000 (18:24 +0200)] 
[3.13] gh-121711: Set `-m asyncio` return_code to 1 for ENOTTY (GH-121714) (GH-121718)

Set return_code to 1 for ENOTTY
(cherry picked from commit a1834742936a3a2164c25c14ecf4ae6a95288ca3)

Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com>
16 months ago[3.13] gh-121605: Increase timeout in test_pyrepl.run_repl (GH-121606) (#121702)
Miss Islington (bot) [Sat, 13 Jul 2024 16:07:12 +0000 (18:07 +0200)] 
[3.13] gh-121605: Increase timeout in test_pyrepl.run_repl (GH-121606) (#121702)

We also need to close the `slave_fd` earlier so that reading from
`master_fd` won't block forever when the subprocess finishes.
(cherry picked from commit abc3aeebdbae560476f2f8c0312e9a4bf0dbfd33)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-120452: improve documentation about private name mangling (GH-120451) ...
Miss Islington (bot) [Sat, 13 Jul 2024 15:21:30 +0000 (17:21 +0200)] 
[3.13] gh-120452: improve documentation about private name mangling (GH-120451) (#121715)

gh-120452: improve documentation about private name mangling (GH-120451)
(cherry picked from commit f4d6e45c1e7161878b36ef9e876ca3e44b80a97d)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
16 months ago[3.13] gh-120823: Fix doc for ftplib.FTP.retrbinary() (GH-121697) (GH-121707)
Miss Islington (bot) [Sat, 13 Jul 2024 14:45:32 +0000 (16:45 +0200)] 
[3.13] gh-120823: Fix doc for ftplib.FTP.retrbinary() (GH-121697) (GH-121707)

(cherry picked from commit 422855ad21f09b82c0bfa891dfb8fb48182c6d2b)

Co-authored-by: Mirela Andreea GRIGORAS <magrigoras@bitdefender.com>
16 months ago[3.13] gh-121497: Make Pyrepl respect correctly the history with input hook set ...
Miss Islington (bot) [Sat, 13 Jul 2024 14:28:49 +0000 (16:28 +0200)] 
[3.13] gh-121497: Make Pyrepl respect correctly the history with input hook set (GH-121498) (#121703)

gh-121497: Make Pyrepl respect correctly the history with input hook set (GH-121498)
(cherry picked from commit 4e36dd7d87eb0f1bd1ecd53e368c16a5f75967a0)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
16 months ago[3.13] gh-121499: Fix multi-line history rendering in the REPL (GH-121531) (#121679)
Miss Islington (bot) [Sat, 13 Jul 2024 13:56:56 +0000 (15:56 +0200)] 
[3.13] gh-121499: Fix multi-line history rendering in the REPL (GH-121531) (#121679)

gh-121499: Fix multi-line history rendering in the REPL (GH-121531)
(cherry picked from commit 4b9e10d0ea352592049c1f2a00318d7274143fa4)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
16 months ago[3.13] gh-121671: Increase test coverage of `ast.get_docstring` (GH-121674) (GH-121691)
Miss Islington (bot) [Sat, 13 Jul 2024 13:30:40 +0000 (15:30 +0200)] 
[3.13] gh-121671: Increase test coverage of `ast.get_docstring` (GH-121674) (GH-121691)

(cherry picked from commit 0a26aa5007cb32610366c31fbac846b5fe2f4f90)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
16 months ago[3.13] gh-96765: Update ConfigParser.read() docs with multi-file read example (GH...
Miss Islington (bot) [Sat, 13 Jul 2024 13:07:40 +0000 (15:07 +0200)] 
[3.13] gh-96765: Update ConfigParser.read() docs with multi-file read example (GH-121664) (GH-121687)

(cherry picked from commit fc2178117538c161471711073887f34bcd464cc1)

Co-authored-by: Timon Viola <44016238+timonviola@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
16 months ago[3.13] NEWS: Fix Sphinx warnings and increase threshold for new news nits (GH-121482...
Hugo van Kemenade [Sat, 13 Jul 2024 12:55:43 +0000 (14:55 +0200)] 
[3.13] NEWS: Fix Sphinx warnings and increase threshold for new news nits (GH-121482) (#121513)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
16 months ago[3.13] gh-120198: Stop the world when setting __class__ on free-threaded build (...
Ken Jin [Fri, 12 Jul 2024 11:35:53 +0000 (19:35 +0800)] 
[3.13] gh-120198: Stop the world when setting __class__ on free-threaded build (#121591)

(cherry-picked from commit 3bfc9c8)

16 months ago[3.13] Update retroactive comments from GH-117741 (segfault in `FutureIter_dealloc...
Miss Islington (bot) [Fri, 12 Jul 2024 09:00:09 +0000 (11:00 +0200)] 
[3.13] Update retroactive comments from GH-117741 (segfault in `FutureIter_dealloc`) (GH-121638) (GH-121642)

Update retroactive comments from GH-117741 (segfault in `FutureIter_dealloc`) (GH-121638)

Address comments
(cherry picked from commit 65fededf9cc1780d5edbef8a6e0a7cf9bc15aea6)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
16 months ago[3.13] gh-121103: Put free-threaded libraries in `lib/python3.14t` (GH-121293) (...
Miss Islington (bot) [Thu, 11 Jul 2024 21:00:28 +0000 (23:00 +0200)] 
[3.13] gh-121103: Put free-threaded libraries in `lib/python3.14t` (GH-121293) (#121631)

On POSIX systems, excluding macOS framework installs, the lib directory
for the free-threaded build now includes a "t" suffix to avoid conflicts
with a co-located default build installation.
(cherry picked from commit e8c91d90ba8fab410a27fad4f709cc73f6ffcbf4)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-117482: Fix Builtin Types Slot Wrappers (gh-121630)
Miss Islington (bot) [Thu, 11 Jul 2024 20:47:38 +0000 (22:47 +0200)] 
[3.13] gh-117482: Fix Builtin Types Slot Wrappers (gh-121630)

When builtin static types are initialized for a subinterpreter, various "tp" slots have already been inherited (for the main interpreter).  This was interfering with the logic in add_operators() (in Objects/typeobject.c), causing a wrapper to get created when it shouldn't.  This change fixes that by preserving the original data from the static type struct and checking that.

(cherry picked from commit 5250a031332eb9499d5fc190d7287642e5a144b9, AKA gh-121602)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
16 months ago[3.13] gh-121332: Make AST node constructor check _attributes instead of hardcoding...
Jelle Zijlstra [Thu, 11 Jul 2024 15:51:32 +0000 (08:51 -0700)] 
[3.13] gh-121332: Make AST node constructor check _attributes instead of hardcoding attributes (GH-121334) (#121625)

(cherry picked from commit 58e8cf2bb61f82df9eabd1209fe5e3d146e4c8cd)

16 months ago[3.13] gh-121592: Make select.poll() and related objects thread-safe (GH-121594)...
Miss Islington (bot) [Thu, 11 Jul 2024 14:44:54 +0000 (16:44 +0200)] 
[3.13] gh-121592: Make select.poll() and related objects thread-safe (GH-121594) (#121623)

This makes select.poll() and kqueue() objects thread-safe in the
free-threaded build. Note that calling close() concurrently with other
functions is still not thread-safe due to races on file descriptors
(gh-121544).
(cherry picked from commit 44937d11a6a045a624918db78aa36e715ffabcd4)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-121615: Improve `module.rst` C-API docs with better error descriptions...
Miss Islington (bot) [Thu, 11 Jul 2024 09:15:18 +0000 (11:15 +0200)] 
[3.13] gh-121615: Improve `module.rst` C-API docs with better error descriptions (GH-121616) (#121618)

gh-121615: Improve `module.rst` C-API docs with better error descriptions (GH-121616)
(cherry picked from commit e6264b44dc7221c713b14dfa0f5929b33d362829)

Co-authored-by: sobolevn <mail@sobolevn.me>
16 months ago[3.13] gh-117398: Use the correct module loader for iOS in datetime CAPI test (GH...
neonene [Wed, 10 Jul 2024 22:48:53 +0000 (07:48 +0900)] 
[3.13] gh-117398: Use the correct module loader for iOS in datetime CAPI test (GH-120477) (#121561)

Use the correct binary module loader for iOS.

16 months ago[3.13] gh-121596: Fix Sharing Interpreter Channels (gh-121600)
Miss Islington (bot) [Wed, 10 Jul 2024 21:54:47 +0000 (23:54 +0200)] 
[3.13] gh-121596: Fix Sharing Interpreter Channels (gh-121600)

This fixes a mistake in gh-113012 and adds a test that verifies the fix.

(cherry picked from commit 35a67e36aa7cb0fc915771327f58bb0c70213867, AKA gh-121597)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
16 months ago[3.13] gh-117657: Remove TSAN suppressions for _abc.c (GH-121508) (#121598)
Miss Islington (bot) [Wed, 10 Jul 2024 21:34:14 +0000 (23:34 +0200)] 
[3.13] gh-117657: Remove TSAN suppressions for _abc.c (GH-121508) (#121598)

The functions look thread-safe and I haven't seen any warnings issued
when running the tests locally.
(cherry picked from commit 7641743d48b276de88a709ad40d715b6c5d7a2ea)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-117657: Fix TSan race in _PyDict_CheckConsistency (GH-121551) (#121590)
Miss Islington (bot) [Wed, 10 Jul 2024 18:28:44 +0000 (20:28 +0200)] 
[3.13] gh-117657: Fix TSan race in _PyDict_CheckConsistency (GH-121551) (#121590)

The only remaining race in dictobject.c was in _PyDict_CheckConsistency
when the dictionary has shared keys.
(cherry picked from commit 3ec719fabf936ea7a012a76445b860759155de86)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-121460: Skip freeing unallocated arenas (gh-121589)
Miss Islington (bot) [Wed, 10 Jul 2024 17:05:11 +0000 (19:05 +0200)] 
[3.13] gh-121460: Skip freeing unallocated arenas (gh-121589)

`munmap(NULL)` is not noop, like `free(NULL)` is.

Fixes an observed testsuite hang on 32-bit ARM systems.

(cherry picked from commit a802277914405786f6425f2776605c44bd407fc0, AKA gh-121491)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
16 months ago[3.13] gh-107851: Fix spurious failures in fcntl eintr tests (GH-121556) (#121585)
Miss Islington (bot) [Wed, 10 Jul 2024 15:02:26 +0000 (17:02 +0200)] 
[3.13] gh-107851: Fix spurious failures in fcntl eintr tests (GH-121556) (#121585)

On heavily loaded machines, the subprocess may finish its sleep before
the parent process manages to synchronize with it via a failed lock.

This leads to errors like:

  Exception: failed to sync child in 300.3 sec

Use pipes instead to mutually synchronize between parent and child.
(cherry picked from commit af9f6de6ea930b607f948f2c91a87fe4ca9d64db)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-89364: Export PySignal_SetWakeupFd() function (GH-121537) (#121582)
Miss Islington (bot) [Wed, 10 Jul 2024 14:14:09 +0000 (16:14 +0200)] 
[3.13] gh-89364: Export PySignal_SetWakeupFd() function (GH-121537) (#121582)

gh-89364: Export PySignal_SetWakeupFd() function (GH-121537)

Export the PySignal_SetWakeupFd() function. Previously, the function
was documented but it couldn't be used in 3rd party code.
(cherry picked from commit ca0fb3423c13822d909d75eb616ecf1965e619ae)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-121567: Improve `slice` C-API docs by mentioning exceptions (GH-121568...
Miss Islington (bot) [Wed, 10 Jul 2024 11:13:40 +0000 (13:13 +0200)] 
[3.13] gh-121567: Improve `slice` C-API docs by mentioning exceptions (GH-121568) (#121578)

gh-121567: Improve `slice` C-API docs by mentioning exceptions (GH-121568)
(cherry picked from commit 84a5597b08b7d53aced2fbd0048271ce762807a8)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
16 months ago[3.13] gh-121571: Do not use `EnvironmentError` in tests, use `OSError` instead ...
Miss Islington (bot) [Wed, 10 Jul 2024 10:38:48 +0000 (12:38 +0200)] 
[3.13] gh-121571: Do not use `EnvironmentError` in tests, use `OSError` instead (GH-121572) (#121574)

gh-121571: Do not use `EnvironmentError` in tests, use `OSError` instead (GH-121572)
(cherry picked from commit e2822360da30853f092d8a50ad83e52f6ea2ced9)

Co-authored-by: sobolevn <mail@sobolevn.me>
16 months ago[3.13] Improve zipimport tests (GH-121535) (GH-121570)
Serhiy Storchaka [Wed, 10 Jul 2024 10:11:39 +0000 (13:11 +0300)] 
[3.13] Improve zipimport tests (GH-121535) (GH-121570)

(cherry picked from commit 22a0bdbf9a63f92f45106c7dc4377e45e0278e60)

16 months ago[3.13] GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to...
Miss Islington (bot) [Wed, 10 Jul 2024 08:12:54 +0000 (10:12 +0200)] 
[3.13] GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428) (gh-121565)

GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428)
(cherry picked from commit 9585a1a2a251aaa15baf6579e13dd3be0cb05f1f)

Co-authored-by: satori1995 <132636720+satori1995@users.noreply.github.com>
16 months ago[3.13] GH-121521: Detect when wasmtime is not installed in `Tools/wasm/wasi.py` ...
Miss Islington (bot) [Tue, 9 Jul 2024 22:31:39 +0000 (00:31 +0200)] 
[3.13] GH-121521: Detect when wasmtime is not installed in `Tools/wasm/wasi.py` (GH-121522) (GH-121558)

GH-121521: Detect when wasmtime is not installed in `Tools/wasm/wasi.py` (GH-121522)
(cherry picked from commit f62161837e68c1c77961435f1b954412dd5c2b65)

Co-authored-by: Brett Cannon <brett@python.org>
16 months ago[3.13] GH-120372: Switch to wasmtime 22 (GH-121523) (GH-121557)
Miss Islington (bot) [Tue, 9 Jul 2024 22:27:29 +0000 (00:27 +0200)] 
[3.13] GH-120372: Switch to wasmtime 22 (GH-121523) (GH-121557)

GH-120372: Switch to wasmtime 22 (GH-121523)

Along the way, make the cache key in GitHub Actions for `config.cache` be more robust in the face of potential env var changes from `Tools/wasm/wasi.py`.
(cherry picked from commit 80209468144fbd1af5cd31f152a6631627a9acab)

Co-authored-by: Brett Cannon <brett@python.org>
16 months ago[3.13] gh-117657: Skip test when running under TSan (GH-121549) (GH-121553)
Miss Islington (bot) [Tue, 9 Jul 2024 21:37:30 +0000 (23:37 +0200)] 
[3.13] gh-117657: Skip test when running under TSan (GH-121549) (GH-121553)

gh-117657: Skip test when running under TSan (GH-121549)

The ProcessPoolForkserver combined with resource_tracker starts a thread
after forking, which is not supported by TSan.

Also skip test_multiprocessing_fork for the same reason
(cherry picked from commit 04397434aad9b31328785e17ac7b3a2d5097269b)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-112075: Fix dict thread safety issues (GH-119288) (#121545)
Miss Islington (bot) [Tue, 9 Jul 2024 18:13:23 +0000 (20:13 +0200)] 
[3.13] gh-112075: Fix dict thread safety issues (GH-119288) (#121545)

(cherry picked from commit f0ed1863bd7a0b9d021fb59e156663a7ec553f0e)

Co-authored-by: Germán Méndez Bravo <kronuz@fb.com>
16 months ago[3.13] gh-117657: Fix TSAN races in setobject.c (GH-121511) (#121541)
Miss Islington (bot) [Tue, 9 Jul 2024 16:36:36 +0000 (18:36 +0200)] 
[3.13] gh-117657: Fix TSAN races in setobject.c (GH-121511) (#121541)

The `used` field must be written using atomic stores because `set_len`
and iterators may access the field concurrently without holding the
per-object lock.
(cherry picked from commit 9c08f40a613d9aee78de4ce4ec3e125d1496d148)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions (GH-121534...
Miss Islington (bot) [Tue, 9 Jul 2024 16:06:46 +0000 (18:06 +0200)] 
[3.13] gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions (GH-121534) (#121539)

gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions (GH-121534)
(cherry picked from commit 649d5b6d7b04607dd17810ac73e8f16720c6dc78)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] Docs: fix typo and duplicate word in configure.rst (GH-121410) (#121532)
Miss Islington (bot) [Tue, 9 Jul 2024 12:40:59 +0000 (14:40 +0200)] 
[3.13] Docs: fix typo and duplicate word in configure.rst (GH-121410) (#121532)

(cherry picked from commit 9ba2a4638d7b620c939face7642b2f53a9fadc4b)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
16 months ago[3.13] gh-121333: Clarify what is the default executor for asyncio.run_in_executor...
Miss Islington (bot) [Tue, 9 Jul 2024 09:42:45 +0000 (11:42 +0200)] 
[3.13] gh-121333: Clarify what is the default executor for asyncio.run_in_executor (GH-121335) (#121526)

gh-121333: Clarify what is the default executor for asyncio.run_in_executor (GH-121335)
(cherry picked from commit facf9862da0cf9331550747197800d682cd371fb)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
16 months ago[3.13] gh-121110: Fix Extension Module Tests Under Py_TRACE_REFS Builds (gh-121517)
Miss Islington (bot) [Mon, 8 Jul 2024 21:34:58 +0000 (23:34 +0200)] 
[3.13] gh-121110: Fix Extension Module Tests Under Py_TRACE_REFS Builds (gh-121517)

The change in gh-118157 (b2cd54a) should have also updated clear_singlephase_extension() but didn't.  We fix that here.  Note that clear_singlephase_extension() (AKA _PyImport_ClearExtension()) is only used in tests.

(cherry picked from commit 15d48aea02099ffc5bdc5511cc53ced460cb31b9, AKA gh-121503)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
16 months ago[3.13] gh-121368: Fix seq lock memory ordering in _PyType_Lookup (GH-121388) (#121505)
Miss Islington (bot) [Mon, 8 Jul 2024 19:15:58 +0000 (21:15 +0200)] 
[3.13] gh-121368: Fix seq lock memory ordering in _PyType_Lookup (GH-121388) (#121505)

The `_PySeqLock_EndRead` function needs an acquire fence to ensure that
the load of the sequence happens after any loads within the read side
critical section. The missing fence can trigger bugs on macOS arm64.

Additionally, we need a release fence in `_PySeqLock_LockWrite` to
ensure that the sequence update is visible before any modifications to
the cache entry.
(cherry picked from commit 1d3cf79a501a93a7a488fc75d4db3060c5ee7d1a)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-121487: Fix deprecation warning for ATOMIC_VAR_INIT in mimalloc (gh-121488...
Miss Islington (bot) [Mon, 8 Jul 2024 18:59:25 +0000 (20:59 +0200)] 
[3.13] gh-121487: Fix deprecation warning for ATOMIC_VAR_INIT in mimalloc (gh-121488) (#121504)

(cherry picked from commit 31873bea471020ca5deaf735d9acb0f1abeb1d3c)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
16 months ago[3.13] GH-121012: Set index to -1 when list iterators become exhausted in tier 2...
Miss Islington (bot) [Mon, 8 Jul 2024 17:09:54 +0000 (19:09 +0200)] 
[3.13] GH-121012: Set index to -1 when list iterators become exhausted in tier 2 (GH-121483) (GH-121494)

16 months ago[3.13] gh-121374: Correct docstrings in `_interpchannels` (gh-121501)
Miss Islington (bot) [Mon, 8 Jul 2024 16:57:10 +0000 (18:57 +0200)] 
[3.13] gh-121374: Correct docstrings in `_interpchannels` (gh-121501)

(cherry picked from commit 5289550b33de3d56f89a5d44a665283f7c8483a7, AKA gh-121418)

Co-authored-by: Max Muoto <maxmuoto@gmail.com>
16 months ago[3.13] gh-121338: Remove GH-pragma optimize (GH-121340) (#121492)
Miss Islington (bot) [Mon, 8 Jul 2024 13:22:44 +0000 (15:22 +0200)] 
[3.13] gh-121338: Remove GH-pragma optimize (GH-121340) (#121492)

gh-121338: Remove GH-pragma optimize (GH-121340)
(cherry picked from commit d69529d31ccd1510843cfac1ab53bb8cb027541f)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
16 months agoFixed regenerating files in a checkout path with spaces (GH-121384)
Miss Islington (bot) [Mon, 8 Jul 2024 12:18:02 +0000 (14:18 +0200)] 
Fixed regenerating files in a checkout path with spaces (GH-121384)

(cherry picked from commit 0e77540d86833f0a0ef964ab51f35be9bfb533f9)

Co-authored-by: AraHaan <seandhunt_7@yahoo.com>
16 months ago[3.13] gh-108297: Update crashers README for test_crashers removal (#121476)
Miss Islington (bot) [Mon, 8 Jul 2024 06:54:51 +0000 (08:54 +0200)] 
[3.13] gh-108297: Update crashers README for test_crashers removal (#121476)

Update Lib/test/crashers/README for test_crashers removal
(cherry picked from commit 59be79ae60073f7b6bdf6ce921560c279937e4ab)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
16 months ago[3.13] gh-121461: Fix os.path.normpath documentation indentation (GH-121466) (#121472)
Miss Islington (bot) [Mon, 8 Jul 2024 04:08:13 +0000 (06:08 +0200)] 
[3.13] gh-121461: Fix os.path.normpath documentation indentation (GH-121466) (#121472)

gh-121461: Fix os.path.normpath documentation indentation (GH-121466)
(cherry picked from commit bf74db731bf108e880348f2925160af61570dbf4)

Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
16 months ago[3.13] gh-121467: Fix makefile to include mimalloc headers (GH-121469) (#121471)
Miss Islington (bot) [Mon, 8 Jul 2024 01:10:17 +0000 (03:10 +0200)] 
[3.13] gh-121467: Fix makefile to include mimalloc headers (GH-121469) (#121471)

gh-121467: Fix makefile to include mimalloc headers (GH-121469)
(cherry picked from commit 5aa1e60e0cc9c48abdd8d2c03fcc71927cf95204)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
16 months ago[3.13] gh-121351: Skip test_not_wiping_history_file() if no readline (GH-121422)...
Miss Islington (bot) [Sat, 6 Jul 2024 23:18:20 +0000 (01:18 +0200)] 
[3.13] gh-121351: Skip test_not_wiping_history_file() if no readline (GH-121422) (#121449)

gh-121351: Skip test_not_wiping_history_file() if no readline (GH-121422)
(cherry picked from commit 68e279b37aae3019979a05ca55f462b11aac14be)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
16 months ago[3.13] gh-119909: Fix ``NameError`` in ``asyncio`` REPL (GH-121341) (#121447)
Miss Islington (bot) [Sat, 6 Jul 2024 23:02:33 +0000 (01:02 +0200)] 
[3.13] gh-119909: Fix ``NameError`` in ``asyncio`` REPL (GH-121341) (#121447)

gh-119909: Fix ``NameError`` in ``asyncio`` REPL (GH-121341)
(cherry picked from commit 114389470ec3db457c589b3991b695258d23ce5a)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
16 months ago[3.13] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-121437) (#121441)
Miss Islington (bot) [Sat, 6 Jul 2024 18:23:31 +0000 (20:23 +0200)] 
[3.13] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-121437) (#121441)

Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-121437)

regen dependencies
(cherry picked from commit 53e12025cd7d7ee46ce10cc8f1b722c55716b892)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
16 months ago[3.13] [docs] fix a Sphinx directive in `c-api/object.rst` (GH-121430) (#121440)
Miss Islington (bot) [Sat, 6 Jul 2024 18:13:57 +0000 (20:13 +0200)] 
[3.13] [docs] fix a Sphinx directive in `c-api/object.rst` (GH-121430) (#121440)

[docs] fix a Sphinx directive in `c-api/object.rst` (GH-121430)
(cherry picked from commit ada964fba06c0d142b8746d140817ea151314d33)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
16 months ago[3.13] gh-121359: Run test_pyrepl in isolated mode (GH-121414) (#121417)
Miss Islington (bot) [Fri, 5 Jul 2024 20:55:14 +0000 (22:55 +0200)] 
[3.13] gh-121359: Run test_pyrepl in isolated mode (GH-121414) (#121417)

gh-121359: Run test_pyrepl in isolated mode (GH-121414)

run_repl() now pass the -I option (isolated mode) to Python if the
'env' parameter is not set.
(cherry picked from commit 6239d41527d5977aa5d44e4b894d719bc045860e)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] Update example of str.split, bytes.split (GH-121287) (#121415)
Miss Islington (bot) [Fri, 5 Jul 2024 20:25:35 +0000 (22:25 +0200)] 
[3.13] Update example of str.split, bytes.split (GH-121287) (#121415)

Update example of str.split, bytes.split (GH-121287)

In `{str,bytes}.strip(chars)`, multiple characters are not treated as a
prefix/suffix, but as individual characters. This may make users confuse
whether `split` has similar behavior.
Users may incorrectly expect that
`'Good morning, John.'.split(', .') == ['Good', 'morning', 'John']`

Adding a bit of clarification in the doc.

(cherry picked from commit 892e3a1b708391cb43517a141f9b9712e047b8a4)

Co-authored-by: Yuxin Wu <ppwwyyxxc@gmail.com>
Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
16 months ago[3.13] gh-90437: Fix __main__.py documentation wording (GH-116309) (#121385)
Miss Islington (bot) [Thu, 4 Jul 2024 23:05:02 +0000 (01:05 +0200)] 
[3.13] gh-90437: Fix __main__.py documentation wording (GH-116309) (#121385)

gh-90437: Fix __main__.py documentation wording (GH-116309)
(cherry picked from commit cb688bab08559079d0ee9ffd841dd6eb11116181)

Co-authored-by: Ali Tavallaie <tavallaie@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
16 months ago[3.13] gh-121084: Fix test_typing random leaks (GH-121360) (#121373)
Miss Islington (bot) [Thu, 4 Jul 2024 18:07:07 +0000 (20:07 +0200)] 
[3.13] gh-121084: Fix test_typing random leaks (GH-121360) (#121373)

gh-121084: Fix test_typing random leaks (GH-121360)

Clear typing ABC caches when running tests for refleaks (-R option):
call _abc_caches_clear() on typing abstract classes and their
subclasses.
(cherry picked from commit 5f660e8e2ca3acfb89ccbdd990f072149b6baa6a)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-106597: Remove unnecessary CFrame offsets (GH-121369) (#121370)
Miss Islington (bot) [Thu, 4 Jul 2024 17:52:03 +0000 (19:52 +0200)] 
[3.13] gh-106597: Remove unnecessary CFrame offsets (GH-121369) (#121370)

gh-106597: Remove unnecessary CFrame offsets (GH-121369)
(cherry picked from commit f5c8d67de6c68bea2860d5d96af747c5e95dbf22)

Co-authored-by: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
16 months agogh-118507: Amend news entry to mention ntpath.isfile bugfix (GH-120817)
Steve Dower [Thu, 4 Jul 2024 15:15:22 +0000 (16:15 +0100)] 
gh-118507: Amend news entry to mention ntpath.isfile bugfix (GH-120817)

16 months ago[3.13] gh-121355: Fix incorrect word in simple_stmts.rst (GH-121356) (#121362)
Miss Islington (bot) [Thu, 4 Jul 2024 13:53:41 +0000 (15:53 +0200)] 
[3.13] gh-121355: Fix incorrect word in simple_stmts.rst (GH-121356) (#121362)

(cherry picked from commit 715ec630dd78819ed79cad5ac28617daefe1e745)

Co-authored-by: Jongbum Won <71166964+Wondaeng@users.noreply.github.com>
16 months ago[3.13] gh-121201: Disable perf_trampoline on riscv64 for now (GH-121328) (#121336)
Miss Islington (bot) [Thu, 4 Jul 2024 08:57:52 +0000 (10:57 +0200)] 
[3.13] gh-121201: Disable perf_trampoline on riscv64 for now (GH-121328) (#121336)

gh-121201: Disable perf_trampoline on riscv64 for now (GH-121328)

Disable perf_trampoline on riscv64 for now

Until support is added in perf_jit_trampoline.c

gh-120089 was incomplete.
(cherry picked from commit ca2e8765009d0d3eb9fe6c75465825c50808f4dd)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
16 months ago[3.13] gh-117983: Defer import of threading for lazy module loading (GH-120233) ...
Miss Islington (bot) [Wed, 3 Jul 2024 21:14:42 +0000 (23:14 +0200)] 
[3.13] gh-117983: Defer import of threading for lazy module loading (GH-120233) (GH-121349)

gh-117983: Defer import of threading for lazy module loading (GH-120233)

As noted in gh-117983, the import importlib.util can be triggered at
interpreter startup under some circumstances, so adding threading makes
it a potentially obligatory load.
Lazy loading is not used in the stdlib, so this removes an unnecessary
load for the majority of users and slightly increases the cost of the
first lazily loaded module.

An obligatory threading load breaks gevent, which monkeypatches the
stdlib. Although unsupported, there doesn't seem to be an offsetting
benefit to breaking their use case.

For reference, here are benchmarks for the current main branch:

```
❯ hyperfine -w 8 './python -c "import importlib.util"'
Benchmark 1: ./python -c "import importlib.util"
  Time (mean ± σ):       9.7 ms ±   0.7 ms    [User: 7.7 ms, System: 1.8 ms]
  Range (min … max):     8.4 ms …  13.1 ms    313 runs
```

And with this patch:

```
❯ hyperfine -w 8 './python -c "import importlib.util"'
Benchmark 1: ./python -c "import importlib.util"
  Time (mean ± σ):       8.4 ms ±   0.7 ms    [User: 6.8 ms, System: 1.4 ms]
  Range (min … max):     7.2 ms …  11.7 ms    352 runs
```

Compare to:

```
❯ hyperfine -w 8 './python -c pass'
Benchmark 1: ./python -c pass
  Time (mean ± σ):       7.6 ms ±   0.6 ms    [User: 5.9 ms, System: 1.6 ms]
  Range (min … max):     6.7 ms …  11.3 ms    390 runs
```

This roughly halves the import time of importlib.util.
(cherry picked from commit 94f50f8ee6872007d46c385f7af253497273255a)

Co-authored-by: Chris Markiewicz <effigies@gmail.com>
16 months ago[3.13] gh-118714: Make the pdb post-mortem restart/quit behavior more reasonable...
Miss Islington (bot) [Wed, 3 Jul 2024 19:15:53 +0000 (21:15 +0200)] 
[3.13] gh-118714: Make the pdb post-mortem restart/quit behavior more reasonable (GH-118725) (#121346)

gh-118714: Make the pdb post-mortem restart/quit behavior more reasonable (GH-118725)
(cherry picked from commit e245ed7d1e23b5c8bc0d568bd1a2f06ae92d631a)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
16 months ago[3.13] gh-112136: Restore removed _PyArg_Parser (GH-121262) (#121344)
Miss Islington (bot) [Wed, 3 Jul 2024 18:29:00 +0000 (20:29 +0200)] 
[3.13] gh-112136: Restore removed _PyArg_Parser (GH-121262) (#121344)

gh-112136: Restore removed _PyArg_Parser (GH-121262)

Restore the private _PyArg_Parser structure and the private
_PyArg_ParseTupleAndKeywordsFast() function, previously removed
in Python 3.13 alpha 1.

Recreate Include/cpython/modsupport.h header file.
(cherry picked from commit f8373db153920b890c2e2dd8def249e8df63bcc6)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-121300: Add `replace` to `copy.__all__` (GH-121302) (#121337)
Miss Islington (bot) [Wed, 3 Jul 2024 15:28:57 +0000 (17:28 +0200)] 
[3.13] gh-121300: Add `replace` to `copy.__all__` (GH-121302) (#121337)

(cherry picked from commit 7c66906802cd8534b05264bd47acf9eb9db6d09e)

Co-authored-by: Max Muoto <maxmuoto@gmail.com>
16 months ago[3.13] gh-121035: Update PNG image for logging flow diagram. (GH-121323) (GH-121324)
Vinay Sajip [Wed, 3 Jul 2024 12:01:34 +0000 (13:01 +0100)] 
[3.13] gh-121035: Update PNG image for logging flow diagram. (GH-121323) (GH-121324)

(cherry picked from commit 26d24eeb90d781e381b97d64b4dcb1ee4dd891fe)

16 months ago[3.13] gh-121279: Fix importlib DeprecatedAttrsTests (#121319)
Victor Stinner [Wed, 3 Jul 2024 11:57:05 +0000 (13:57 +0200)] 
[3.13] gh-121279: Fix importlib DeprecatedAttrsTests (#121319)

Delete attributes after getting them, so the warning is emitted again
when the test is run multiple times (ex: when checking for reference
leaks).

16 months ago[3.13] gh-121245: a regression test for site.register_readline() (GH-121259) (#121322)
Miss Islington (bot) [Wed, 3 Jul 2024 11:11:41 +0000 (13:11 +0200)] 
[3.13] gh-121245: a regression test for site.register_readline() (GH-121259) (#121322)

16 months ago[3.13] gh-121035: Further improve logging flow diagram with respect to dark/light...
Vinay Sajip [Wed, 3 Jul 2024 10:41:18 +0000 (11:41 +0100)] 
[3.13] gh-121035: Further improve logging flow diagram with respect to dark/light modes. (GH-121265) (GH-121320)

[3.13] gh-121035: Further improve logging flow diagram with respect to dark/light modes. (GH-121265)
(cherry picked from commit 089835469d5efbea4793cd611b43cb8387f2e7e5)

16 months ago[3.13] gh-121035: Improve logging flow diagram for dark/light modes. (GH-121254)...
Vinay Sajip [Wed, 3 Jul 2024 10:01:50 +0000 (11:01 +0100)] 
[3.13] gh-121035: Improve logging flow diagram for dark/light modes. (GH-121254) (GH-121317)

(cherry picked from commit bfe0e4d7696647a546110328510bdb98146ad2f2)

16 months ago[3.13] gh-106597: Add more offsets to _Py_DebugOffsets (GH-121311) (#121312)
Miss Islington (bot) [Wed, 3 Jul 2024 09:18:15 +0000 (11:18 +0200)] 
[3.13] gh-106597: Add more offsets to _Py_DebugOffsets (GH-121311) (#121312)

gh-106597: Add more offsets to _Py_DebugOffsets (GH-121311)

Add more offsets to _Py_DebugOffsets

We add a few more offsets that are required by some out-of-process
tools, such as [Austin](https://github.com/p403n1x87/austin).
(cherry picked from commit c9bdfbe86853fcf5f2b7dce3a50b383e23384ed2)

Co-authored-by: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
16 months ago[3.13] gh-121279: Re-add prematurely removed import warnings to importlib.abc (#121281)
Miro Hrončok [Wed, 3 Jul 2024 09:06:20 +0000 (11:06 +0200)] 
[3.13] gh-121279: Re-add prematurely removed import warnings to importlib.abc (#121281)

Fixup for 51724620e868512bbedb1547aca441bcd27bbe0c

Fixes https://github.com/python/cpython/issues/121279

16 months ago[3.13] docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237) (#121309)
Miss Islington (bot) [Wed, 3 Jul 2024 08:23:51 +0000 (10:23 +0200)] 
[3.13] docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237) (#121309)

docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237)
(cherry picked from commit 4232976b02cb999335c6bfdec3315520b21954f2)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>