| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
| |
(#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>
|
| |
|
|
| |
(cherry picked from commit f113c1a2a9d4fb2860de1bd8c05677f00fd49bd9)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
(#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>
|
| |
|
|
|
|
| |
gh-121925: Fix uninitialized variables in `main.c` (GH-121926)
(cherry picked from commit f4bc84d261c828ed81f137f2a48fa2f0de7a0211)
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
| |
(#121929)
gh-120678: Guard against stdin.fileno() being unavailable (GH-121924)
(cherry picked from commit 19cbf8fd636192059550d0c908c3e29797feed1f)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
| |
Move misplaced blurb entries from "C_API" to "C API", and from "Core_and_Builtins" to "Core and Builtins".
|
| |
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
| |
(GH-121802) (#121909)
(cherry picked from commit 6682d916780c1cb305e679a057ee6992b114118e)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
| |
(GH-121903) (GH-121904)
(cherry picked from commit cffad5c6ef9371b26e32556296cea2bfe8358b1a)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
(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)
|
| | |
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
(GH-121843) (#121893)
gh-121842: Improve coverage of `PyBytes_FromStringAndSize` (GH-121843)
(cherry picked from commit f6c7d8d79c4e17167af98f2e0cb4b1e55d7b5d3c)
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
(GH-121872) (#121888)
Co-authored-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
|
| |
|
|
|
|
|
| |
(GH-121880)
(cherry picked from commit f036a463dbc43d25712183dc6afa4e38c1aaf93d)
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
| |
(cherry picked from commit 4e35dd607b0f32657341e6c4f583d14964ee1699)
Authored-by: Zachary Ware <zach@python.org>
|
| |
|
|
|
|
|
|
|
| |
(#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>
|
| |
|
|
|
| |
(GH-121150) (#121868)
(cherry picked from commit c46d64e0ef8e92a6b4ab4805d813d7e4d6663380)
|
| |
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
|
| |
(#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>
|
| |
|
|
|
|
|
|
| |
(GH-121856)
(cherry picked from commit 263c7e611bb24715e513d457a3477a61fff15162)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
|
|
|
| |
(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>
|
| |
|
|
| |
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk@sydorenko.org.ua>
|
| |
|
|
|
|
|
|
|
|
|
| |
_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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
(GH-120318) (#121841)
(cherry picked from commit 8549559f383dfcc0ad0c32496f62a4b737c05b4f)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
(GH-121815) (GH-121826)
(cherry picked from commit 498a94c198e72525b8a7f4cb4f4a8957560f593a)
Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
| |
(cherry picked from commit e5c7216f376a06d2c931daf999e2980e494e747e)
Co-authored-by: Milan Oberkirch <milan.oberkirch@geops.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
|
|
|
| |
(#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>
|
| |
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
| |
(cherry picked from commit 05d413764c8ae793b8321c21cb10094c934b8cb3)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
_Py_FinishPendingCalls() (gh-121806)
(cherry picked from commit 985dd8e17b55ae35fc31546384fc9364f2f59f86, AKA gh-118298)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 6522f0e438a8c56a8f3cce2095b193ea6e3f5016)
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
|
| |
|
|
|
|
| |
(cherry picked from commit 5d6861ad06b524358f52603f242e7c0d57532a58)
Co-authored-by: Ken Jin <kenjin@python.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|