summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.13.0b4v3.13.0b4Thomas Wouters2024-07-1850-156/+575
|
* [3.13] gh-121621: Move asyncio_running_loop to private struct (GH-121939) ↵Miss Islington (bot)2024-07-184-8/+8
| | | | | | | | | | (#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 81fd625b5c30cc6f417c93bad404923676ad8ca3) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] Add note about PYTHON_JIT environment variable to JIT README (GH-121942)Miss Islington (bot)2024-07-171-2/+6
| | | | (cherry picked from commit f113c1a2a9d4fb2860de1bd8c05677f00fd49bd9) Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
* [3.13] gh-121528: Fix _PyObject_Init() assertion for stable ABI (GH-121725) ↵Miss Islington (bot)2024-07-171-2/+26
| | | | | | | | | | (#121936) gh-121528: Fix _PyObject_Init() assertion for stable ABI (GH-121725) Add _Py_IsImmortalLoose() function for assertions. (cherry picked from commit b826e459ca6b640f896c2a9551bb2c78d10f0e2b) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.13] gh-121925: Fix uninitialized variables in `main.c` (GH-121926) (#121931)Miss Islington (bot)2024-07-171-2/+6
| | | | | | gh-121925: Fix uninitialized variables in `main.c` (GH-121926) (cherry picked from commit f4bc84d261c828ed81f137f2a48fa2f0de7a0211) Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.13] gh-120678: Guard against stdin.fileno() being unavailable (GH-121924) ↵Miss Islington (bot)2024-07-171-6/+14
| | | | | | | | (#121929) gh-120678: Guard against stdin.fileno() being unavailable (GH-121924) (cherry picked from commit 19cbf8fd636192059550d0c908c3e29797feed1f) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] Move misplaced blurb entries (#121919)T. Wouters2024-07-173-0/+0
| | | Move misplaced blurb entries from "C_API" to "C API", and from "Core_and_Builtins" to "Core and Builtins".
* [3.13] gh-120678: pyrepl: Include globals from modules passed with `-i` ↵Miss Islington (bot)2024-07-176-11/+178
| | | | | | | | (GH-120904) (#121916) (cherry picked from commit ac07451116d52dd6a5545d27b6a2e3737ed27cf0) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-78889: Stop IDLE Shell freezes from sys.stdout.shell.xyz ↵Miss Islington (bot)2024-07-173-0/+8
| | | | | | | | | | | | | (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 58753f33e47fe48906883dc010771f68c13b7e52) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.13] gh-119698: fix a special case in `symtable.Class.get_methods` ↵Miss Islington (bot)2024-07-172-2/+68
| | | | | | | (GH-121802) (#121909) (cherry picked from commit 6682d916780c1cb305e679a057ee6992b114118e) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.13] gh-113993: Don't immortalize in PyUnicode_InternInPlace; keep ↵Petr Viktorin2024-07-176-10/+83
| | | | | | | | | | | | | | | | | 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 b4aedb23ae7954fb58084dda16cd41786819a8cf)
* [3.13] gh-121863: Immortalize names in code objects to avoid crash ↵Miss Islington (bot)2024-07-172-1/+25
| | | | | | | (GH-121903) (GH-121904) (cherry picked from commit cffad5c6ef9371b26e32556296cea2bfe8358b1a) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.13] gh-121153: Fix some errors with use of _PyLong_CompactValue() ↵Serhiy Storchaka2024-07-172-15/+57
| | | | | | | | | (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)
* [3.13] Remove duplicate "it" in whatsnew 3.13 (GH-121580) (gh-121899)Miss Islington (bot)2024-07-171-1/+1
|
* [3.13] gh-121834: Improve `complex` C-API docs (GH-121835) (#121895)Miss Islington (bot)2024-07-171-9/+22
| | | | | | | | gh-121834: Improve `complex` C-API docs (GH-121835) (cherry picked from commit 72dccd60735b597e99c007a7b69210763a746877) Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.13] gh-121842: Improve coverage of `PyBytes_FromStringAndSize` ↵Miss Islington (bot)2024-07-171-0/+2
| | | | | | | | (GH-121843) (#121893) gh-121842: Improve coverage of `PyBytes_FromStringAndSize` (GH-121843) (cherry picked from commit f6c7d8d79c4e17167af98f2e0cb4b1e55d7b5d3c) Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.13] gh-121453: Update the `Doc/templates/download.html` download files ↵Miss Islington (bot)2024-07-171-10/+14
| | | | | | | 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>
* [3.13] gh-121871: Allow overriding docs build date with SOURCE_DATE_EPOCH ↵Miss Islington (bot)2024-07-171-1/+2
| | | | | | (GH-121872) (#121888) Co-authored-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
* [3.13] GH-121583: Remove dependency from pystats.h to internal header file ↵Miss Islington (bot)2024-07-162-5/+9
| | | | | | | (GH-121880) (cherry picked from commit f036a463dbc43d25712183dc6afa4e38c1aaf93d) Co-authored-by: Michael Droettboom <mdboom@gmail.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* [3.13] GH-120371: Add WASI SDK 22 support (GH-121870) (GH-121873)Miss Islington (bot)2024-07-164-2/+12
| | | | | | | | GH-120371: Add WASI SDK 22 support (GH-121870) Required disabling stub functions now provided by wasi-libc. (cherry picked from commit f589f263bcb54332e47bfc76cbb06f775e82b778) Co-authored-by: Brett Cannon <brett@python.org>
* [3.13] gh-83648: Use versionadded in 'deprecated' description (GH-121878)Miss Islington (bot)2024-07-161-1/+1
| | | | | (cherry picked from commit 4e35dd607b0f32657341e6c4f583d14964ee1699) Authored-by: Zachary Ware <zach@python.org>
* [3.13] gh-121860: Fix crash when materializing managed dict (GH-121866) ↵Miss Islington (bot)2024-07-163-5/+31
| | | | | | | | | (#121867) The object's inline values may be marked invalid if the materialized dict was already initialized and then deleted. (cherry picked from commit 162b41f57757c1df40eb377985e2e877fb0f0ea3) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-121130: Fix f-string format specifiers with debug expressions ↵Pablo Galindo Salgado2024-07-168-1022/+4043
| | | | | (GH-121150) (#121868) (cherry picked from commit c46d64e0ef8e92a6b4ab4805d813d7e4d6663380)
* [3.13] gh-121621: Move asyncio running loop to thread state (GH-121695) ↵Miss Islington (bot)2024-07-167-111/+18
| | | | | | | | (GH-121864) gh-121621: Move asyncio running loop to thread state (GH-121695) (cherry picked from commit 69c68de43aef03dd52fabd21f99cb3b0f9329201) Co-authored-by: Ken Jin <kenjin@python.org>
* [3.13] gh-121814: Only check f_trace_opcodes if Python frame exists ↵Miss Islington (bot)2024-07-162-1/+2
| | | | | | | | | (GH-121818) (#121861) gh-121814: Only check f_trace_opcodes if Python frame exists (GH-121818) (cherry picked from commit 2b1b68939b15b913080a3403e3ba18e2a1f520ef) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com> Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
* [3.13] GH-105879: Note exec/eval keyword change in What's New (GH-121831) ↵Miss Islington (bot)2024-07-161-0/+4
| | | | | | | | | (#121852) GH-105879: Note exec/eval keyword change in What's New (GH-121831) (cherry picked from commit d7a099d7ae749798bd822aee5d1d46d0a335189b) Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-121160: Add some tests for readline.set_history_length (GH-121326) ↵Miss Islington (bot)2024-07-162-0/+48
| | | | | | | | (GH-121856) (cherry picked from commit 263c7e611bb24715e513d457a3477a61fff15162) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.13] gh-121403: Add notes for PyList_GetXXX APIs about the need for init ↵Miss Islington (bot)2024-07-161-3/+6
| | | | | | | | (gh-121626) (gh-121827) gh-121403: Add notes for PyList_GetXXX APIs about the need for init (gh-121626) (cherry picked from commit 2bac2b86b1486f15038fb246835e04bb1b213cd8) Co-authored-by: Donghee Na <donghee.na@python.org>
* [3.13] CI: Fix using `check_source` flags as bool (GH-121848) (#121853)Miss Islington (bot)2024-07-162-5/+25
| | | | Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk@sydorenko.org.ua>
* [3.13] gh-113993: For string interning, do not rely on (or assert) ↵Miss Islington (bot)2024-07-162-7/+10
| | | | | | | | | | | _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 956270d08d5c23f59937e2f29f8e0b7f63d68afd) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.13] gh-120522: Revert "Add a `--with-app-store-compliance` configure ↵Miss Islington (bot)2024-07-169-238/+2
| | | | | | | | | option to patch out problematic code" (GH-121844) (#121845) This reverts commit 0dfb437a32f9b9a8a0ae61d8c43c47417651f44e prior to the release of 3.13.0b4 to allow for additional review time. (cherry picked from commit f27593a87c344f3774ca73644a11cbd5614007ef) Co-authored-by: Ned Deily <nad@python.org>
* [3.13] gh-120317: Lock around global state in the tokenize module ↵Miss Islington (bot)2024-07-162-43/+129
| | | | | | | | (GH-120318) (#121841) (cherry picked from commit 8549559f383dfcc0ad0c32496f62a4b737c05b4f) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* [3.13] gh-121791: Check for `NULL` in `MethodDescriptor2_new` in `_testcapi` ↵Miss Islington (bot)2024-07-161-0/+3
| | | | | | | | (GH-121792) (#121839) gh-121791: Check for `NULL` in `MethodDescriptor2_new` in `_testcapi` (GH-121792) (cherry picked from commit 8b6d4755812d0b02e9f26beb9c9a7714e4c5ac28) Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.13] gh-119189: Fix the power operator for Fraction (GH-119242) (GH-119836)Miss Islington (bot)2024-07-164-6/+12
| | | | | | | | 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 b9965ef282d6662145d2e05b080c811132ce6fde) Co-authored-by: Joshua Herman <30265+zitterbewegung@users.noreply.github.com>
* [3.13] gh-121295: Fix blocked console after interrupting a long paste ↵Miss Islington (bot)2024-07-162-1/+11
| | | | | | | (GH-121815) (GH-121826) (cherry picked from commit 498a94c198e72525b8a7f4cb4f4a8957560f593a) Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
* [3.13] gh-121610: pyrepl - handle extending blocks when multi-statement ↵Miss Islington (bot)2024-07-162-11/+123
| | | | | | | | | | | | | | | 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 7d111dac160c658b277ec0fac75eee8edcfbe9dc) Co-authored-by: saucoide <32314353+saucoide@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-120831: Increase the default minimum supported iOS version to 13.0 ↵Miss Islington (bot)2024-07-165-5/+23
| | | | | | | | | | | | (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 7e91e0dcfe2faab1e1a4630e6f745aa30ca87b3d) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.13] gh-121605: Fix test hang when pyrepl is not available (GH-121820) ↵Miss Islington (bot)2024-07-151-1/+1
| | | | | | | | | (GH-121823) The fallback repl does not support "exit" without parentheses, so the test would hang until the timeout expired. (cherry picked from commit 4134261ab831863565fefc7a04d05a1fc1bca2f8) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-121790: Fix interactive console initialization (GH-121793) (GH-121822)Miss Islington (bot)2024-07-156-42/+85
| | | | | | (cherry picked from commit e5c7216f376a06d2c931daf999e2980e494e747e) Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-121794: Don't set `ob_tid` to zero in fast-path dealloc ↵Miss Islington (bot)2024-07-153-13/+62
| | | | | | | | | | | | | | | | | (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 d23be3947ced081914f4458c84f729c9c37f0219) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-117657: Skip tests that fork with threads under TSan (GH-121599) ↵Miss Islington (bot)2024-07-151-0/+3
| | | | | | | | | | | (#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 82a4dac9f6131954c32dac9d0277283fc5b499a9) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-121546: Disable contextvar caching on free-threading build ↵Miss Islington (bot)2024-07-152-0/+16
| | | | | | | | (GH-121740) (#121808) gh-121546: Disable contextvar caching on free-threading build (GH-121740) (cherry picked from commit e904300882055bed71cae59f8ca9161066659b7c) Co-authored-by: Ken Jin <kenjin@python.org>
* [3.13] gh-121245: Refactor site.register_readline() (GH-121659) (GH-121816)Miss Islington (bot)2024-07-153-36/+36
| | | | | | (cherry picked from commit 05d413764c8ae793b8321c21cb10094c934b8cb3) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-121359: make clean environment (no PYTHON* vars) for ↵Miss Islington (bot)2024-07-151-0/+13
| | | | | | | | test_pyrepl.TestMain (GH-121672) (GH-121810) (cherry picked from commit fd085a411ed2ccc9bde2338cf50068bc7f213ece) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-76785: Expand How Interpreter Channels Handle Interpreter ↵Miss Islington (bot)2024-07-159-306/+898
| | | | | | | | | 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 8b209fd4f8a9bf9603888bda2c44b5cfd4ebf47a, AKA gh-121805) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-121657: Display correct error message for yield from outsid… ↵Kirill Podoprigora2024-07-153-1/+8
| | | | | | | | (GH-121768) (cherry picked from commit 178e44de8f023be7a5dc400044ab61983b191f24) Co-authored-by: Gregor <36135323+gege-hoho@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.13] gh-76785: Expand How Interpreter Queues Handle Interpreter ↵Miss Islington (bot)2024-07-153-90/+513
| | | | | | | | | | | | | | | | | | | | | | | | 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 6b98b274b60a15b490d2ea85069638c037b2a9cd, AKA gh-116431) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-118297: Make Sure All Pending Calls Run in ↵Miss Islington (bot)2024-07-151-6/+28
| | | | | | | _Py_FinishPendingCalls() (gh-121806) (cherry picked from commit 985dd8e17b55ae35fc31546384fc9364f2f59f86, AKA gh-118298) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-121746: Bind Alt+Enter to "accept" in the REPL (GH-121754) (GH-121803)Miss Islington (bot)2024-07-152-1/+2
| | | | | (cherry picked from commit 6522f0e438a8c56a8f3cce2095b193ea6e3f5016) Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
* [3.13] gh-121621: Use PyMutex for writes to asyncio state (GH-121622) (#121774)Sam Gross2024-07-151-1/+12
| | | | | | (cherry picked from commit 5d6861ad06b524358f52603f242e7c0d57532a58) Co-authored-by: Ken Jin <kenjin@python.org> Co-authored-by: Kumar Aditya <kumaraditya@python.org>