Commit Graph

122686 Commits

Author SHA1 Message Date
Miss Islington (bot) e992cc3922
[3.13] gh-120289: Add external timer in traverse of _lsprof.Profiler (GH-121998) (#122000)
gh-120289: Add external timer in traverse of _lsprof.Profiler (GH-121998)
(cherry picked from commit eaf094c09b)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-07-19 04:10:11 +00:00
Miss Islington (bot) 721a7dde11
[3.13] gh-120289: Disallow disable() and clear() in external timer to prevent use-after-free (GH-120297) (#121984)
gh-120289: Disallow disable() and clear() in external timer to prevent use-after-free (GH-120297)
(cherry picked from commit 1ab1778283)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-07-18 13:26:47 -07:00
Miss Islington (bot) 53774e911d
[3.13] gh-121946: Temporarily switch to llvm-17 in TSan CI (GH-121975) (#121981)
The Ubuntu package for llvm-18 is broken
(cherry picked from commit 12c1afa9d1)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-18 17:55:22 +00:00
Miss Islington (bot) 233ed46e6d
[3.13] gh-118934: Make PyEval_GetLocals return borrowed reference (GH-119769) (#121869)
gh-118934: Make PyEval_GetLocals return borrowed reference (GH-119769)
(cherry picked from commit e65cb4c6f0)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-07-19 01:38:28 +10:00
Thomas Wouters 98e7d44712 Post 3.13.0b4 2024-07-18 15:53:44 +02:00
Thomas Wouters 567c38b4eb Python 3.13.0b4 2024-07-18 11:41:38 +02:00
Miss Islington (bot) afa5321c6c
[3.13] gh-121621: Move asyncio_running_loop to private struct (GH-121939) (#121943)
gh-121621: Move asyncio_running_loop to private struct (GH-121939)

This avoids changing the ABI and keeps the field in the private struct.
(cherry picked from commit 81fd625b5c)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-18 01:52:39 -07:00
Miss Islington (bot) a12c105908
[3.13] Add note about PYTHON_JIT environment variable to JIT README (GH-121942)
(cherry picked from commit f113c1a2a9)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-07-17 22:18:39 +00:00
Miss Islington (bot) f7b2b2a8fb
[3.13] gh-121528: Fix _PyObject_Init() assertion for stable ABI (GH-121725) (#121936)
gh-121528: Fix _PyObject_Init() assertion for stable ABI (GH-121725)

Add _Py_IsImmortalLoose() function for assertions.
(cherry picked from commit b826e459ca)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-07-17 20:14:22 +00:00
Miss Islington (bot) 449529a8c2
[3.13] gh-121925: Fix uninitialized variables in `main.c` (GH-121926) (#121931)
gh-121925: Fix uninitialized variables in `main.c` (GH-121926)
(cherry picked from commit f4bc84d261)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-07-17 17:00:42 +00:00
Miss Islington (bot) 91e098f44d
[3.13] gh-120678: Guard against stdin.fileno() being unavailable (GH-121924) (#121929)
gh-120678: Guard against stdin.fileno() being unavailable (GH-121924)
(cherry picked from commit 19cbf8fd63)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-17 16:33:28 +00:00
T. Wouters ea364204db
[3.13] Move misplaced blurb entries (#121919)
Move misplaced blurb entries from "C_API" to "C API", and from "Core_and_Builtins" to "Core and Builtins".
2024-07-17 15:33:30 +00:00
Miss Islington (bot) 3d9692dbf8
[3.13] gh-120678: pyrepl: Include globals from modules passed with `-i` (GH-120904) (#121916)
(cherry picked from commit ac07451116)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-17 16:52:46 +02:00
Miss Islington (bot) 5a8e1373fe
[3.13] gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz (GH-121876) (#121911)
gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz (GH-121876)

Problem occurred when attribute xyz could not be pickled.
Since this is not trivial to selectively fix, block all
attributes (other than 'width').  IDLE does not access them
and they are private implementation details.
(cherry picked from commit 58753f33e4)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-07-17 14:10:13 +00:00
Miss Islington (bot) c6ef5aca61
[3.13] gh-119698: fix a special case in `symtable.Class.get_methods` (GH-121802) (#121909)
(cherry picked from commit 6682d91678)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-17 13:54:40 +00:00
Petr Viktorin 4395d68c70
[3.13] gh-113993: Don't immortalize in PyUnicode_InternInPlace; keep immortalizing in other API (GH-121364) (GH-121854)
* Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal, clarify docs

* Document immortality in some functions that take `const char *`

This is PyUnicode_InternFromString;
PyDict_SetItemString, PyObject_SetAttrString;
PyObject_DelAttrString; PyUnicode_InternFromString;
and the PyModule_Add convenience functions.

Always point out a non-immortalizing alternative.

* Don't immortalize user-provided attr names in _ctypes
(cherry picked from commit b4aedb23ae)
2024-07-17 14:51:42 +02:00
Miss Islington (bot) 72cd53ea15
[3.13] gh-121863: Immortalize names in code objects to avoid crash (GH-121903) (GH-121904)
(cherry picked from commit cffad5c6ef)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-07-17 09:55:22 +00:00
Serhiy Storchaka 09ff4ec14f
[3.13] gh-121153: Fix some errors with use of _PyLong_CompactValue() (GH-121154) (GH-121900)
* The result has type Py_ssize_t, not intptr_t.
* Type cast between unsigned and signed integer types should be explicit.
* Downcasting should be explicit.
* Fix integer overflow check in sum().
(cherry picked from commit 1801545)
2024-07-17 08:04:45 +00:00
Miss Islington (bot) d358f74a69
[3.13] Remove duplicate "it" in whatsnew 3.13 (GH-121580) (gh-121899) 2024-07-17 07:52:22 +00:00
Miss Islington (bot) bcf1c7004d
[3.13] gh-121834: Improve `complex` C-API docs (GH-121835) (#121895)
gh-121834: Improve `complex` C-API docs (GH-121835)
(cherry picked from commit 72dccd6073)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-07-17 07:25:07 +00:00
Miss Islington (bot) 96c524cef6
[3.13] gh-121842: Improve coverage of `PyBytes_FromStringAndSize` (GH-121843) (#121893)
gh-121842: Improve coverage of `PyBytes_FromStringAndSize` (GH-121843)
(cherry picked from commit f6c7d8d79c)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-07-17 07:24:44 +00:00
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