summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
...
* GH-131498: Remove conditional stack effects (GH-131499)Mark Shannon2025-03-2010-54/+97
| | | * Adds some missing #includes
* GH-130296: Remove `_PyOpcode_max_stack_effect` as it is no longer used ↵Mark Shannon2025-03-201-12/+2
| | | | (GH-131493)
* gh-131238: Remove includes from pycore_interp.h (#131495)Victor Stinner2025-03-2013-53/+43
| | | Remove also now unused includes in C files.
* gh-111178: Fix function signatures for multiple tests (#131496)Victor Stinner2025-03-202-10/+22
|
* Fix Windows build warnings (#131487)Victor Stinner2025-03-202-0/+6
| | | | | | | | | | | | | | | | Fix the following warnings: * Modules\_io\fileio.c(1296,13): unused variable 'self' * Modules\_io\winconsoleio.c(334,9): unused variable 'fd_is_own' * Modules\faulthandler.c(409,11): unused variable 'flags' * Modules\posixmodule.c(5699,9): unused variable 'pathError' * PC\winreg.c(2077,5): suggest braces around initialization of subobject * PC\winreg.c(34,13): unused variable 'errNotAHandle' * Python\fileutils.c(132,12): result of comparison of constant 1114111 with expression of type 'wchar_t' (aka 'unsigned short') is always false * Python\fileutils.c(58,21): unused variable 'INCOMPLETE_CHARACTER' * Python\sysmodule.c(2534,21): unused variable 'perf_map_state'
* gh-128421: add critical section around `traceback.tb_next` (#131322)Kumar Aditya2025-03-202-14/+82
|
* gh-131401: fix data races in exception handling (#131447)Kumar Aditya2025-03-202-13/+18
|
* gh-131238: Remove more includes from pycore_interp.h (#131480)Victor Stinner2025-03-1912-9/+27
|
* gh-126835: Move constant tuple folding from ast_opt to CFG (#130769)Yan Yanchii2025-03-193-42/+111
|
* GH-130956: Only emit AArch64 trampolines for long jumps (GH-131041)Diego Russo2025-03-191-1/+11
|
* gh-131238: Remove many includes from pycore_interp.h (#131472)Victor Stinner2025-03-195-4/+10
|
* gh-130931: Add pycore_interpframe.h internal header (#131249)Victor Stinner2025-03-195-10/+7
| | | | Move _PyInterpreterFrame and associated functions to a new pycore_interpframe.h header.
* gh-131238: Remove pycore_runtime.h from pycore_pystate.h (#131356)Victor Stinner2025-03-193-2/+5
| | | | | | | | | | | | * Remove includes from pycore_pystate.h: * pycore_runtime_structs.h * pycore_runtime.h * pycore_tstate.h * pycore_interp.h * Reorganize internal headers. Move _gc_thread_state from pycore_interp_structs.h to pycore_tstate.h. * Add 3 new header files to PCbuild/pythoncore.vcxproj.
* gh-111178: Fix function signatures in legacy_tracing.c (#131464)Victor Stinner2025-03-191-27/+38
|
* gh-111178: Fix function signatures for test_types (#131455)Victor Stinner2025-03-191-2/+4
|
* gh-131401: fix data race in `_PyErr_Restore` (#131406)Kumar Aditya2025-03-191-13/+10
|
* gh-130080: implement PEP 765 (#130087)Irit Katriel2025-03-174-50/+191
|
* gh-131281: Add include for pystats builds (#131369)Ken Jin2025-03-171-0/+1
| | | Add include to for pystats builds
* GH-131238: More refactoring of core header files (GH-131351)Mark Shannon2025-03-1714-3/+18
| | | | Adds new pycore_stats.h header file to help break dependencies involving the pycore_code.h header.
* gh-131238: Add explicit includes to pycore headers (#131257)Victor Stinner2025-03-1714-26/+46
|
* gh-131238: Convert pycore_pystate.h static inline to functions (#131352)Victor Stinner2025-03-171-0/+38
| | | | | | | | Convert static inline functions to functions: * _Py_IsMainThread() * _PyInterpreterState_Main() * _Py_IsMainInterpreterFinalizing() * _Py_GetMainConfig()
* GH-131238: Core header refactor (GH-131250)Mark Shannon2025-03-1710-2/+17
| | | | | * Moves most structs in pycore_ header files into pycore_structs.h and pycore_runtime_structs.h * Removes many cross-header dependencies
* GH-131296: fix clang-cl warning on Windows in pytime.c (GH-131297)Chris Eibl2025-03-151-1/+1
| | | | | | fix warning : integer literal is too large to be represented in a signed integer type, interpreting as unsigned [-Wimplicitly-unsigned-literal]
* gh-131281: fix compile error due to `BINARY_SUBSCR` (GH-131283)Xuanteng Huang2025-03-153-3/+3
| | | | | * fix compile error due to `BINARY_SUBSCR` * replace stat_inc with `BINARY_OP`
* gh-130480: Move duplicate `LOAD_SMALL_INT` optimization from codegen to CFG ↵Yan Yanchii2025-03-142-12/+37
| | | | (#130481)
* gh-111178: Fix function signatures to fix undefined behavior (#131191)Victor Stinner2025-03-141-2/+4
|
* gh-111178: Fix _PyLegacyEventHandler_Type deallocator (#131193)Victor Stinner2025-03-141-1/+0
| | | | | Don't use PyObject_Free() as tp_dealloc to avoid an undefined behavior. Instead, use the default deallocator which just calls tp_free which is PyObject_Free().
* GH-130396: Work around for broken `pthread_get_stackaddr_np` on Emscripten ↵Hood Chatham2025-03-131-0/+59
| | | | | | (#131088) Implements a workaround implementation of `pthread_get_stackaddr_np` for Emscripten. This will be replaced by an implementation that will be included in Emscripten 4.0.6.
* gh-130382: add missing `_PyReftracerTrack` to ceval `Py_DECREF` (#130689)Tomasz Pytel2025-03-131-0/+1
|
* gh-130080: move _Py_EnsureArrayLargeEnough to a separate header so it can be ↵Irit Katriel2025-03-133-44/+69
| | | | used outside of the compiler (#130930)
* gh-111178: Fix function signatures in misc files (#131180)Victor Stinner2025-03-131-2/+3
|
* gh-130940: Modify default behavior of `PyConfig.use_system_logger` to enable ↵Russell Keith-Magee2025-03-131-3/+12
| | | | | on iOS (#131172) Modify default behavior of use_system_log to enable on iOS.
* gh-126835: Avoid creating unnecessary tuple when looking for constant ↵Yan Yanchii2025-03-122-94/+132
| | | | sequence during constant folding (#131054)
* gh-131141: fix data race in instrumentation while registering callback (#131142)Kumar Aditya2025-03-121-10/+13
|
* gh-115999: Add free-threaded specialization for FOR_ITER (#128798)T. Wouters2025-03-126-44/+311
| | | | Add free-threaded versions of existing specialization for FOR_ITER (list, tuples, fast range iterators and generators), without significantly affecting their thread-safety. (Iterating over shared lists/tuples/ranges should be fine like before. Reusing iterators between threads is not fine, like before. Sharing generators between threads is a recipe for significant crashes, like before.)
* gh-81267: Correct time.sleep() error message (#131055)Stan Ulbrych2025-03-121-15/+19
|
* gh-122029: Do not unpack method for legacy tracing anymore (#130898)Tian Gao2025-03-111-13/+0
|
* gh-111178: Change Argument Clinic signature for METH_O (#130682)Victor Stinner2025-03-114-8/+47
| | | Use "PyObject*" for METH_O functions to fix an undefined behavior.
* gh-130396: Fix thread sanitizer crashes on stack overflow tests (gh-130966)Sam Gross2025-03-111-0/+5
| | | | Thread sanitizer will often crash if a test uses more than half the stack.
* gh-131082: Add missing guards for WIN32_LEAN_AND_MEAN (#131044)Max Bachmann2025-03-112-2/+6
| | | | | * Add missing guards for WIN32_LEAN_AND_MEAN * add missing whitespaces
* gh-117174: Add a new route in linecache to fetch interactive source code ↵Pablo Galindo Salgado2025-03-101-1/+1
| | | | (#117500)
* GH-123044: Give the `POP_TOP` after a case test a location in the body, not ↵Mark Shannon2025-03-103-6/+20
| | | | the pattern. (GH-130627)
* GH-127705: Use `_PyStackRef`s in the default build. (GH-127875)Mark Shannon2025-03-108-150/+233
|
* GH-128534: Fix behavior of branch monitoring for `async for` (GH-130847)Mark Shannon2025-03-077-13/+40
| | | * Both branches in a pair now have a common source and are included in co_branches
* gh-130920: Fix data race in STORE_SUBSCR_LIST_INT (#130923)Sam Gross2025-03-063-3/+6
| | | | | | The write of the item to the list needs to use an atomic operation in the free threading build. Co-authored-by: Tomasz Pytel <tompytel@gmail.com>
* gh-124878: Fix race conditions during interpreter finalization (#130649)Sam Gross2025-03-064-57/+79
| | | | | | | | | | | | | | | | | | | | The PyThreadState field gains a reference count field to avoid issues with PyThreadState being a dangling pointer to freed memory. The refcount starts with a value of two: one reference is owned by the interpreter's linked list of thread states and one reference is owned by the OS thread. The reference count is decremented when the thread state is removed from the interpreter's linked list and before the OS thread calls `PyThread_hang_thread()`. The thread that decrements it to zero frees the `PyThreadState` memory. The `holds_gil` field is moved out of the `_status` bit field, to avoid a data race where on thread calls `PyThreadState_Clear()`, modifying the `_status` bit field while the OS thread reads `holds_gil` when attempting to acquire the GIL. The `PyThreadState.state` field now has `_Py_THREAD_SHUTTING_DOWN` as a possible value. This corresponds to the `_PyThreadState_MustExit()` check. This avoids race conditions in the free threading build when checking `_PyThreadState_MustExit()`.
* gh-130860: Fix width calculation, when separators in fractional part (GH-130865)Sergey B Kirpichev2025-03-061-17/+18
| | | | This amends f39a07be47
* GH-130903: typo in optimizer DSL for _GUARD_BOTH_UNICODE (#130904)Jamie Phan2025-03-062-2/+2
| | | Typo introduced in gh-118910.
* gh-130574: renumber RESUME opcode from 149 to 128 (GH-130685)Tomasz Pytel2025-03-061-42/+42
|
* gh-118331: Fix a couple of issues when list allocation fails (#130811)mpage2025-03-052-0/+4
| | | | | | | | | | | | | | | | * Fix use after free in list objects Set the items pointer in the list object to NULL after the items array is freed during list deallocation. Otherwise, we can end up with a list object added to the free list that contains a pointer to an already-freed items array. * Mark `_PyList_FromStackRefStealOnSuccess` as escaping I think technically it's not escaping, because the only object that can be decrefed if allocation fails is an exact list, which cannot execute arbitrary code when it is destroyed. However, this seems less intrusive than trying to special cases objects in the assert in `_Py_Dealloc` that checks for non-null stackpointers and shouldn't matter for performance.