Commit Graph

6512 Commits

Author SHA1 Message Date
Mark Shannon ad1513a263 GH-150516: Reduce the work done to spill and reload the stack around calls (GH-151587) 2026-06-18 15:14:30 +01:00
Maurycy Pawłowski-Wieroński a8d74c062f gh-151436: Fix missing tstate->last_profiled_frame updates (#151437) 2026-06-17 16:49:23 -04:00
Daniele Parmeggiani c2ca7724af gh-150902: Optimize PyCriticalSection2 to skip locking the same locks held by the current CS2
This mimics an optimization already present for the single-mutex critical section.
2026-06-16 16:56:37 +00:00
Victor Stinner 552ce57e33 gh-139227: Remove unused _PyRuntime.imports.pkgcontext (#151490)
The global variable has been replaced by a new thread local variable
"pkgcontext" in Python/import.c.
2026-06-15 10:23:04 +00:00
JasonMendoza2008 ecbd31ee39 gh-137759: Replace _PyObject_HashFast() with PyObject_Hash() in setobject.c (#137828)
Replace also _PyObject_HashFast() with PyObject_Hash()
in _collections._count_elements().

Rename _PyObject_HashFast() to _PyObject_HashDictKey(),
and mark it as Py_ALWAYS_INLINE.

Only use _PyObject_HashDictKey() on dictionaries.
2026-06-15 11:31:04 +02:00
Dino Viehland efb2fffae1 gh-150490: Raise PyType_Modified for insertion into split dictionary (#150489)
Raise PyType_Modified for insertion into split dictionary
2026-06-11 09:38:31 -07:00
Victor Stinner 82956594bb Remove unused internal _Py_REF_IS_QUEUED() function (#151236) 2026-06-11 12:54:36 +02:00
sobolevn 44a533fa1b gh-150671: Deprecate PyAsyncGen_New, PyCoro_New, PyGen_New, PyGen_NewWithQualName functions (#150672)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-06-10 15:57:09 +03:00
Pieter Eendebak 537702d570 gh-151059: [perf] Use PyObject_CallMethodOneArg in datetime's call_tzinfo_method (#151062) 2026-06-08 14:11:36 +03:00
Victor Stinner c32501261a gh-150907: Fix dynamic_annotations.h when built with C++ and Valgrind (#150914)
Add extern "C++" scope for the C++ template.

Fix test_cppext when Python is built with --with-valgrind.
2026-06-05 14:11:46 +02:00
Kumar Aditya df34a2f712 gh-150766: export _PyGC_VisitFrameStack and _PyGC_VisitStackRef functions (#150767) 2026-06-02 18:38:21 +05:30
Bartosz Sławecki 5a2d2736a6 gh-150052: Resolve un-loaded lazily loaded submodules via module.__getattr__ instead of publishing lazy values (#150055) (#150744) 2026-06-02 09:58:51 +01:00
Mark Shannon 633b6be8f5 GH-148960: Reduce the size of the debug stencils to less than half. (GH-150551)
For AArch64 linux, reduces the total bytes in the code bodies from 489kb to 218kb.
Reduces the size of the stencils files from 394k lines to 167k lines.
2026-06-01 17:56:16 +01:00
Bartosz Sławecki 1d4e965829 gh-148587: Make sys.lazy_modules match PEP and keep internal lazy submodules tracking internal (#150086)
Make sys.lazy_modules match PEP and keep internal lazy submodules tracking internal

Co-authored-by: Dino Viehland <dinoviehland@meta.com>
2026-05-28 17:55:47 -07:00
Neko Asakura 39bd44fc70 gh-148871: make LOAD_COMMON_CONSTANT use immortal stackref borrows (GH-149625) 2026-05-28 12:27:37 +01:00
Serhiy Storchaka 8ab7b43a14 gh-62259: Add support of multi-byte encodings in the XML parser (GH-149860)
Supported encodings: "cp932", "cp949", "cp950", "Big5","EUC-JP",
"GB2312", "GBK", "johab", and "Shift_JIS".

Partially supported encodings (only BMP characters): "Big5-HKSCS",
"EUC_JIS-2004", "EUC_JISX0213", "Shift_JIS-2004", "Shift_JISX0213",
"utf-8-sig" and non-standard aliases like "UTF8" (without hyphen).

The parser now raises ValueError for known unsupported
multi-byte encodings such us "ISO-2022-JP" or "raw-unicode-escape"
instead of failing later, when encounter non-ASCII data.
2026-05-26 19:40:25 +00:00
Mark Shannon a6793662e7 GH-126910: Make _Py_get_machine_stack_pointer return the actual stack pointer (GH-149103)
* Make _Py_ReachedRecursionLimit inline again
* Remove _Py_MakeRecCheck replacing its use with _Py_ReachedRecursionLimit
* Move the check for C stack swtiching into _Py_CheckRecursiveCall
2026-05-26 15:14:17 +01:00
Pieter Eendebak dfeeee990b gh-145192: improve performance of PySequence_GetSlice (#145193) 2026-05-23 15:45:50 +05:30
Hai Zhu 441af3a934 gh-149335: Avoid JIT trace buffer asserts with overhead above FITNESS_INITIAL (GH-149633) 2026-05-21 15:57:31 +01:00
Pieter Eendebak f2fa291db8 gh-148871: Add CONSTANT_EMPTY_TUPLE to LOAD_COMMON_CONSTANT (GH-149688) 2026-05-21 15:54:46 +01:00
Pablo Galindo Salgado 1f3c2679f1 gh-149321: Remove lazy_imports=none startup mode (#149389) 2026-05-19 16:01:15 -07:00
Peter Bierma 409fa8e1f3 gh-150027: Avoid copying during construction of frozenset objects (GH-150028) 2026-05-19 13:57:37 -04:00
Jelle Zijlstra 08218030a5 gh-148829: Make sentinels' repr and module customizable (#149654)
Implementation of python/peps#4968; still needs SC approval.
2026-05-19 09:18:56 -07:00
Maurycy Pawłowski-Wieroński a2932e9c95 gh-149464: Add os.pidfd_getfd(pidfd, targetfd, flags=0) function (#149465)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-05-18 16:29:58 +02:00
Petr Viktorin 125f26358a gh-149685: Use the _Py prefix for private C macros (GH-149686) 2026-05-13 19:14:05 +02:00
scoder 94df62542c gh-148829: Add PySentinel_CheckExact() (#149725) 2026-05-13 10:10:37 +00:00
Stan Ulbrych 6a0be131c3 gh-149595: Remove the sys._enablelegacywindowsfsencoding() function (#149596)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-05-12 17:11:34 +01:00
Alper 8a4895985f gh-145235: Make dict watcher API thread-safe for free-threaded builds (gh-145233)
In free-threaded builds, concurrent calls to PyDict_AddWatcher, PyDict_ClearWatcher, PyDict_Watch, and PyDict_Unwatch can race on the shared callback array and the per-dict watcher tags. This change adds a mutex to serialize watcher registration and removal, atomic operations for tag updates, and atomic acquire/release synchronization for callback dispatch in _PyDict_SendEvent.
2026-05-11 11:39:55 -04:00
Stan Ulbrych 24b8f12544 gh-149018: Use XML_SetHashSalt16Bytes in pyexpat/_elementtree when possible (#149023) 2026-05-10 18:36:26 +01:00
Neko Asakura d2d24e46d3 gh-100239: expose sq_repeat helpers for BINARY_OP_EXTEND (#148791) 2026-05-08 11:12:20 +00:00
Neko Asakura 49918f5b0c gh-149481: skip FOR_ITER inline specialization for Python __next__ (#149491)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-05-07 23:02:04 +00:00
Hugo van Kemenade f0daba1652 gh-106693: Revert "Explicitly mark ob_sval as unsigned char to avoid UB (#106826)" (#149514) 2026-05-07 23:39:08 +03:00
Pablo Galindo Salgado fbba343622 gh-106693: Explicitly mark ob_sval as unsigned char to avoid UB (#106826)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2026-05-07 22:06:53 +03:00
Stan Ulbrych 9d07159cda gh-149499: Fixes for 3.16 bump (GH-149500)
Also fixes gh-149507, regenerating `configure` for 3.16.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
2026-05-07 19:06:37 +00:00
Hugo van Kemenade f5c75351de Python 3.16.0a0 2026-05-07 19:05:52 +03:00
Hugo van Kemenade f31a89bb90 Python 3.15.0b1 2026-05-07 16:26:31 +03:00
Neil Schemenauer 13188dbf85 gh-148937: revert process RSS based GC deferral (#149475) 2026-05-07 14:32:14 +03:00
Peter Bierma 2b7c28a440 gh-149101: Implement PEP 788 (GH-149116)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Sam Gross <colesbury@gmail.com>
2026-05-06 17:39:30 -04:00
Alex Malyshev 646853df13 gh-145559: Add PyUnstable_DumpTraceback() and PyUnstable_DumpTracebackThreads() (#148145)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-05-06 15:01:12 +00:00
Mark Shannon 70bd1c2dd2 GH-143732: SEND specialization (GH-148963)
* SEND specialization. Adds 2 new specialized instructions:

* SEND_VIRTUAL: for sends to virtual iterators e.g lists and tuples
* SEND_ASYNC_GEN: for sends to async generators

Tweak FOR_ITER_VIRTUAL so that SEND_VIRTUAL and FOR_ITER_VIRTUAL use equivalent guards
2026-05-05 15:19:16 +01:00
Diego Russo 1e5d94274d GH-126910: Add GNU backtrace support for unwinding JIT frames (#149104)
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2026-05-05 09:29:07 +01:00
Petr Viktorin 508b49845d gh-149044: Implement PEP 820 – PySlot: Unified slot system for the C API (GH-149055)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2026-05-05 09:18:04 +02:00
Pablo Galindo Salgado 8c796782fc gh-146462: Add dict introspection debug offsets (#148633) 2026-05-04 23:00:23 +00:00
Sergey Miryanov e89568f0cb GH-148726: Add heap_size to generational GC (#149195) 2026-05-04 22:14:45 +01:00
Steve Dower 10f950c9bb gh-148690: Build Windows freethreaded binaries into separate directory and include python3t.dll on GIL-enabled (GH-149218)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-05-04 17:45:08 +01:00
Neko Asakura 9846407eaf gh-143732: add specialization for FOR_ITER (GH-148745) 2026-05-04 17:29:10 +01:00
Victor Stinner 952784af47 gh-137030: Fix YIELD_VALUE bytecode assertion (#149184)
Co-authored-by: Mark Shannon <mark@hotpy.org>
2026-05-04 18:09:57 +02:00
Petr Viktorin 6ca5cdba18 gh-149225: Expose Py_CriticalSection in Stable ABI (GH-149227) 2026-05-04 17:32:17 +02:00
Victor Stinner ce51c18818 gh-146063: Add PyObject_CallFinalizerFromDealloc() to the limited C API (#146172)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-05-04 15:37:45 +02:00
Kumar Aditya 5847931d11 gh-143732: allow dict subclasses to be specialized (GH-148128) 2026-05-04 09:39:03 +01:00