Commit Graph

122765 Commits

Author SHA1 Message Date
Miss Islington (bot) 659725c6ac
[3.13] gh-121453: Update the `Doc/templates/download.html` download files size estimates and support download `.texi` format. (GH-121454) (#121890)
Co-authored-by: Wulian233 <1055917385@qq.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-07-17 06:37:33 +00:00
Miss Islington (bot) 7e5f6be763
[3.13] gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH (GH-121872) (#121888)
Co-authored-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
2024-07-17 00:12:12 -06:00
Miss Islington (bot) f888636182
[3.13] GH-121583: Remove dependency from pystats.h to internal header file (GH-121880)
(cherry picked from commit f036a463db)
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-07-16 23:03:07 +00:00
Miss Islington (bot) 2e34591f1b
[3.13] GH-120371: Add WASI SDK 22 support (GH-121870) (GH-121873)
GH-120371: Add WASI SDK 22 support (GH-121870)

Required disabling stub functions now provided by wasi-libc.
(cherry picked from commit f589f263bc)

Co-authored-by: Brett Cannon <brett@python.org>
2024-07-16 14:49:55 -07:00
Miss Islington (bot) b11a77668c
[3.13] gh-83648: Use versionadded in 'deprecated' description (GH-121878)
(cherry picked from commit 4e35dd607b)

Authored-by: Zachary Ware <zach@python.org>
2024-07-16 21:43:40 +00:00
Miss Islington (bot) 6613029084
[3.13] gh-121860: Fix crash when materializing managed dict (GH-121866) (#121867)
The object's inline values may be marked invalid if the materialized
dict was already initialized and then deleted.
(cherry picked from commit 162b41f577)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-16 19:26:01 +00:00
Pablo Galindo Salgado d24ec8a47c
[3.13] gh-121130: Fix f-string format specifiers with debug expressions (GH-121150) (#121868)
(cherry picked from commit c46d64e0ef)
2024-07-16 19:25:04 +00:00
Miss Islington (bot) 06d76c4b94
[3.13] gh-121621: Move asyncio running loop to thread state (GH-121695) (GH-121864)
gh-121621: Move asyncio running loop to thread state (GH-121695)
(cherry picked from commit 69c68de43a)

Co-authored-by: Ken Jin <kenjin@python.org>
2024-07-17 01:57:37 +08:00
Miss Islington (bot) 54db42fe2c
[3.13] gh-121814: Only check f_trace_opcodes if Python frame exists (GH-121818) (#121861)
gh-121814: Only check f_trace_opcodes if Python frame exists (GH-121818)
(cherry picked from commit 2b1b68939b)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
2024-07-16 10:13:28 -07:00
Miss Islington (bot) c11d789a4c
[3.13] GH-105879: Note exec/eval keyword change in What's New (GH-121831) (#121852)
GH-105879: Note exec/eval keyword change in What's New (GH-121831)
(cherry picked from commit d7a099d7ae)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-17 02:01:03 +10:00
Miss Islington (bot) 7c9861f9d9
[3.13] gh-121160: Add some tests for readline.set_history_length (GH-121326) (GH-121856)
(cherry picked from commit 263c7e611b)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-07-16 17:15:51 +02:00
Miss Islington (bot) e64a9db73d
[3.13] gh-121403: Add notes for PyList_GetXXX APIs about the need for init (gh-121626) (gh-121827)
gh-121403: Add notes for PyList_GetXXX APIs about the need for init (gh-121626)
(cherry picked from commit 2bac2b86b1)

Co-authored-by: Donghee Na <donghee.na@python.org>
2024-07-16 14:32:31 +00:00
Miss Islington (bot) c3dfde7b18
[3.13] CI: Fix using `check_source` flags as bool (GH-121848) (#121853)
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk@sydorenko.org.ua>
2024-07-16 14:09:05 +00:00
Miss Islington (bot) 281ffb60cc
[3.13] gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal (GH-121358) (GH-121851)
gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal (GH-121358)

Older stable ABI extensions are allowed to make immortal objects mortal.
Instead, use `_PyUnicode_STATE` (`interned` and `statically_allocated`).
(cherry picked from commit 956270d08d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-07-16 13:42:49 +00:00
Miss Islington (bot) f0e4b02c39
[3.13] gh-120522: Revert "Add a `--with-app-store-compliance` configure option to patch out problematic code" (GH-121844) (#121845)
This reverts commit 0dfb437a32 prior
to the release of 3.13.0b4 to allow for additional review time.
(cherry picked from commit f27593a87c)

Co-authored-by: Ned Deily <nad@python.org>
2024-07-16 11:14:19 +00:00
Miss Islington (bot) e45c61f736
[3.13] gh-120317: Lock around global state in the tokenize module (GH-120318) (#121841)
(cherry picked from commit 8549559f38)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2024-07-16 10:03:47 +00:00
Miss Islington (bot) 93ee63ae20
[3.13] gh-121791: Check for `NULL` in `MethodDescriptor2_new` in `_testcapi` (GH-121792) (#121839)
gh-121791: Check for `NULL` in `MethodDescriptor2_new` in `_testcapi` (GH-121792)
(cherry picked from commit 8b6d475581)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-07-16 08:55:37 +00:00
Miss Islington (bot) d02adecb42
[3.13] gh-119189: Fix the power operator for Fraction (GH-119242) (GH-119836)
When using the ** operator or pow() with Fraction as the base
and an exponent that is not rational, a float, or a complex, the
fraction is no longer converted to a float.
(cherry picked from commit b9965ef282)

Co-authored-by: Joshua Herman <30265+zitterbewegung@users.noreply.github.com>
2024-07-16 10:44:23 +03:00
Miss Islington (bot) 4a62fdf35d
[3.13] gh-121295: Fix blocked console after interrupting a long paste (GH-121815) (GH-121826)
(cherry picked from commit 498a94c198)

Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
2024-07-16 08:29:04 +02:00
Miss Islington (bot) 73f77e642a
[3.13] gh-121610: pyrepl - handle extending blocks when multi-statement blocks are pasted (GH-121757) (GH-121825)
console.compile with the "single" param throws an exception when
there are multiple statements, never allowing to adding newlines
to a pasted code block (gh-121610)

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

(cherry picked from commit 7d111dac16)

Co-authored-by: saucoide <32314353+saucoide@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-16 08:28:41 +02:00
Miss Islington (bot) a1505afd39
[3.13] gh-120831: Increase the default minimum supported iOS version to 13.0 (GH-121250) (#121833)
gh-120831: Increase the default minimum supported iOS version to 13.0 (GH-121250)

Increases the default minimum iOS version to 13.0.

(cherry picked from commit 7e91e0dcfe)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-07-16 12:57:05 +08:00
Miss Islington (bot) 0201b98d4c
[3.13] gh-121605: Fix test hang when pyrepl is not available (GH-121820) (GH-121823)
The fallback repl does not support "exit" without parentheses, so the
test would hang until the timeout expired.
(cherry picked from commit 4134261ab8)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-16 01:15:18 +02:00
Miss Islington (bot) 5b718e7fc7
[3.13] gh-121790: Fix interactive console initialization (GH-121793) (GH-121822)
(cherry picked from commit e5c7216f37)

Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-16 00:49:41 +02:00
Miss Islington (bot) 0794220a69
[3.13] gh-121794: Don't set `ob_tid` to zero in fast-path dealloc (GH-121799) (#121821)
We should maintain the invariant that a zero `ob_tid` implies the
refcount fields are merged.

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

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

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-15 22:15:23 +00:00
Miss Islington (bot) 6396c77571
[3.13] gh-117657: Skip tests that fork with threads under TSan (GH-121599) (#121819)
This avoids messages like:

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

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-15 21:10:37 +00:00
Miss Islington (bot) 0a634e3702
[3.13] gh-121546: Disable contextvar caching on free-threading build (GH-121740) (#121808)
gh-121546: Disable contextvar caching on free-threading build (GH-121740)
(cherry picked from commit e904300882)

Co-authored-by: Ken Jin <kenjin@python.org>
2024-07-15 16:53:52 -04:00
Miss Islington (bot) b506de4eb5
[3.13] gh-121245: Refactor site.register_readline() (GH-121659) (GH-121816)
(cherry picked from commit 05d413764c)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-15 22:49:18 +02:00
Miss Islington (bot) 2ee2bfe617
[3.13] gh-121359: make clean environment (no PYTHON* vars) for test_pyrepl.TestMain (GH-121672) (GH-121810)
(cherry picked from commit fd085a411e)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-15 22:32:28 +02:00
Miss Islington (bot) 835f4add60
[3.13] gh-76785: Expand How Interpreter Channels Handle Interpreter Finalization (gh-121811)
See 6b98b274b6 for an explanation of the problem and solution.  Here I've applied the solution to channels.

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

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-07-15 20:15:47 +00:00
Kirill Podoprigora c4daec4319
[3.13] gh-121657: Display correct error message for yield from outsid… (GH-121768)
(cherry picked from commit 178e44de8f)

Co-authored-by: Gregor <36135323+gege-hoho@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-15 21:25:54 +02:00
Miss Islington (bot) f19ccfdae0
[3.13] gh-76785: Expand How Interpreter Queues Handle Interpreter Finalization (gh-121807)
Any cross-interpreter mechanism for passing objects between interpreters must be very careful to respect isolation, even when the object is effectively immutable (e.g. int, str).  Here this especially relates to when an interpreter sends one of its objects, and then is destroyed while the inter-interpreter machinery (e.g. queue) still holds a reference to the object.

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

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

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

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

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

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

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

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-07-15 19:13:51 +00:00
Miss Islington (bot) ff65d1e054
[3.13] gh-118297: Make Sure All Pending Calls Run in _Py_FinishPendingCalls() (gh-121806)
(cherry picked from commit 985dd8e17b, AKA gh-118298)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-07-15 19:09:40 +00:00
Miss Islington (bot) 308857b82a
[3.13] gh-121746: Bind Alt+Enter to "accept" in the REPL (GH-121754) (GH-121803)
(cherry picked from commit 6522f0e438)

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2024-07-15 20:14:50 +02:00
Sam Gross a2a4f5ebc5
[3.13] gh-121621: Use PyMutex for writes to asyncio state (GH-121622) (#121774)
(cherry picked from commit 5d6861ad06)

Co-authored-by: Ken Jin <kenjin@python.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-07-15 10:44:35 +05:30
Miss Islington (bot) 55ff124b9c
[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 50eec501fe)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-07-14 23:17:26 +00:00
Miss Islington (bot) da58e93e4c
[3.13] Generalize reusable Windows CI jobs (GH-121766) (#121775)
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk@sydorenko.org.ua>
2024-07-14 21:46:37 +00:00
Miss Islington (bot) 767f71466d
[3.13] gh-121731: Fix mimalloc compile error on GNU/Hurd (GH-121732) (#121773)
(cherry picked from commit d005f2c186)

Co-authored-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2024-07-14 17:14:30 +00:00
Miss Islington (bot) 97b06d543f
[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 bb802db8cf)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-07-14 11:48:33 +00:00
Miss Islington (bot) 295b791cf4
[3.13] Fix cache restoration for Hypothesis CI job (GH-121756) (#121759)
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk@sydorenko.org.ua>
2024-07-14 05:47:07 -06:00
Miss Islington (bot) 8f3ffb4156
[3.13] gh-121700 Emscripten trampolines not quite right since GH-106219 (GH-121701) (GH-121744)
(cherry picked from commit 3086b86cfd)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2024-07-14 12:37:00 +02:00
Miss Islington (bot) f672ee2242
[3.13] gh-121749: Fix discrepancy in docs for `PyModule_AddObjectRef` (GH-121750) (GH-121752)
(cherry picked from commit 26dfb27712)

Co-authored-by: Dominic H <dom@dominic.sk>
2024-07-14 12:31:46 +02:00
Miss Islington (bot) dfedbdba40
[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>
2024-07-14 04:24:58 -06:00
Miss Islington (bot) f17057dab1
[3.13] gh-121698 Emscripten: Use updated WebAssembly type reflection proposal (GH-121699) (GH-121745)
(cherry picked from commit cae1526716)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2024-07-14 12:01:03 +02:00
Miss Islington (bot) 35d425e300
[3.13] gh-64308: Remove TestProgram from the unittest docs (GH-121675) (GH-121742)
(cherry picked from commit f6f4022a35)

Co-authored-by: Jan Musílek <jan.musilek@nic.cz>
2024-07-14 11:41:08 +02:00
Miss Islington (bot) e28f863bd5
[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>
2024-07-14 03:02:46 -06:00
Miss Islington (bot) e8594aadd5
[3.13] gh-121708: Improve test coverage for `unittest.util` (GH-121713) (GH-121738)
(cherry picked from commit 901ea411bf)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2024-07-14 08:32:41 +00:00
Miss Islington (bot) 48a96d23a8
[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 a2bec77d25)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-07-13 21:31:30 +00:00
Miss Islington (bot) e0643d9bd7
[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 b5805892d5)

Co-authored-by: Ulrik Södergren <ulrik@digitalfotografen.se>
2024-07-13 20:26:15 +00:00
Miss Islington (bot) f78e1aa1f0
[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 a640a605a8)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-13 16:31:50 +00:00
Miss Islington (bot) f0c29a2d9f
[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 a183474293)

Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com>
2024-07-13 18:24:52 +02:00