]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
17 months ago[3.13] gh-119666: fix multiple class-scope comprehensions referencing __class__ ...
Miss Islington (bot) [Mon, 10 Jun 2024 04:37:28 +0000 (06:37 +0200)] 
[3.13] gh-119666: fix multiple class-scope comprehensions referencing __class__ (GH-120295) (#120299)

17 months ago[3.13] bpo-37755: Use configured output in pydoc instead of pager (GH-15105) (GH...
Miss Islington (bot) [Sat, 8 Jun 2024 17:48:47 +0000 (19:48 +0200)] 
[3.13] bpo-37755: Use configured output in pydoc instead of pager (GH-15105) (GH-120261)

If the Helper() class was initialized with an output, the topics, keywords
and symbols help still use the pager instead of the output.
Change the behavior so  the output is used if available while keeping the
previous behavior if no output was configured.
(cherry picked from commit 2080425154d235b4b7dcc9a8a2f58e71769125ca)

Co-authored-by: Enrico Tröger <enrico.troeger@uvena.de>
17 months ago[3.13] gh-120276: Fix incorrect email.header.Header maxlinelen default (GH-120277...
Miss Islington (bot) [Sat, 8 Jun 2024 17:37:50 +0000 (19:37 +0200)] 
[3.13] gh-120276: Fix incorrect email.header.Header maxlinelen default (GH-120277) (GH-120279)

(cherry picked from commit 7c016deae62308dd1b4e2767fc6abf04857c7843)

Co-authored-by: Clinton <pygeek@users.noreply.github.com>
17 months ago[3.13] gh-120121: Add InvalidStateError to concurrent.futures.__all__ (GH-120123...
Miss Islington (bot) [Sat, 8 Jun 2024 16:35:10 +0000 (18:35 +0200)] 
[3.13] gh-120121: Add InvalidStateError to concurrent.futures.__all__ (GH-120123) (#120273)

gh-120121: Add InvalidStateError to concurrent.futures.__all__ (GH-120123)
(cherry picked from commit 5d59b870effa0f576acf7264cfcbfca2b36e34e3)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
17 months ago[3.13] gh-120244: Fix re.sub() reference leak (GH-120245) (GH-120264)
Miss Islington (bot) [Sat, 8 Jun 2024 11:10:28 +0000 (13:10 +0200)] 
[3.13] gh-120244: Fix re.sub() reference leak (GH-120245) (GH-120264)

(cherry picked from commit 38a25e9560cf0ff0b80d9e90bce793ff24c6e027)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
17 months ago[3.13] gh-120242: Fix handling of `[setUp,tearDown]Class` in `test_datetime` (GH...
Miss Islington (bot) [Sat, 8 Jun 2024 08:13:53 +0000 (10:13 +0200)] 
[3.13] gh-120242: Fix handling of `[setUp,tearDown]Class` in `test_datetime` (GH-120243) (#120259)

gh-120242: Fix handling of `[setUp,tearDown]Class` in `test_datetime` (GH-120243)
(cherry picked from commit 95f4db88d5ab7d900f05d0418b2a2e77bf9ff126)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
17 months ago[3.13] gh-120225: fix crash in compiler on empty block at end of exception handler...
Miss Islington (bot) [Fri, 7 Jun 2024 22:01:20 +0000 (00:01 +0200)] 
[3.13] gh-120225: fix crash in compiler on empty block at end of exception handler (GH-120235) (#120249)

gh-120225: fix crash in compiler on empty block at end of exception handler (GH-120235)
(cherry picked from commit 4fc82b6d3b99f873179937215833e7a573ca7876)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
17 months ago[3.13] gh-120200: Fix `inspect.iscoroutinefunction(inspect) is True` corner case...
Miss Islington (bot) [Fri, 7 Jun 2024 16:26:30 +0000 (18:26 +0200)] 
[3.13] gh-120200: Fix `inspect.iscoroutinefunction(inspect) is True` corner case (GH-120214) (#120237)

gh-120200: Fix `inspect.iscoroutinefunction(inspect) is True` corner case (GH-120214)
(cherry picked from commit 10fb1b8f36ab2fc3d2fe7392d5735dd19c5e2365)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
17 months ago[3.13] gh-120155: Fix copy/paste error in HAVE_SUBOFFSETS_IN_LAST_DIM() (GH-120228...
Miss Islington (bot) [Fri, 7 Jun 2024 16:23:34 +0000 (18:23 +0200)] 
[3.13] gh-120155: Fix copy/paste error in HAVE_SUBOFFSETS_IN_LAST_DIM() (GH-120228) (#120238)

gh-120155: Fix copy/paste error in HAVE_SUBOFFSETS_IN_LAST_DIM() (GH-120228)

Don't hardcode 'dest' in HAVE_SUBOFFSETS_IN_LAST_DIM() macro of
memoryobject.c, but use its 'view' parameter instead.

Fix the Coverity issue:

Error: COPY_PASTE_ERROR (CWE-398):
Python-3.12.2/Objects/memoryobject.c:273:14: original: ""dest->suboffsets + (dest->ndim - 1)"" looks like the original copy.
Python-3.12.2/Objects/memoryobject.c:274:14: copy_paste_error: ""dest"" in ""src->suboffsets + (dest->ndim - 1)"" looks like a copy-paste error.
Python-3.12.2/Objects/memoryobject.c:274:14: remediation: Should it say ""src"" instead?
GH-  272|       assert(dest->ndim > 0 && src->ndim > 0);
GH-  273|       return (!HAVE_SUBOFFSETS_IN_LAST_DIM(dest) &&
GH-  274|->             !HAVE_SUBOFFSETS_IN_LAST_DIM(src) &&
GH-  275|               dest->strides[dest->ndim-1] == dest->itemsize &&
GH-  276|               src->strides[src->ndim-1] == src->itemsize);
(cherry picked from commit 90b75405260467814c93738a3325645918d4ea51)

Co-authored-by: Victor Stinner <vstinner@python.org>
17 months ago[3.13] gh-94808: Add test coverage for "starred kind" in _PyPegen_set_expr_context...
Miss Islington (bot) [Fri, 7 Jun 2024 16:11:20 +0000 (18:11 +0200)] 
[3.13] gh-94808: Add test coverage for "starred kind" in _PyPegen_set_expr_context (GH-119222) (GH-119263)

gh-94808: Add test coverage for "starred kind" in _PyPegen_set_expr_context (GH-119222)

Add test coverage for "starred kind" in _PyPegen_set_expr_context
(cherry picked from commit 8231a24454c854ea22590fd74733d29e4274122d)

Co-authored-by: Mark Jason Dominus (陶敏修) <mjd@pobox.com>
17 months ago[3.13] gh-120211: Fix tkinter.ttk with Tcl/Tk 9.0 (GH-120213) (GH-120215)
Miss Islington (bot) [Fri, 7 Jun 2024 15:00:30 +0000 (17:00 +0200)] 
[3.13] gh-120211: Fix tkinter.ttk with Tcl/Tk 9.0 (GH-120213) (GH-120215)

* Use new methods for tracing Tcl variable.
* Fix Combobox.current() for empty combobox.
(cherry picked from commit d68a22e7a68ae09f7db61d5a1a3bd9c0360cf3ee)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 months ago[3.13] gh-110383: Improve 'old string formatting' text in tutorial (GH-120219) (...
Miss Islington (bot) [Fri, 7 Jun 2024 13:53:35 +0000 (15:53 +0200)] 
[3.13] gh-110383: Improve 'old string formatting' text in tutorial (GH-120219) (#120229)

(cherry picked from commit 225aab7f70d804174cc3a75bc04a5bb1545e5adb)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
17 months ago[3.13] gh-112672: Fix builtin Tkinter with Tcl 9.0 (GH-112681) (GH-120208)
Miss Islington (bot) [Fri, 7 Jun 2024 10:12:31 +0000 (12:12 +0200)] 
[3.13] gh-112672: Fix builtin Tkinter with Tcl 9.0 (GH-112681) (GH-120208)

* Add declaration of Tcl_AppInit(), missing in Tcl 9.0.
* Use Tcl_Size instead of int where needed.

(cherry picked from commit e0799352823289fafb8131341abd751923ee9c08)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 months ago[3.13] gh-110383: Clarify "non-integral" wording in pow() docs (GH-119688) (#120206)
Miss Islington (bot) [Fri, 7 Jun 2024 10:03:06 +0000 (12:03 +0200)] 
[3.13] gh-110383: Clarify "non-integral" wording in pow() docs (GH-119688) (#120206)

(cherry picked from commit 6646a9da26d12fc54263b22dd2916a2f710f1db7)

Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com>
17 months ago[3.13] gh-120164: Fix test_os.test_win32_mkdir_700() (GH-120177) (#120202)
Miss Islington (bot) [Fri, 7 Jun 2024 09:39:56 +0000 (11:39 +0200)] 
[3.13] gh-120164: Fix test_os.test_win32_mkdir_700() (GH-120177) (#120202)

gh-120164: Fix test_os.test_win32_mkdir_700() (GH-120177)

Don't compare the path to avoid encoding issues.

(cherry picked from commit d5ba4fc9bc9b2d9eff2a90893e8d500e0c367237)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Eryk Sun <eryksun@gmail.com>
17 months ago[3.13] gh-120154: Fix Emscripten/WASI pattern in case statement for LDSHARED (GH...
Miss Islington (bot) [Fri, 7 Jun 2024 09:16:43 +0000 (11:16 +0200)] 
[3.13] gh-120154: Fix Emscripten/WASI pattern in case statement for LDSHARED (GH-120173) (#120199)

Fix Emscripten/WASI pattern in case statement for LDSHARED
(cherry picked from commit 47816f465e833a5257a82b759b1081e06381e528)

Co-authored-by: Michael Allwright <contact@allwright.io>
17 months ago[3.13] Add Plausible for docs metrics (GH-119977) (#120193)
Miss Islington (bot) [Fri, 7 Jun 2024 07:42:19 +0000 (09:42 +0200)] 
[3.13] Add Plausible for docs metrics (GH-119977) (#120193)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Julien Palard <julien@palard.fr>
17 months ago[3.13] gh-119577: Adjust DeprecationWarning when testing element truth values in...
Miss Islington (bot) [Fri, 7 Jun 2024 03:43:17 +0000 (05:43 +0200)] 
[3.13] gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762) (GH-120189)

gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762)

Adjust DeprecationWarning when testing element truth values in ElementTree, we're planning to go with the more natural True return rather than a disruptive harder to code around exception raise, and are deferring the behavior change for a few more releases.
(cherry picked from commit 6b606522ca97488aad6fe2f193d4511e7a8f8334)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
17 months ago[3.13] GH-119054: Add "Reading directories" section to pathlib docs (GH-119956) ...
Barney Gale [Fri, 7 Jun 2024 00:23:49 +0000 (01:23 +0100)] 
[3.13] GH-119054: Add "Reading directories" section to pathlib docs (GH-119956) (#120183)

Add a dedicated subsection for `Path.iterdir()`-related methods,
specifically `iterdir()`, `glob()`, `rglob()` and `walk()`.

(cherry picked from commit 14e1506a6d7056c38fbbc0797268dcf783f91243)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
17 months ago[3.13] gh-117657: Fix TSAN race involving import lock (GH-118523) (#120169)
Miss Islington (bot) [Thu, 6 Jun 2024 18:03:01 +0000 (20:03 +0200)] 
[3.13] gh-117657: Fix TSAN race involving import lock (GH-118523) (#120169)

This adds a `_PyRecursiveMutex` type based on `PyMutex` and uses that
for the import lock. This fixes some data races in the free-threaded
build and generally simplifies the import lock code.
(cherry picked from commit e21057b99967eb5323320e6d1121955e0cd2985e)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] Restore decimal context after decimal doctests (GH-120149) (GH-120167)
Miss Islington (bot) [Thu, 6 Jun 2024 17:36:46 +0000 (19:36 +0200)] 
[3.13] Restore decimal context after decimal doctests (GH-120149) (GH-120167)

The modified context caused tests failures in several other tests.
(cherry picked from commit 2d7ff6e0e7d4c08ba84079a5c19a4a485626e1de)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 months agogh-119679: Fix layout of PYD and DLL files on Windows when using PC/layout script...
Miss Islington (bot) [Thu, 6 Jun 2024 15:38:31 +0000 (17:38 +0200)] 
gh-119679: Fix layout of PYD and DLL files on Windows when using PC/layout script (GH-120133)

(cherry picked from commit cccc9f63c63ae693ccd0e2d8fc6cfd3aa18feb8e)

Co-authored-by: Steve Dower <steve.dower@python.org>
17 months ago[3.13] gh-120111: Don't use cirrus M1 macOS runners on fork (GH-120116) (GH-120152)
Miss Islington (bot) [Thu, 6 Jun 2024 12:26:23 +0000 (14:26 +0200)] 
[3.13] gh-120111: Don't use cirrus M1 macOS runners on fork (GH-120116) (GH-120152)

(cherry picked from commit fd104dfcb838d735ef8128e3539d7a730d403422)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
17 months agoMerge branch '3.13' of https://github.com/python/cpython into 3.13
Thomas Wouters [Wed, 5 Jun 2024 22:46:27 +0000 (00:46 +0200)] 
Merge branch '3.13' of https://github.com/python/cpython into 3.13

17 months agoPost 3.13.0b2
Thomas Wouters [Wed, 5 Jun 2024 22:44:36 +0000 (00:44 +0200)] 
Post 3.13.0b2

17 months ago[3.13] Withdraw most of my ownership in favor of Mark (#120126)
Guido van Rossum [Wed, 5 Jun 2024 18:04:48 +0000 (11:04 -0700)] 
[3.13] Withdraw most of my ownership in favor of Mark (#120126)

Backport of #119611.

17 months agoPython 3.13.0b2 v3.13.0b2
Thomas Wouters [Wed, 5 Jun 2024 14:43:18 +0000 (16:43 +0200)] 
Python 3.13.0b2

17 months ago[3.13] gh-120065: Increase `collect_in_thread` period to 5 ms. (GH-120068) (#120110)
Miss Islington (bot) [Wed, 5 Jun 2024 13:46:17 +0000 (15:46 +0200)] 
[3.13] gh-120065: Increase `collect_in_thread` period to 5 ms. (GH-120068) (#120110)

This matches the default GIL switch interval. It greatly speeds up the
free-threaded build: previously, it spent nearly all its time in
`gc.collect()`.
(cherry picked from commit 4bba1c9e6cfeaf69302b501a4306668613db4b28)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from contex...
Miss Islington (bot) [Wed, 5 Jun 2024 12:15:51 +0000 (14:15 +0200)] 
[3.13] gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from contextlib.suppress (GH-119657) (#120105)

gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from contextlib.suppress (GH-119657)
(cherry picked from commit 5c02ea8bae2287a828840f5734966da23dc573dc)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
17 months ago[3.13] gh-119819: Update logging configuration to support joinable multiproc… (GH...
Miss Islington (bot) [Wed, 5 Jun 2024 06:59:41 +0000 (08:59 +0200)] 
[3.13] gh-119819: Update logging configuration to support joinable multiproc… (GH-120090) (GH-120093)

(cherry picked from commit 983efcf15b2503fe0c05d5e03762385967962b33)

17 months ago[3.13] gh-120078: Fix struct_time attr typo tm_day -> tm_mday in Doc/library/time...
Miss Islington (bot) [Wed, 5 Jun 2024 00:39:54 +0000 (02:39 +0200)] 
[3.13] gh-120078: Fix struct_time attr typo tm_day -> tm_mday in Doc/library/time.rst (GH-120085)

(cherry picked from commit b6b0dcbfc054f581b6f78602e4c2e9474e3efe21)

Co-authored-by: shurj0 <60540027+shurj0@users.noreply.github.com>
17 months ago[3.13] gh-114616: Improve docs regarding changes to caches representation in dis...
Miss Islington (bot) [Tue, 4 Jun 2024 23:15:39 +0000 (01:15 +0200)] 
[3.13] gh-114616: Improve docs regarding changes to caches representation in dis (GH-120033) (#120079)

gh-114616: Improve docs regarding changes to caches representation in dis (GH-120033)
(cherry picked from commit 770f3c1eadd3392c72fd55be47770234dd143a14)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
17 months ago[3.13] gh-119553: Fix console when pressing Ctrl-C within a multiline block (GH-12007...
Miss Islington (bot) [Tue, 4 Jun 2024 21:44:33 +0000 (23:44 +0200)] 
[3.13] gh-119553: Fix console when pressing Ctrl-C within a multiline block (GH-120075) (#120076)

(cherry picked from commit 69b3e8ea569faabccd74036e3d0e5ec7c0c62a20)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
17 months ago[3.13] gh-120048: Make `test_imaplib` faster (GH-120050) (#120069)
Miss Islington (bot) [Tue, 4 Jun 2024 20:18:33 +0000 (22:18 +0200)] 
[3.13] gh-120048: Make `test_imaplib` faster (GH-120050) (#120069)

The `test_imaplib` was taking 40+ minutes in the refleak build bots because
the tests waiting on a client `self._setup()` was creating a client that
prevented progress until its connection timed out, which scaled with the
global timeout.

We should set `connect=False` for the tests that don't want `_setup()` to
create a client.

(cherry picked from commit 710cbea6604d27c7d59ae4953bf522b997a82cc7)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 months ago[3.13] gh-119999: Fix potential race condition in `_Py_ExplicitMergeRefcount` (GH...
Miss Islington (bot) [Tue, 4 Jun 2024 19:57:18 +0000 (21:57 +0200)] 
[3.13] gh-119999: Fix potential race condition in `_Py_ExplicitMergeRefcount` (GH-120000) (#120073)

We need to write to `ob_ref_local` and `ob_tid` before `ob_ref_shared`.
Once we mark `ob_ref_shared` as merged, some other thread may free the
object because the caller also passes in `-1` as `extra` to give up its
only reference.
(cherry picked from commit 4055577221f5f52af329e87f31d81bb8fb02c504)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] gh-119819: Update test to skip if _multiprocessing is unavailable. (GH-120067...
Miss Islington (bot) [Tue, 4 Jun 2024 19:50:48 +0000 (21:50 +0200)] 
[3.13] gh-119819: Update test to skip if _multiprocessing is unavailable. (GH-120067) (GH-120072)

(cherry picked from commit 109e1082ea92f89d42cd70f2cc7ca6fba6be9bab)

17 months ago[3.13] gh-119842: Honor PyOS_InputHook in the new REPL (GH-119843) (GH-120066)
Łukasz Langa [Tue, 4 Jun 2024 19:26:10 +0000 (15:26 -0400)] 
[3.13] gh-119842: Honor PyOS_InputHook in the new REPL (GH-119843) (GH-120066)

(cherry picked from commit d9095194dde27eaabfc0b86a11989cdb9a2acfe1)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
17 months ago[3.13] gh-119553: Clear reader on Ctrl-C command (GH-119801) (#120062)
Miss Islington (bot) [Tue, 4 Jun 2024 18:45:22 +0000 (20:45 +0200)] 
[3.13] gh-119553: Clear reader on Ctrl-C command (GH-119801) (#120062)

(cherry picked from commit 010ea93b2b888149561becefeee90826bf8a2934)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
17 months ago[3.13] gh-120039: Reduce expected timeout in test_siginterrupt_off (GH-120047) (...
Miss Islington (bot) [Tue, 4 Jun 2024 18:11:01 +0000 (20:11 +0200)] 
[3.13] gh-120039: Reduce expected timeout in test_siginterrupt_off (GH-120047) (#120060)

The process is expected to time out. In the refleak builds,
`support.SHORT_TIMEOUT` is often five minutes and we run the tests six
times, so test_signal was taking >30 minutes.
(cherry picked from commit d419d468ff4aaf6bc673354d0ee41b273d09dd3f)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] gh-120041: Do not use append_to_screen when completions are visible (GH-120042...
Miss Islington (bot) [Tue, 4 Jun 2024 18:10:29 +0000 (20:10 +0200)] 
[3.13] gh-120041: Do not use append_to_screen when completions are visible (GH-120042) (#120051)

* gh-120041: Do not use append_to_screen when completions are visible (GH-120042)
(cherry picked from commit 8fc7653766b106bdbc4ff6154e0020aea4ab15e6)

* gh-120041: Refactor check for visible completion menu in completing_reader (GH-120055)
(cherry picked from commit bf8e5e53d0c359a1f9c285d855e7a5e9b6d91375)
---------

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
17 months ago[3.13] gh-89928: Fix integer conversion of device numbers (GH-31794) (GH-120053)
Miss Islington (bot) [Tue, 4 Jun 2024 17:19:13 +0000 (19:19 +0200)] 
[3.13] gh-89928: Fix integer conversion of device numbers (GH-31794) (GH-120053)

Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).
(cherry picked from commit 7111d9605f9db7aa0b095bb8ece7ccc0b8115c3f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 months ago[3.13] Fix incorrect pull GitHub link in What's New (GH-120045) (#120052)
Miss Islington (bot) [Tue, 4 Jun 2024 17:06:14 +0000 (19:06 +0200)] 
[3.13] Fix incorrect pull GitHub link in What's New (GH-120045) (#120052)

Co-authored-by: Trey Hunner <trey@treyhunner.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
17 months ago[3.13] gh-119588: Update docs to reflect decision to include the change with Python...
Miss Islington (bot) [Tue, 4 Jun 2024 15:39:49 +0000 (17:39 +0200)] 
[3.13] gh-119588: Update docs to reflect decision to include the change with Python 3.13 and not 3.12. (GH-120043) (#120046)

gh-119588: Update docs to reflect decision to include the change with Python 3.13 and not 3.12. (GH-120043)
(cherry picked from commit 4dcd91ceafce91ec37bb1a9d544e41fc65578994)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
17 months ago[3.13] gh-119588: Implement zipfile.Path.is_symlink (zipp 3.19.0). (GH-119591) (...
Miss Islington (bot) [Tue, 4 Jun 2024 14:56:06 +0000 (16:56 +0200)] 
[3.13] gh-119588: Implement zipfile.Path.is_symlink (zipp 3.19.0). (GH-119591) (#119985)

gh-119588: Implement zipfile.Path.is_symlink (zipp 3.19.0). (GH-119591)
(cherry picked from commit 42a34ddb0b63e638905b01e17a7254623a0de427)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
17 months ago[3.13] gh-106531: Apply changes from importlib_resources 6.3.2 (GH-117054) (#120014)
Miss Islington (bot) [Tue, 4 Jun 2024 14:54:59 +0000 (16:54 +0200)] 
[3.13] gh-106531: Apply changes from importlib_resources 6.3.2 (GH-117054) (#120014)

gh-106531: Apply changes from importlib_resources 6.3.2 (GH-117054)

Apply changes from importlib_resources 6.3.2.
(cherry picked from commit 8d63c8d47b9edd8ac2f0b395b2fa0ae5f571252d)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
17 months ago[3.13] gh-117657: Fix race involving GC and heap initialization (GH-119923) (#120038)
Miss Islington (bot) [Tue, 4 Jun 2024 14:08:10 +0000 (16:08 +0200)] 
[3.13] gh-117657: Fix race involving GC and heap initialization (GH-119923) (#120038)

The `_PyThreadState_Bind()` function is called before the first
`PyEval_AcquireThread()` so it's not synchronized with the stop the
world GC. We had a race where `gc_visit_heaps()` might visit a thread's
heap while it's being initialized.

Use a simple atomic int to avoid visiting heaps for threads that are not
yet fully initialized (i.e., before `tstate_mimalloc_bind()` is called).

The race was reproducible by running:
`python Lib/test/test_importlib/partial/pool_in_threads.py`.
(cherry picked from commit e69d068ad0bd6a25434ea476a647b635da4d82bb)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] gh-119819: Fix regression to allow logging configuration with multipr… (GH...
Miss Islington (bot) [Tue, 4 Jun 2024 12:46:41 +0000 (14:46 +0200)] 
[3.13] gh-119819: Fix regression to allow logging configuration with multipr… (GH-120030) (GH-120035)

(cherry picked from commit 99d945c0c006e3246ac00338e37c443c6e08fc5c)

17 months ago[3.13] gh-118868: logging QueueHandler fix passing of kwargs (GH-118869) (GH-120032)
Miss Islington (bot) [Tue, 4 Jun 2024 12:18:11 +0000 (14:18 +0200)] 
[3.13] gh-118868: logging QueueHandler fix passing of kwargs (GH-118869) (GH-120032)

(cherry picked from commit dce14bb2dce7887df40ae5c13b0d13e0dafceff7)

17 months ago[3.13] gh-119070: Update test_shebang_executable_extension to always use non-installe...
Miss Islington (bot) [Tue, 4 Jun 2024 11:24:10 +0000 (13:24 +0200)] 
[3.13] gh-119070: Update test_shebang_executable_extension to always use non-installed version (GH-119846) (#GH-120015)

gh-119070: Update test_shebang_executable_extension to always use non-installed version (GH-119846)
(cherry picked from commit 5c48eb0cc6c3e84aafda0a734a05ecec14fc0ccf)

Co-authored-by: Steve Dower <steve.dower@python.org>
17 months ago[3.13] gh-111499: Fix PYTHONMALLOCSTATS at Python exit (GH-120021) (#120022)
Miss Islington (bot) [Tue, 4 Jun 2024 10:02:12 +0000 (12:02 +0200)] 
[3.13] gh-111499: Fix PYTHONMALLOCSTATS at Python exit (GH-120021) (#120022)

gh-111499: Fix PYTHONMALLOCSTATS at Python exit (GH-120021)

Call _PyObject_DebugMallocStats() earlier in Py_FinalizeEx(), before
the interpreter is deleted.
(cherry picked from commit 5a1205b641df133932ed4c65b9a4ff5724e89963)

Co-authored-by: Victor Stinner <vstinner@python.org>
17 months ago[3.13] gh-111389: Add PyHASH_MULTIPLIER constant (GH-119214) (#119334)
Miss Islington (bot) [Tue, 4 Jun 2024 07:26:25 +0000 (09:26 +0200)] 
[3.13] gh-111389: Add PyHASH_MULTIPLIER constant (GH-119214) (#119334)

gh-111389: Add PyHASH_MULTIPLIER constant (GH-119214)
(cherry picked from commit f6da790122fdae1a28f444edfbb55202d6829cd1)

Co-authored-by: Victor Stinner <vstinner@python.org>
17 months ago[3.13] gh-119724: Revert "bpo-45759: Better error messages for non-matching 'elif...
T. Wouters [Tue, 4 Jun 2024 06:36:16 +0000 (23:36 -0700)] 
[3.13] gh-119724: Revert "bpo-45759: Better error messages for non-matching 'elif'/'else' statements (GH-29513)" (GH-119974) (GH-120013)

This reverts commit 1c8f912ebdfdb146cd7dd2d7a3a67d2c5045ddb0.
(cherry picked from commit 31a4fb3c74a0284436343858803b54471e2dc9c7)

17 months ago[3.13] gh-117398: Use Per-Interpreter State for the _datetime Static Types (gh-120009)
Miss Islington (bot) [Mon, 3 Jun 2024 23:37:28 +0000 (01:37 +0200)] 
[3.13] gh-117398: Use Per-Interpreter State for the _datetime Static Types (gh-120009)

We make use of the same mechanism that we use for the static builtin types.  This required a few tweaks.

This change is the final piece needed to make _datetime support multiple interpreters.  I've updated the module slot accordingly.

(cherry picked from commit 105f22ea46ac16866e6df18ebae2a8ba422b7f45, AKA gh-119929)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
17 months ago[3.13] gh-117142: Support Importing ctypes in Isolated Interpreters (gh-120008)
Miss Islington (bot) [Mon, 3 Jun 2024 23:06:56 +0000 (01:06 +0200)] 
[3.13] gh-117142: Support Importing ctypes in Isolated Interpreters (gh-120008)

This makes the support official.

(cherry picked from commit dba7a167dbbd50e83e58df351f3414b7a08e0188, AKA gh-119991)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
17 months ago[3.13] gh-117398: Add datetime Module State (gh-120004)
Miss Islington (bot) [Mon, 3 Jun 2024 23:05:04 +0000 (01:05 +0200)] 
[3.13] gh-117398: Add datetime Module State (gh-120004)

I was able to make use of the existing datetime_state struct, but there was one tricky thing I had to sort out.  We mostly aren't converting to heap types, so we can't use things like PyType_GetModuleByDef() to look up the module state.  The solution I came up with is somewhat novel, but I consider it straightforward.  Also, it shouldn't have much impact on performance.

In summary, this main changes here are:

* I've added some macros to help hide how various objects relate to module state
* as a solution to the module state lookup problem, I've stored the last loaded module on the current interpreter's internal dict (actually a weakref)
* if the static type method is used after the module has been deleted, it is reloaded
* to avoid extra work when loading the module, we directly copy the objects (new refs only) from the old module state into the new state if the old module hasn't been deleted yet
* during module init we set various objects on the static types' __dict__s; to simplify things, we only do that the first time; once those static types have a separate __dict__ per interpreter, we'll do it every time
* we now clear the module state when the module is destroyed (before, we were leaking everything in _datetime_global_state)

(cherry picked from commit d82a7ba041321e7b58a5a9bbc394670be6ceeb7c, AKA gh-119810)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
17 months ago[3.13] gh-117657: Fix itertools.count thread safety (GH-119268) (#120007)
Sam Gross [Mon, 3 Jun 2024 22:47:34 +0000 (18:47 -0400)] 
[3.13] gh-117657: Fix itertools.count thread safety (GH-119268) (#120007)

Fix itertools.count in free-threading mode
(cherry picked from commit 87939bd5790accea77c5a81093f16f28d3f0b429)

Co-authored-by: Arnon Yaari <wiggin15@yahoo.com>
17 months ago[3.13] gh-117657: Fix race involving immortalizing objects (GH-119927) (#120005)
Sam Gross [Mon, 3 Jun 2024 22:21:32 +0000 (18:21 -0400)] 
[3.13] gh-117657: Fix race involving immortalizing objects (GH-119927) (#120005)

The free-threaded build currently immortalizes objects that use deferred
reference counting (see gh-117783). This typically happens once the
first non-main thread is created, but the behavior can be suppressed for
tests, in subinterpreters, or during a compile() call.

This fixes a race condition involving the tracking of whether the
behavior is suppressed.

(cherry picked from commit 47fb4327b5c405da6df066dcaa01b7c1aefab313)

17 months ago[3.13] gh-117657: Avoid `sem_clockwait` in TSAN (GH-119915) (#119992)
Miss Islington (bot) [Mon, 3 Jun 2024 18:07:22 +0000 (20:07 +0200)] 
[3.13] gh-117657: Avoid `sem_clockwait` in TSAN (GH-119915) (#119992)

The `sem_clockwait` function is not currently instrumented, which leads
to false positives.
(cherry picked from commit 41c1cefbae71d687d1a935233b086473df65e15c)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] gh-118835: pyrepl: Fix prompt length computation for custom prompts containing...
Miss Islington (bot) [Mon, 3 Jun 2024 17:31:26 +0000 (19:31 +0200)] 
[3.13] gh-118835: pyrepl: Fix prompt length computation for custom prompts containing ANSI escape codes (GH-119942) (#119990)

gh-118835: pyrepl: Fix prompt length computation for custom prompts containing ANSI escape codes (GH-119942)
(cherry picked from commit 2e0aa731aebb8ef3d89ada82f5d39b1bbac65d1f)

Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
17 months ago[3.13] Use Cirrus M1 macOS runners for CI (GH-119979) (GH-119986)
Miss Islington (bot) [Mon, 3 Jun 2024 16:15:37 +0000 (18:15 +0200)] 
[3.13] Use Cirrus M1 macOS runners for CI (GH-119979) (GH-119986)

(cherry picked from commit 6acb32fac3511c1d5500cac66f1d6397dcdab835)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Ee Durbin <ee@python.org>
17 months agogh-119679: Ensures correct import libraries are included in Windows install packages...
Miss Islington (bot) [Mon, 3 Jun 2024 15:06:53 +0000 (17:06 +0200)] 
gh-119679: Ensures correct import libraries are included in Windows install packages (GH-119790)

(cherry picked from commit fd01271366abefa8f991e53f090387882fbd6bdd)

Co-authored-by: Steve Dower <steve.dower@python.org>
17 months agogh-102511: Amend 3.13.0b1.rst (GH-119895)
Miss Islington (bot) [Mon, 3 Jun 2024 13:46:40 +0000 (15:46 +0200)] 
gh-102511: Amend 3.13.0b1.rst (GH-119895)

(cherry picked from commit 4765e1fa292007f8ddc59f33454b747312506a7a)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
17 months ago[3.13] gh-119968: Improved monitoring c-api docs (GH-119969) (#119971)
Miss Islington (bot) [Mon, 3 Jun 2024 09:49:14 +0000 (11:49 +0200)] 
[3.13] gh-119968: Improved monitoring c-api docs (GH-119969) (#119971)

gh-119968: Improved monitoring c-api docs (GH-119969)
(cherry picked from commit cae4c80714e7266772025676977e2a1b98cdcd7b)

Co-authored-by: Awbert <119314310+SweetyAngel@users.noreply.github.com>
17 months ago[3.13] gh-119336: Restore removed _PyLong_NumBits() function (GH-119418) (#119970)
Miss Islington (bot) [Mon, 3 Jun 2024 09:29:07 +0000 (11:29 +0200)] 
[3.13] gh-119336: Restore removed _PyLong_NumBits() function (GH-119418) (#119970)

gh-119336: Restore removed _PyLong_NumBits() function (GH-119418)

It is used by the pywin32 project.
(cherry picked from commit e50fac96e82d857ecc024b4cd4e012493b077064)

Co-authored-by: Ethan Smith <ethan@ethanhs.me>
17 months ago[3.13] gh-119856: Support exiting help() with just "exit" (GH-119858) (#119967)
Miss Islington (bot) [Mon, 3 Jun 2024 09:10:39 +0000 (11:10 +0200)] 
[3.13] gh-119856: Support exiting help() with just "exit" (GH-119858) (#119967)

gh-119856: Support exiting help() with just "exit" (GH-119858)
(cherry picked from commit 4223f1d828d3a3e1c8d803e3fdd420afd7d85faf)

Co-authored-by: Victor Stinner <vstinner@python.org>
17 months ago[3.13] gh-117657: Fix data races report by TSAN unicode-hash (gh-119907) (gh-119963)
Miss Islington (bot) [Mon, 3 Jun 2024 03:45:44 +0000 (05:45 +0200)] 
[3.13] gh-117657: Fix data races report by TSAN unicode-hash (gh-119907) (gh-119963)

gh-117657: Fix data races report by TSAN unicode-hash (gh-119907)
(cherry picked from commit 0594a27e5f1d87d59fa8a761dd8ca9df4e42816d)

Co-authored-by: Donghee Na <donghee.na@python.org>
17 months ago[3.13] gh-109975: What's New in Python 3.13: fix broken link for `telnetlib` alternat...
Miss Islington (bot) [Mon, 3 Jun 2024 00:59:41 +0000 (02:59 +0200)] 
[3.13] gh-109975: What's New in Python 3.13: fix broken link for `telnetlib` alternative (GH-119958) (#119959)

(cherry picked from commit 117a8acdab997b73ada822cce97815a86f839e15)

Co-authored-by: Solomon Himelbloom <7608183+TechSolomon@users.noreply.github.com>
17 months ago[3.13] GH-119054: Add "Reading and writing files" section to pathlib docs (GH-119524...
Miss Islington (bot) [Sun, 2 Jun 2024 19:58:41 +0000 (21:58 +0200)] 
[3.13] GH-119054: Add "Reading and writing files" section to pathlib docs (GH-119524) (#119954)

Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.

(cherry picked from commit bd6d4ed6454378e48dab06f50a9be0bae6baa3a2)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
17 months ago[3.13] GH-119054: Add "Querying file type and status" section to pathlib docs (GH...
Barney Gale [Sun, 2 Jun 2024 19:37:01 +0000 (20:37 +0100)] 
[3.13] GH-119054: Add "Querying file type and status" section to pathlib docs (GH-119055) (#119951)

Add a dedicated subsection for `Path.stat()`-related methods, specifically
`stat()`, `lstat()`, `exists()`, `is_*()`, and `samefile()`.

(cherry picked from commit 81d63362302187e5cb838c9a7cd857181142e530)

17 months ago[3.13] Improve documentation for typing.get_type_hints (GH-119928) (#119943)
Miss Islington (bot) [Sun, 2 Jun 2024 15:29:25 +0000 (17:29 +0200)] 
[3.13] Improve documentation for typing.get_type_hints (GH-119928) (#119943)

- Explicit list of what it does that is different from
  "just return __annotations__"
- Remove reference to PEP 563; adding the future import doesn't
  do anything to type aliases, and in general it will never make
  get_type_hints() less likely to fail.
- Remove example, as the Annotated docs already have a similar
  example, and it's unbalanced to have one example about this
  one edge case but not about other behaviors of the function.

(cherry picked from commit aa9fe98e0649f0a151942914ef4e2810ca6126c2)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
17 months ago[3.13] gh-117657: Fix TSAN reported race in `_PyEval_IsGILEnabled`. (GH-119921) ...
Miss Islington (bot) [Sun, 2 Jun 2024 14:42:46 +0000 (16:42 +0200)] 
[3.13] gh-117657: Fix TSAN reported race in `_PyEval_IsGILEnabled`. (GH-119921) (#119939)

The GIL may be disabled concurrently with this call so we need to use a
relaxed atomic load.
(cherry picked from commit f3b89a63cbb6d46e5ed40d5cd9813cdf9189ce35)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] gh-118934: Fix PyEval_GetLocals docs (PEP 667) (GH-119934)
Miss Islington (bot) [Sun, 2 Jun 2024 05:57:17 +0000 (07:57 +0200)] 
[3.13] gh-118934: Fix PyEval_GetLocals docs (PEP 667) (GH-119934)

PEP 667's description of the planned changes to PyEval_GetLocals
was internally inconsistent when accepted, so the docs added for
gh-74929 didn't match either the current behaviour or the intended
behaviour once gh-118934 is fixed.

This PR updates the documentation and 3.13 What's New to match the
intended behaviour (once gh-118934 is fixed).

It also tidies up lingering references to `f_locals` always being a
dictionary (this hasn't been true since at least when custom
namespace support for class statement execution was added)
(cherry picked from commit fd6cd621e0cce6ba2e737103d2a62b5ade90f41f)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
17 months ago[3.13] gh-118888: Further PEP 667 docs updates (gh-119894)
Miss Islington (bot) [Sun, 2 Jun 2024 05:41:25 +0000 (07:41 +0200)] 
[3.13] gh-118888: Further PEP 667 docs updates (gh-119894)

* Clarify impact on default behaviour of exec, eval, etc
* Update documentation for changes to PyEval_GetLocals (gh-74929)

Closes gh-118888
(cherry picked from commit 2180991ea3d50f56595edae241cc92dd4e7de642)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
17 months ago[3.13] gh-119016: Remove outdated sentences from the "classes" tutorial (GH-119130...
Miss Islington (bot) [Sat, 1 Jun 2024 21:35:03 +0000 (23:35 +0200)] 
[3.13] gh-119016: Remove outdated sentences from the "classes" tutorial (GH-119130) (#119925)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
17 months ago[3.13] gh-111201: Skip pyrepl Windows tests earlier (#119848) (#119924)
Victor Stinner [Sat, 1 Jun 2024 21:21:13 +0000 (23:21 +0200)] 
[3.13] gh-111201: Skip pyrepl Windows tests earlier (#119848) (#119924)

gh-111201: Skip pyrepl Windows tests earlier (#119848)

Don't attempt to load pyrepl Windows console if platforms others than
Windows. For example, the import can fail if ctypes is missing.

(cherry picked from commit 91601a55964fdb3c02b21fa3c8dc629daff2390f)

17 months ago[3.13] GH-89727: Fix `shutil.rmtree()` recursion error on deep trees (GH-119808)...
Miss Islington (bot) [Sat, 1 Jun 2024 19:38:55 +0000 (21:38 +0200)] 
[3.13] GH-89727: Fix `shutil.rmtree()` recursion error on deep trees (GH-119808) (#119918)

Implement `shutil._rmtree_safe_fd()` using a list as a stack to avoid emitting recursion errors on deeply nested trees.

`shutil._rmtree_unsafe()` was fixed in a150679f90.

(cherry picked from commit 53b1981fb0cda6c656069e992f172fc6aad7c99c)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
17 months ago[3.13] Add unique() recipe to itertools docs (gh-119911) (gh-119916)
Miss Islington (bot) [Sat, 1 Jun 2024 17:06:04 +0000 (19:06 +0200)] 
[3.13] Add unique() recipe to itertools docs (gh-119911) (gh-119916)

17 months ago[3.13] gh-117657: Add TSAN suppression for `set_discard_entry` (GH-119908) (#119914)
Miss Islington (bot) [Sat, 1 Jun 2024 16:42:16 +0000 (18:42 +0200)] 
[3.13] gh-117657: Add TSAN suppression for `set_discard_entry` (GH-119908) (#119914)

Seen in CI occasionally when running `test_weakref`.
(cherry picked from commit 7dc745d1f5d9558047a52cad5e01df7567533269)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] gh-113892: Add a extra check to `ProactorEventLoop.sock_connect` to ensure...
Miss Islington (bot) [Sat, 1 Jun 2024 16:27:54 +0000 (18:27 +0200)] 
[3.13] gh-113892: Add a extra check to `ProactorEventLoop.sock_connect` to ensure that the given socket is in non-blocking mode (GH-119519) (#119912)

(cherry picked from commit cf3bba3f0671d2c9fee099e3ab0f78b98b176131)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
17 months ago[3.13] Revert "[3.13] gh-69214: Fix fcntl.ioctl() request type (GH-119498) (… (#119906)
Victor Stinner [Sat, 1 Jun 2024 15:08:23 +0000 (17:08 +0200)] 
[3.13] Revert "[3.13] gh-69214: Fix fcntl.ioctl() request type (GH-119498) (… (#119906)

Revert "[3.13] gh-69214: Fix fcntl.ioctl() request type (GH-119498) (#119504)"

This reverts commit 0bab0b3a53da735838720f96f3d3bf86ca6ba125.

The change modified how negative values, like termios.TIOCSWINSZ, was
treated and is actually backward incompatible.

17 months ago[3.13] gh-117657: Fix TSAN race in QSBR assertion (GH-119887) (#119904)
Miss Islington (bot) [Sat, 1 Jun 2024 14:51:55 +0000 (16:51 +0200)] 
[3.13] gh-117657: Fix TSAN race in QSBR assertion (GH-119887) (#119904)

Due to a limitation in TSAN, all reads from `PyThreadState.state` must be
atomic to avoid reported races.
(cherry picked from commit 90ec19fd33e2452902b9788d4821f1fbf6542304)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] gh-117657: Fix TSAN race in free-threaded GC (GH-119883) (#119903)
Miss Islington (bot) [Sat, 1 Jun 2024 14:26:12 +0000 (16:26 +0200)] 
[3.13] gh-117657: Fix TSAN race in free-threaded GC (GH-119883) (#119903)

Only call `gc_restore_tid()` from stop-the-world contexts.
`worklist_pop()` can be called while other threads are running, so use a
relaxed atomic to modify `ob_tid`.
(cherry picked from commit 60593b2052ca275559c11028d50e19f8e5dfee13)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] gh-119821: Support non-dict globals in LOAD_FROM_DICT_OR_GLOBALS (#119822...
Jelle Zijlstra [Sat, 1 Jun 2024 04:56:26 +0000 (21:56 -0700)] 
[3.13] gh-119821: Support non-dict globals in LOAD_FROM_DICT_OR_GLOBALS (#119822) (#119889)

dSupport non-dict globals in LOAD_FROM_DICT_OR_GLOBALS

The implementation basically copies LOAD_GLOBAL. Possibly it could be deduplicated,
but that seems like it may get hairy since the two operations have different operands.

This is important to fix in 3.14 for PEP 649, but it's a bug in earlier versions too,
and we should backport to 3.13 and 3.12 if possible.

(cherry picked from commit 80a4e3899420faaa012c82b4e82cdb6675a6a944)

17 months ago[3.13] gh-74929: PEP 667 C API documentation (gh-119892)
Miss Islington (bot) [Sat, 1 Jun 2024 04:23:04 +0000 (06:23 +0200)] 
[3.13] gh-74929: PEP 667 C API documentation (gh-119892)

* Add docs for new APIs
* Add soft-deprecation notices
* Add What's New porting entries
* Update comments referencing `PyFrame_LocalsToFast()` to mention the proxy instead
* Other related cleanups found when looking for refs to the deprecated APIs

(cherry picked from commit 3859e09e3d92d004978dd838f0511364e7edfb94)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
17 months ago[3.13] gh-118894: Make asyncio REPL use pyrepl (GH-119433) (#119884)
Miss Islington (bot) [Fri, 31 May 2024 21:15:44 +0000 (23:15 +0200)] 
[3.13] gh-118894: Make asyncio REPL use pyrepl (GH-119433) (#119884)

(cherry picked from commit 2237946af0981c46dc7d3886477e425ccfb37f28)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
17 months ago[3.13] gh-119799: Add missing `_Py_IncRefTotal` to `_Py_NewRefWithLock` (GH-119800...
Miss Islington (bot) [Fri, 31 May 2024 19:08:21 +0000 (21:08 +0200)] 
[3.13] gh-119799: Add missing `_Py_IncRefTotal` to `_Py_NewRefWithLock` (GH-119800) (#119878)

The free-threaded refleak builds were reporting negative refcount deltas
in some tests because of a missing `_Py_NewRefWithLock`.
(cherry picked from commit 879d43b705faab0c59f1a6a0042e286f39f3a4ef)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] gh-119369: Fix deadlock during thread exit in free-threaded build (GH-119528...
Miss Islington (bot) [Fri, 31 May 2024 18:19:38 +0000 (20:19 +0200)] 
[3.13] gh-119369: Fix deadlock during thread exit in free-threaded build (GH-119528) (#119868)

Release the GIL before calling `_Py_qsbr_unregister`.

The deadlock could occur when the GIL was enabled at runtime. The
`_Py_qsbr_unregister` call might block while holding the GIL because the
thread state was not active, but the GIL was still held.
(cherry picked from commit 078b8c8cf2bf68f7484cc4d2e3dd74b6fab55664)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] doc: Add glossary entry for "free threading" (GH-119865) (#119874)
Miss Islington (bot) [Fri, 31 May 2024 17:42:36 +0000 (19:42 +0200)] 
[3.13] doc: Add glossary entry for "free threading" (GH-119865) (#119874)

(cherry picked from commit 9bc6045842ebc91ec48ab163a9e1e8644231607c)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] contextlib docs: Clean up redundant 'up' after 'cleanup' (GH-119872)
Miss Islington (bot) [Fri, 31 May 2024 17:39:02 +0000 (19:39 +0200)] 
[3.13] contextlib docs: Clean up redundant 'up' after 'cleanup' (GH-119872)

Reported by Michael Kass on docs@
(cherry picked from commit f3fc800d5f17b144a752a262102b750bedcdaa14)

17 months ago[3.13] gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions...
Miss Islington (bot) [Fri, 31 May 2024 17:27:55 +0000 (19:27 +0200)] 
[3.13] gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. (GH-119364) (#119869)

gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. (GH-119364)
(cherry picked from commit 015b1fdd0ae03f94a5dfda051b020810d1c952dd)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
17 months agogh-119690: Adds Unicode support for named pipes in _winapi (GH-119717)
Miss Islington (bot) [Fri, 31 May 2024 16:22:30 +0000 (18:22 +0200)] 
gh-119690: Adds Unicode support for named pipes in _winapi (GH-119717)

(cherry picked from commit 78d697b7d5ec2a6fa046b0e1c34e804f49e750b4)

Co-authored-by: Steve Dower <steve.dower@python.org>
17 months ago[3.13] gh-119585: Fix crash involving `PyGILState_Release()` and `PyThreadState_Clear...
Miss Islington (bot) [Fri, 31 May 2024 15:29:50 +0000 (17:29 +0200)] 
[3.13] gh-119585: Fix crash involving `PyGILState_Release()` and `PyThreadState_Clear()` (GH-119753) (#119859)

Make sure that `gilstate_counter` is not zero in when calling
`PyThreadState_Clear()`. A destructor called from `PyThreadState_Clear()` may
call back into `PyGILState_Ensure()` and `PyGILState_Release()`. If
`gilstate_counter` is zero, it will try to create a new thread state before
the current active thread state is destroyed, leading to an assertion failure
or crash.
(cherry picked from commit bcc1be39cb1d04ad9fc0bd1b9193d3972835a57c)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.13] gh-111201: Support pyrepl on Windows (GH-119559) (GH-119850)
Miss Islington (bot) [Fri, 31 May 2024 15:18:28 +0000 (17:18 +0200)] 
[3.13] gh-111201: Support pyrepl on Windows (GH-119559) (GH-119850)

(cherry picked from commit 0d07182821fad7b95a043d006f1ce13a2d22edcb)

Co-authored-by: Dino Viehland <dinoviehland@gmail.com>
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
17 months agogh-116145: Updated bundled Tcl/Tk on Windows to 8.6.14 (GH-117030)
Miss Islington (bot) [Fri, 31 May 2024 12:38:03 +0000 (14:38 +0200)] 
gh-116145: Updated bundled Tcl/Tk on Windows to 8.6.14 (GH-117030)

(cherry picked from commit 0e8d35b931f41210483cc51c4169e9a943c7f166)

Co-authored-by: Steve Dower <steve.dower@python.org>
17 months ago[3.13] gh-103194: Fix Tkinter’s Tcl value type handling for Tcl 8.7/9.0 (GH-103846...
Miss Islington (bot) [Fri, 31 May 2024 10:42:24 +0000 (12:42 +0200)] 
[3.13] gh-103194: Fix Tkinter’s Tcl value type handling for Tcl 8.7/9.0 (GH-103846) (GH-119830)

Some of standard Tcl types were renamed, removed, or no longer
registered in Tcl 8.7/9.0. This change fixes automatic conversion of Tcl
values to Python values to avoid returning a Tcl_Obj where the primary
Python types (int, bool, str, bytes) were returned in older Tcl.
(cherry picked from commit 94e9585e99abc2d060cedc77b3c03e06b4a0a9c4)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
17 months ago[3.13] gh-111201: Improve pyrepl auto indentation (GH-119606) (GH-119833)
Miss Islington (bot) [Fri, 31 May 2024 09:51:53 +0000 (11:51 +0200)] 
[3.13] gh-111201: Improve pyrepl auto indentation (GH-119606) (GH-119833)

- auto-indent when editing multi-line block
- ignore comments

(cherry picked from commit dae0375bd97f3821c5db1602a0653a3c5dc53c5b)

Co-authored-by: Arnon Yaari <wiggin15@yahoo.com>
17 months ago[3.13] gh-97747: Improvements to WASM browser REPL. (GH-97665) (GH-119828)
Miss Islington (bot) [Fri, 31 May 2024 09:25:39 +0000 (11:25 +0200)] 
[3.13] gh-97747: Improvements to WASM browser REPL. (GH-97665) (GH-119828)

(cherry picked from commit 010aaa32fb93c5033a698d7213469af02d76fef3)

Co-authored-by: Katie Bell <katie@katharos.id.au>
17 months ago[3.13] gh-119548: Add a 'clear' command to the REPL (GH-119549) (#119552)
Miss Islington (bot) [Fri, 31 May 2024 08:35:21 +0000 (10:35 +0200)] 
[3.13] gh-119548: Add a 'clear' command to the REPL (GH-119549) (#119552)

gh-119548: Add a 'clear' command to the REPL (GH-119549)
(cherry picked from commit e3bac04c37f6823cebc74d97feae0e0c25818b31)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
17 months ago[3.13] gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322) (GH-119806)
Miss Islington (bot) [Thu, 30 May 2024 21:16:35 +0000 (23:16 +0200)] 
[3.13] gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322) (GH-119806)

(cherry picked from commit 9732ed5ca94cd8fe9ca2fc7ba5a42dfa2b7791ea)

Co-authored-by: James De Bias <81095953+DBJim@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 months ago[3.13] Docs: `shutil.rmtree`'s `onerror` has no pending removal version (GH-118947...
Miss Islington (bot) [Thu, 30 May 2024 20:52:43 +0000 (22:52 +0200)] 
[3.13] Docs: `shutil.rmtree`'s `onerror` has no pending removal version (GH-118947) (#119804)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>