summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "GH-128914: Remove conditional stack effects from `bytecodes.c` and ↵Sam Gross2025-01-2312-720/+743
| | | | | | | the code generators (GH-128918)" (GH-129202) The commit introduced a ~2.5-3% regression in the free threading build. This reverts commit ab61d3f4303d14a413bc9ae6557c730ffdf7579e.
* gh-127936, PEP 757: Convert marshal module to use import/export API for ints ↵Sergey B Kirpichev2025-01-231-75/+168
| | | | | | (#128530) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-119182: Use public PyUnicodeWriter in Python-ast.c (#129209)Victor Stinner2025-01-231-35/+39
| | | | | | Replace the private _PyUnicodeWriter API with the public PyUnicodeWriter API. Use PyUnicodeWriter_WriteRepr() in ast_repr_list().
* gh-119182: Use public PyUnicodeWriter in ast_unparse.c (#129208)Victor Stinner2025-01-231-99/+114
| | | | | | | | | Replace the private _PyUnicodeWriter API with the public PyUnicodeWriter API. * Add append_char() function. * Add APPEND_CHAR() and APPEND_CHAR_FINISH() macros. * Replace APPEND_STR() and APPEND_STR_FINISH() of single character with APPEND_CHAR() and APPEND_CHAR_FINISH().
* gh-128627: Emscripten: Fix address calculation for wasm-gc trampoline (#128782)Hood Chatham2025-01-231-9/+7
| | | | Modifies the memory calculation to divide the entire memory address by 4, not just the base address.
* GH-91048: Add utils for capturing async call stack for asyncio programs and ↵Yury Selivanov2025-01-222-17/+3
| | | | | | | | | | | enable profiling (#124640) Signed-off-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org> Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com> Co-authored-by: Jacob Coffee <jacob@z7x.org> Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* gh-128863: Deprecate private C API functions (#128864)Victor Stinner2025-01-222-9/+1
| | | | | | | | | | | | | | | Deprecate private C API functions: * _PyBytes_Join() * _PyDict_GetItemStringWithError() * _PyDict_Pop() * _PyThreadState_UncheckedGet() * _PyUnicode_AsString() * _Py_HashPointer() * _Py_fopen_obj() Replace _Py_HashPointer() with Py_HashPointer(). Remove references to deprecated functions.
* GH-128682: Change a couple of functions to only steal references on success. ↵Mark Shannon2025-01-224-15/+24
| | | | | (GH-129132) Change PyTuple_FromStackRefSteal and PyList_FromStackRefSteal to only steal on success to avoid escaping
* gh-128563: Move GO_TO_INSTRUCTION and PREDICT to cases generator (GH-129115)Ken Jin2025-01-222-56/+26
|
* gh-128563: Move lltrace into the frame struct (GH-129113)Ken Jin2025-01-214-16/+20
|
* gh-128679: Use _PyThreadState_GET() in tracemalloc.c (#129126)Victor Stinner2025-01-211-7/+2
| | | | Replace uncommon PyGILState_GetThisThreadState() with common _PyThreadState_GET().
* gh-126925: Make PyConfig.use_system_logger read-only (#129124)Victor Stinner2025-01-211-1/+1
| | | | The variable is only used once during early Python initialization, it doesn't make sense to modify it at runtime.
* GH-128563: Add new frame owner type for interpreter entry frames (GH-129078)Mark Shannon2025-01-219-42/+26
| | | Add new frame owner type for interpreter entry frames
* GH-127953: Make line number lookup O(1) regardless of the size of the code ↵Mark Shannon2025-01-213-159/+204
| | | | object (GH-128350)
* GH-128914: Remove conditional stack effects from `bytecodes.c` and the code ↵Mark Shannon2025-01-2012-743/+720
| | | | generators (GH-128918)
* GH-128939: Refactor JIT optimize structs (GH-128940)Mark Shannon2025-01-204-462/+693
|
* gh-129033: Remove _PyInterpreterState_SetConfig() function (#129048)Victor Stinner2025-01-202-48/+0
| | | | | | Remove _PyInterpreterState_GetConfigCopy() and _PyInterpreterState_SetConfig() private functions. PEP 741 "Python Configuration C API" added a better public C API: PyConfig_Get() and PyConfig_Set().
* gh-111178: Generate correct signature for most self converters (#128447)Erlend E. Aasland2025-01-202-26/+26
|
* gh-128360: Add `_Py_AssertHoldsTstate` as assertion for holding a thread ↵Peter Bierma2025-01-207-25/+26
| | | | | state (#128361) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-129033: Remove _Py_InitializeMain() function (#129034)Victor Stinner2025-01-201-12/+0
| | | Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
* gh-100239: Handle NaN and zero division in guards for `BINARY_OP_EXTEND` ↵Kirill Podoprigora2025-01-191-6/+24
| | | | | | (#128963) Co-authored-by: Tomas R. <tomas.roun8@gmail.com> Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* gh-128955: Fix goto if tlbc creation fails when throwing into a generator ↵mpage2025-01-171-1/+1
| | | | | | (#128957) We don't have the correct copy of the bytecode and can't update next_instr appropriately, so just unwind.
* gh-128923: Use zero to indicate unassigned unique id (#128925)Sam Gross2025-01-171-13/+16
| | | | | | | | In the free threading build, the per thread reference counting uses a unique id for some objects to index into the local reference count table. Use 0 instead of -1 to indicate that the id is not assigned. This avoids bugs where zero-initialized heap type objects look like they have a unique id assigned.
* GH-126599: Remove the "counter" optimizer/executor (GH-126853)Xuanteng Huang2025-01-164-122/+0
|
* gh-100239: specialize long tail of binary operations (#128722)Irit Katriel2025-01-166-40/+273
|
* gh-128679: Fix tracemalloc.stop() race conditions (#128893)Victor Stinner2025-01-161-15/+36
| | | | | | | tracemalloc_alloc(), tracemalloc_realloc(), tracemalloc_free(), _PyTraceMalloc_TraceRef() and _PyTraceMalloc_GetMemory() now check 'tracemalloc_config.tracing' after calling TABLES_LOCK(). _PyTraceMalloc_TraceRef() now always returns 0.
* gh-128679: Redesign tracemalloc locking (#128888)Victor Stinner2025-01-152-335/+283
| | | | | | | | | * Use TABLES_LOCK() to protect 'tracemalloc_config.tracing'. * Hold TABLES_LOCK() longer while accessing tables. * tracemalloc_realloc() and tracemalloc_free() no longer remove the trace on reentrant call. * _PyTraceMalloc_Stop() unregisters _PyTraceMalloc_TraceRef(). * _PyTraceMalloc_GetTraces() sets the reentrant flag. * tracemalloc_clear_traces_unlocked() sets the reentrant flag.
* gh-128807: Add marking phase for free-threaded cyclic GC (gh-128808)Neil Schemenauer2025-01-151-16/+320
|
* gh-115999: Specialize `LOAD_ATTR` for instance and class receivers in ↵mpage2025-01-146-185/+378
| | | | | | | free-threaded builds (#128164) Finish specialization for LOAD_ATTR in the free-threaded build by adding support for class and instance receivers.
* gh-128384: Add locking to warnings.py. (gh-128386)Neil Schemenauer2025-01-142-47/+121
| | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* GH-128682: Convert explicit loops closing arrays into `DECREF_INPUTS`. ↵Mark Shannon2025-01-144-262/+304
| | | | | | | (GH-128822) * Mark Py_DECREF and Py_XDECREF as escaping * Remove explicit loops for clearing array inputs
* gh-128400: Only show the current thread in `Py_FatalError` on the ↵Peter Bierma2025-01-131-0/+4
| | | | free-threaded build (#128758)
* GH-128682: Stronger checking of `PyStackRef_CLOSE` and `DEAD`. (GH-128683)Mark Shannon2025-01-133-102/+114
|
* GH-128685: Specialize (rather than quicken) LOAD_CONST into ↵Mark Shannon2025-01-137-16/+57
| | | | LOAD_CONST_[IM]MORTAL (GH-128708)
* gh-128627: Emscripten: Use wasm-gc based call adaptor if available (#128628)Hood Chatham2025-01-121-52/+177
| | | | | | Replaces the trampoline mechanism in Emscripten with an implementation that uses a recently added feature of wasm-gc instead of JS type reflection, when that feature is available.
* gh-128717: Stop-the-world when setting the recursion limit (#128741)Peter Bierma2025-01-121-0/+2
|
* Make the Python CLI error message style more consistent (GH-128129)9cel2025-01-111-2/+2
|
* gh-111178: fix UBSan failures in `Python/bltinmodule.c` (GH-128235)Bénédikt Tran2025-01-101-30/+51
| | | | | * fix UBSan failures for `filterobject` * fix UBSan failures for `mapobject` * fix UBSan failures for `zipobject`
* gh-128629: Add Py_PACK_VERSION and Py_PACK_FULL_VERSION (GH-128630)Petr Viktorin2025-01-091-0/+17
|
* Remove unnecessary LIST_TO_TUPLE conversions (GH-126558)Brandt Bucher2025-01-081-0/+7
|
* gh-111178: fix UBSan failures in `Python/context.c` (GH-128242)Bénédikt Tran2025-01-081-53/+68
| | | | | | * fix UBSan failures for `PyContext` * fix UBSan failures for `PyContextVar` * fix UBSan failures for `PyContextToken` * fix UBSan failures for `_PyContextTokenMissing`
* gh-111178: fix UBSan failures in `Python/hamt.c` (GH-128247)Bénédikt Tran2025-01-081-90/+84
| | | | | | | * fix UBSan failures for `PyHamtObject` * fix UBSan failures for `PyHamtNode_Array` * fix UBSan failures for `PyHamtNode_Collision` * fix UBSan failures for `PyHamtNode_Bitmap`
* GH-127809: Fix the JIT's understanding of ** (GH-127844)Brandt Bucher2025-01-085-26/+152
|
* gh-115999: Add free-threaded specialization for COMPARE_OP (#126410)T. Wouters2025-01-073-12/+9
| | | | | Add free-threaded specialization for COMPARE_OP, and tests for COMPARE_OP specialization in general. Co-authored-by: Donghee Na <donghee.na92@gmail.com>
* gh-128146: Exclude os/log.h import on older macOS versions. (#128165)Russell Keith-Magee2025-01-071-11/+22
| | | | Reworks the handling of Apple system log handling to account for older macOS versions that don't provide os-log.
* GH-128533: Add `NOT_TAKEN` instruction after bytecode optimization. (GH-128554)Mark Shannon2025-01-062-13/+4
|
* GH-128375: Better instrument for `FOR_ITER` (GH-128445)Mark Shannon2025-01-069-111/+212
|
* gh-127350: Add Py_fopen() and Py_fclose() functions (#127821)Victor Stinner2025-01-065-34/+53
|
* Remove asserts that confuse `enum _framestate` with `enum _frameowner` ↵Anders Kaseorg2025-01-021-2/+0
| | | | | | | | | | | | (GH-124148) The `owner` field of `_PyInterpreterFrame` is supposed to be a member of `enum _frameowner`, but `FRAME_CLEARED` is a member of `enum _framestate`. At present, it happens that `FRAME_CLEARED` is not numerically equal to any member of `enum _frameowner`, but that could change in the future. The code that incorrectly assigned `owner = FRAME_CLEARED` was deleted in commit a53cc3f49463e50cb3e2b839b3a82e6bf7f73fee (GH-116687). Remove the incorrect checks for `owner != FRAME_CLEARED` as well.
* gh-128277: make globals variables thread safe in socket module (#128286)Kumar Aditya2024-12-311-3/+3
|