]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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>
16 months ago[3.13] gh-120782: Update internal type cache when reloading datetime (GH-120829)...
neonene [Wed, 3 Jul 2024 08:22:51 +0000 (17:22 +0900)] 
[3.13] gh-120782: Update internal type cache when reloading datetime (GH-120829) (#120855)

* [3.13] gh-120782: Update internal type cache when reloading datetime

When reloading _datetime module, the single-phase version did not invoke the PyInit__datetime function, whereas the current multi-phase version updates the static types through the module init. The outdated static type cache in the interpreter state needs to be invalidated at the end of reloading the multi-phase module.

16 months ago[3.13] gh-116181: Remove Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE in rotatingtr...
Miss Islington (bot) [Wed, 3 Jul 2024 07:59:26 +0000 (09:59 +0200)] 
[3.13] gh-116181: Remove Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE in rotatingtree.c (GH-121260) (#121307)

gh-116181: Remove Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE in rotatingtree.c (GH-121260)
(cherry picked from commit 705a123898f1394b62076c00ab6008c18fd8e115)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
16 months ago[3.13] gh-115773: Add sizes to debug offset structure (GH-120112) (#121283)
Miss Islington (bot) [Tue, 2 Jul 2024 18:19:26 +0000 (20:19 +0200)] 
[3.13] gh-115773: Add sizes to debug offset structure (GH-120112) (#121283)

gh-115773: Add sizes to debug offset structure (GH-120112)
(cherry picked from commit b180788d4a927d23af54f4b4702ccaf254f64854)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
16 months ago[3.13] gh-121245: Correct pyrepl import in site.py (GH-121255) (#121261)
Miss Islington (bot) [Tue, 2 Jul 2024 11:40:05 +0000 (13:40 +0200)] 
[3.13] gh-121245: Correct pyrepl import in site.py (GH-121255) (#121261)

(cherry picked from commit 7a807c3efaa83f1e4fb9b791579b47a0a1fd47de)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
16 months ago[3.13] gh-121196: Document `dict.fromkeys` params as pos-only (GH-121197) (#121242)
Miss Islington (bot) [Mon, 1 Jul 2024 20:43:34 +0000 (22:43 +0200)] 
[3.13] gh-121196: Document `dict.fromkeys` params as pos-only (GH-121197) (#121242)

gh-121196: Document `dict.fromkeys` params as pos-only (GH-121197)
(cherry picked from commit 1dc9a4f6b20148fd4ef2eb2800a6c65224828181)

Co-authored-by: sobolevn <mail@sobolevn.me>
16 months ago[3.13] gh-117657: Fix data races reported by TSAN in some set methods (GH-120914...
Miss Islington (bot) [Mon, 1 Jul 2024 19:40:28 +0000 (21:40 +0200)] 
[3.13] gh-117657: Fix data races reported by TSAN in some set methods (GH-120914) (#121240)

Refactor the fast Unicode hash check into `_PyObject_HashFast` and use relaxed
atomic loads in the free-threaded build.

After this change, the TSAN doesn't report data races for this method.
(cherry picked from commit 294e72496439da984cb8dba9100d3613c8cc8a6d)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
16 months ago[3.13] gh-121110: Temporarily Skip test_basic_multiple_interpreters_reset_each (gh...
Miss Islington (bot) [Mon, 1 Jul 2024 18:23:35 +0000 (20:23 +0200)] 
[3.13] gh-121110: Temporarily Skip test_basic_multiple_interpreters_reset_each (gh-121238)

This will allow Py_TRACE_REFS builds to pass the test suite, until the underlying issue can be resolved.

(cherry picked from commit 9bcb7d8c6f8277c4e76145ec4c834213167e3387, AKA gh-121236)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
16 months ago[3.13] gh-114104: clarify asynchronous comprehension docs to match runtime behavior...
Miss Islington (bot) [Mon, 1 Jul 2024 16:51:43 +0000 (18:51 +0200)] 
[3.13] gh-114104: clarify asynchronous comprehension docs to match runtime behavior (GH-121175) (#121234)

gh-114104: clarify asynchronous comprehension docs to match runtime behavior (GH-121175)
(cherry picked from commit 91313afdb392d0d6105e9aaa57b5a50112b613e7)

Co-authored-by: Danny Yang <yangdanny97@users.noreply.github.com>
16 months ago[3.13] gh-121200: Fix test_expanduser_pwd2() of test_posixpath (GH-121228) (#121232)
Miss Islington (bot) [Mon, 1 Jul 2024 16:13:41 +0000 (18:13 +0200)] 
[3.13] gh-121200: Fix test_expanduser_pwd2() of test_posixpath (GH-121228) (#121232)

gh-121200: Fix test_expanduser_pwd2() of test_posixpath (GH-121228)

Call getpwnam() to get pw_dir, since it can be different than
getpwall() pw_dir.
(cherry picked from commit 02cb5fdee391670d63b2fc0a92ca9b36a32ac95a)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-121200: Log pwd entry in test_expanduser_pwd2() (GH-121207) (#121213)
Miss Islington (bot) [Mon, 1 Jul 2024 10:09:01 +0000 (12:09 +0200)] 
[3.13] gh-121200: Log pwd entry in test_expanduser_pwd2() (GH-121207) (#121213)

gh-121200: Log pwd entry in test_expanduser_pwd2() (GH-121207)

Use subTest() to log the pwd entry in test_expanduser_pwd2() of
test_posixpath to help debugging.
(cherry picked from commit 05a6f8da6042cc87da1cd3824c1375d12753e5a1)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-121084: Call _abc_registry_clear() when checking refleaks (GH-121191) ...
Miss Islington (bot) [Mon, 1 Jul 2024 09:34:53 +0000 (11:34 +0200)] 
[3.13] gh-121084: Call _abc_registry_clear() when checking refleaks (GH-121191) (#121208)

gh-121084: Call _abc_registry_clear() when checking refleaks (GH-121191)

dash_R_cleanup() now calls _abc_registry_clear() before calling again
register().
(cherry picked from commit c766ad206ea60b1e0edcb625b99e7631954a984f)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-121188: Sanitize invalid XML characters in regrtest (GH-121195) (#121204)
Miss Islington (bot) [Mon, 1 Jul 2024 08:55:38 +0000 (10:55 +0200)] 
[3.13] gh-121188: Sanitize invalid XML characters in regrtest (GH-121195) (#121204)

gh-121188: Sanitize invalid XML characters in regrtest (GH-121195)

When creating the JUnit XML file, regrtest now escapes characters
which are invalid in XML, such as the chr(27) control character used
in ANSI escape sequences.
(cherry picked from commit af8c3d7a26d605099f5b3406a8d33ecddb77e8fb)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-113565: Improve and harden detection of curses dependencies (GH-119816...
Miss Islington (bot) [Mon, 1 Jul 2024 08:35:38 +0000 (10:35 +0200)] 
[3.13] gh-113565: Improve and harden detection of curses dependencies (GH-119816) (#121202)

1. Use pkg-config to check for ncursesw/panelw. If that fails, use
   pkg-config to check for ncurses/panel.
2. Regardless of pkg-config output, search for curses/panel headers, so
   we're sure we have all defines in pyconfig.h.
3. Regardless of pkg-config output, check if libncurses or libncursesw
   contains the 'initscr' symbol; if it does _and_ pkg-config failed
   earlier, add the resulting -llib linker option to CURSES_LIBS.
   Ditto for 'update_panels' and PANEL_LIBS.
4. Wrap the rest of the checks with WITH_SAVE_ENV and make sure we're
   using updated LIBS and CPPFLAGS for those.

Add the PY_CHECK_CURSES convenience macro.
(cherry picked from commit f80376b129ad947263a6b03a6c3a874e9f8706e6)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
16 months ago[3.13] gh-87744: fix waitpid race while calling send_signal in asyncio (GH-121126...
Miss Islington (bot) [Mon, 1 Jul 2024 05:11:47 +0000 (07:11 +0200)] 
[3.13] gh-87744: fix waitpid race while calling send_signal in asyncio (GH-121126) (#121194)

gh-87744: fix waitpid race while calling send_signal in asyncio (GH-121126)

asyncio earlier relied on subprocess module to send signals to the process, this has some drawbacks one being that subprocess module unnecessarily calls waitpid on child processes and hence it races with asyncio implementation which internally uses child watchers. To mitigate this, now asyncio sends signals directly to the process without going through the subprocess on non windows systems. On Windows it fallbacks to subprocess module handling but on windows there are no child watchers so this issue doesn't exists altogether.

(cherry picked from commit bd473aa598c5161521a7018896dc124728214a6c)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>