Commit Graph

52688 Commits

Author SHA1 Message Date
Miss Islington (bot) f561258efd
[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 4bba1c9e6c)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-06-05 13:46:17 +00:00
Miss Islington (bot) 71f86eedeb
[3.13] gh-119819: Update logging configuration to support joinable multiproc… (GH-120090) (GH-120093)
(cherry picked from commit 983efcf15b)
2024-06-05 07:59:41 +01:00
Miss Islington (bot) 4ac0ccf9d3
[3.13] gh-119553: Fix console when pressing Ctrl-C within a multiline block (GH-120075) (#120076)
(cherry picked from commit 69b3e8ea56)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2024-06-04 21:44:33 +00:00
Miss Islington (bot) a9e807fe44
[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 710cbea660)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-04 20:18:33 +00:00
Miss Islington (bot) 7edc6bd627
[3.13] gh-119819: Update test to skip if _multiprocessing is unavailable. (GH-120067) (GH-120072)
(cherry picked from commit 109e1082ea)
2024-06-04 20:50:48 +01:00
Łukasz Langa eea45ea213
[3.13] gh-119842: Honor PyOS_InputHook in the new REPL (GH-119843) (GH-120066)
(cherry picked from commit d9095194dd)

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>
2024-06-04 21:26:10 +02:00
Miss Islington (bot) 93b95e91fa
[3.13] gh-119553: Clear reader on Ctrl-C command (GH-119801) (#120062)
(cherry picked from commit 010ea93b2b)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-06-04 18:45:22 +00:00
Miss Islington (bot) fd5428d2d1
[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 d419d468ff)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-06-04 18:11:01 +00:00
Miss Islington (bot) 8d74eae4d4
[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 8fc7653766)

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

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2024-06-04 18:10:29 +00:00
Miss Islington (bot) 2acbdc23ad
[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 7111d9605f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-04 17:19:13 +00:00
Miss Islington (bot) 34a6d89788
[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 42a34ddb0b)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-06-04 10:56:06 -04:00
Miss Islington (bot) 23ebf87eaa
[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 8d63c8d47b)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-06-04 10:54:59 -04:00
Miss Islington (bot) 720a44d414
[3.13] gh-119819: Fix regression to allow logging configuration with multipr… (GH-120030) (GH-120035)
(cherry picked from commit 99d945c0c0)
2024-06-04 13:46:41 +01:00
Miss Islington (bot) feaecf8c33
[3.13] gh-118868: logging QueueHandler fix passing of kwargs (GH-118869) (GH-120032)
(cherry picked from commit dce14bb2dc)
2024-06-04 13:18:11 +01:00
Miss Islington (bot) 6ce2810f36
[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 5c48eb0cc6)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-06-04 13:24:10 +02:00
T. Wouters 6be55f1bed
[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 1c8f912ebd.
(cherry picked from commit 31a4fb3c74)
2024-06-04 08:36:16 +02:00
Sam Gross 79fae3b0a1
[3.13] gh-117657: Fix itertools.count thread safety (GH-119268) (#120007)
Fix itertools.count in free-threading mode
(cherry picked from commit 87939bd579)

Co-authored-by: Arnon Yaari <wiggin15@yahoo.com>
2024-06-03 22:47:34 +00:00
Sam Gross ae705319fc
[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 47fb4327b5)
2024-06-03 22:21:32 +00:00
Miss Islington (bot) 6b10467fbc
[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 2e0aa731ae)

Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
2024-06-03 17:31:26 +00:00
Miss Islington (bot) 060d846f43
[3.13] Use Cirrus M1 macOS runners for CI (GH-119979) (GH-119986)
(cherry picked from commit 6acb32fac3)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Ee Durbin <ee@python.org>
2024-06-03 18:15:37 +02:00
Miss Islington (bot) c3fc3a2db8
[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 4223f1d828)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-06-03 09:10:39 +00:00
Victor Stinner ac35d9621b
[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 91601a5596)
2024-06-01 21:21:13 +00:00
Miss Islington (bot) 225c3cd6c1
[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 53b1981fb0)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-06-01 20:38:55 +01:00
Miss Islington (bot) 0ea77d49cc
[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 cf3bba3f06)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-06-01 16:27:54 +00:00
Jelle Zijlstra a0559849ac
[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 80a4e38994)
2024-05-31 21:56:26 -07:00
Miss Islington (bot) 0a266f7e74
[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 3859e09e3d)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-06-01 04:23:04 +00:00
Miss Islington (bot) a5272e63ef
[3.13] gh-118894: Make asyncio REPL use pyrepl (GH-119433) (#119884)
(cherry picked from commit 2237946af0)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-05-31 17:15:44 -04:00
Miss Islington (bot) 8e0777df1f
gh-119690: Adds Unicode support for named pipes in _winapi (GH-119717)
(cherry picked from commit 78d697b7d5)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-05-31 16:22:30 +00:00
Miss Islington (bot) ea48de4f4f
[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 bcc1be39cb)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-05-31 15:29:50 +00:00
Miss Islington (bot) d6faac6d1f
[3.13] gh-111201: Support pyrepl on Windows (GH-119559) (GH-119850)
(cherry picked from commit 0d07182821)

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>
2024-05-31 17:18:28 +02:00
Miss Islington (bot) 38bf39cb4b
[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 dae0375bd9)

Co-authored-by: Arnon Yaari <wiggin15@yahoo.com>
2024-05-31 11:51:53 +02:00
Miss Islington (bot) 8470593a98
[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 e3bac04c37)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2024-05-31 08:35:21 +00:00
Miss Islington (bot) 978b86a91e
[3.13] gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322) (GH-119806)
(cherry picked from commit 9732ed5ca9)

Co-authored-by: James De Bias <81095953+DBJim@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-30 21:16:35 +00:00
Miss Islington (bot) d6bede815d
[3.13] gh-119791: Fix new Tkinter tests for wantobjects=0 (GH-119792) (GH-119794)
PhotoImage.get() retruns a string instead of a 3-tuple of integers
in this case.
(cherry picked from commit e875c2d752)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-30 19:16:57 +00:00
Miss Islington (bot) 083bf3ad17
[3.13] GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (GH-119766) (#119767)
GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (GH-119766)

Follow-up to 3c890b50. Ensure we `os.close()` open file descriptors when
the `os.fwalk()` generator is finalized.
(cherry picked from commit a5fef800d3)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-05-30 04:40:21 +00:00
Miss Islington (bot) 810a09ad37
[3.13] GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638) (#119764)
GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638)

Implement `os.fwalk()` using a list as a stack to avoid emitting recursion
errors on deeply nested trees.
(cherry picked from commit 3c890b503c)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-05-30 03:28:55 +00:00
Miss Islington (bot) 06c62d697a
[3.13] gh-119260: Clarify is_dataclass Behavior for Subclasses in Documentation and Tests (GH-119480) (#119760)
gh-119260: Clarify is_dataclass Behavior for Subclasses in Documentation and Tests (GH-119480)
(cherry picked from commit bf4ff3ad2e)

Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com>
Co-authored-by: Carl Meyer <carl@oddbird.net>
2024-05-30 01:28:31 +00:00
Eric Snow af57832e63
[3.13] gh-117398: Add multiphase support to _datetime (gh-119694)
This is an unrevert of d58ebf0 (gh-119636), which was reverted by 9216a53 (gh-119639) due to problems which have been resolved.

This is minimal support for multiphase init. Subinterpreters are not supported yet. That will be addressed in a later change.

(cherry picked from commit 3e8b609)

Co-authored-by: Erlend E. Aasland erlend@python.org
2024-05-29 15:54:47 -06:00
Miss Islington (bot) a7aa7c41eb
[3.13] GH-119169: Implement `pathlib.Path.walk()` using `os.walk()` (GH-119573) (#119750)
GH-119169: Implement `pathlib.Path.walk()` using `os.walk()` (GH-119573)

For silly reasons, pathlib's generic implementation of `walk()` currently
resides in `glob._Globber`. This commit moves it into
`pathlib._abc.PathBase.walk()` where it really belongs, and makes
`pathlib.Path.walk()` call `os.walk()`.
(cherry picked from commit 7ff61f51b6)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-05-29 21:24:42 +00:00
Miss Islington (bot) 061abf8e4c
[3.13] GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees (GH-119634) (#119748)
GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees (GH-119634)

Make `shutil._rmtree_unsafe()` call `os.walk()`, which is implemented
without recursion.

`shutil._rmtree_safe_fd()` is not affected and can still raise a recursion
error.

(cherry picked from commit a150679f90)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-29 20:41:03 +00:00
Miss Islington (bot) c3cfc04a73
gh-119070: Fix py.exe handling of /usr/bin/env commands missing extension (GH-119426)
(cherry picked from commit df93f5d4bf)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-05-29 20:06:38 +00:00
Miss Islington (bot) 40a024c983
[3.13] gh-119555: catch SyntaxError from compile() in the InteractiveColoredConsole (GH-119557) (#119709) 2024-05-29 12:04:45 +01:00
Miss Islington (bot) 17d3398486
[3.13] gh-119443: Turn off from __future__ import annotations in REPL (GH-119493) (#119697)
gh-119443: Turn off from __future__ import annotations in REPL (GH-119493)
(cherry picked from commit a8e35e8eba)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-29 01:26:19 +00:00
Miss Islington (bot) c0e9961798
[3.13] gh-119011: `type.__type_params__` now return an empty tuple (GH-119296) (#119678)
(cherry picked from commit 6b240c2308)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-28 19:09:04 +00:00
Jelle Zijlstra 6394a72e99
[3.13] gh-119311: Fix name mangling with PEP 695 generic classes (#119464) (#119643)
Fixes #119311. Fixes #119395.

(cherry picked from commit a9a74da4a0)
2024-05-28 11:03:33 -07:00
Miss Islington (bot) 2b46253c5f
[3.13] gh-119581: Add a test of InitVar with name shadowing (GH-119582) (#119672)
gh-119581: Add a test of InitVar with name shadowing (GH-119582)
(cherry picked from commit 6ec371223d)

Co-authored-by: Steven Troxler <steven.troxler@gmail.com>
2024-05-28 17:41:02 +00:00
Miss Islington (bot) cc8586a1ed
[3.13] Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409) (GH-119483)
Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409)
(cherry picked from commit ffa24aab10)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-05-28 16:55:37 +02:00
Miss Islington (bot) dcf585d0c1
[3.13] Re-order imports to align with zipp 3.18.2 (GH-119587) (#119589)
Re-order imports to align with zipp 3.18.2 (GH-119587)
(cherry picked from commit 5482a939ac)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2024-05-28 08:49:13 -04:00
Miss Islington (bot) 3b111a38ea
[3.13] gh-116860: Remove outdated `test_parserhack` from `test_future` (GH-116861) (#119649)
gh-116860: Remove outdated `test_parserhack` from `test_future` (GH-116861)
(cherry picked from commit 669175bf8e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-28 09:55:37 +00:00
Eric Snow 9216a5336f
[3.13] gh-117398: Revert gh-119636, Add multiphase support to _datetime (#119639)
Revert "[3.13] gh-117398: Add multiphase support to _datetime (gh-119373) (gh-119636)"

This reverts commit d58ebf073c.
2024-05-28 00:52:52 +00:00