Commit Graph

5049 Commits

Author SHA1 Message Date
Ivy Xu 1097b22fd9 gh-151428: Remove unused imports from Tools/ (#151442) 2026-06-14 16:12:30 +03:00
Serhiy Storchaka ae62b53928 gh-62259: Add Tools/unicode/gen_expat_table.py (GH-150503)
It was used to generate the _expat_decoding_table attribute of CodecInfo.
2026-06-10 18:04:03 +03:00
Zachary Ware 7053bbd7fd gh-151159: Update CI to use latest SSL library versions (#151176) 2026-06-09 17:29:36 +00:00
Pieter Eendebak 97dea30914 gh-150889: Improve performance of unicodedata.normalize() (GH-150890)
Scan the nfc_first/nfc_last reindex tables comparing only .start, range-check
the candidate once, and terminate on a sentinel above every codepoint, so each
entry costs a single comparison. ~2x faster on non-Latin and combining-heavy
NFC/NFKC input; no new data tables.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 11:34:33 +03:00
Mark Shannon 038495db33 GH-148960: Ensure that asserts are ignored if NDEBUG is set (#150916) 2026-06-04 15:11:33 +01:00
Yashraj 6453065db9 gh-141004: Document unstable perf map functions in ceval.h (GH-143492) 2026-06-03 12:36:25 +00: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
Neko Asakura 39bd44fc70 gh-148871: make LOAD_COMMON_CONSTANT use immortal stackref borrows (GH-149625) 2026-05-28 12:27:37 +01:00
Pieter Eendebak 43c60ec2fd gh-149449: Fix use-after-free in _PyUnicode_GetNameCAPI (#150323)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-05-24 16:17:38 +00:00
Serhiy Storchaka 287c98f4cb gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) 2026-05-24 16:16:12 +03:00
Hai Zhu 0828782773 gh-149358: Generating JIT recorder transformers and stabilizing family layouts (GH-149359) 2026-05-21 17:06:52 +01:00
Pablo Galindo Salgado 661df25692 gh-149584: Fix excessive overhead in the Tachyon profiler regarding the cache behavior (#149649)
Use exact remote reads for interpreter state, thread state, and
interpreter frame structs instead of pulling full remote pages into the
profiler page cache. This matches the core change from
python/cpython#149585.

The profiler clears the page cache between samples, so live entries are
always packed at the front. Track the live count and only clear/search
that prefix instead of scanning all 1024 slots on the hot path.

Use the frame cache to predict the next thread state and top frame
address, then batch interpreter/thread/frame reads with process_vm_readv
when profiling a Linux target. Reuse prefetched frame buffers in the
frame walker when the prediction is valid.

Cache the last FrameInfo tuple per code object/instruction offset, reuse
cached thread id objects, and append cached parent frames directly on
full frame-cache hits. This cuts Python allocation churn in the
steady-state profiler path.
2026-05-20 04:32:08 -07:00
Nathan Goldbaum bd6bf91fcb gh-149887: Install python3t.lib for GIL-enabled Windows install (GH-149900) 2026-05-18 14:24:06 +01:00
Lukas Geiger 18281db0d0 gh-144140: Optimize len for frozen dict/set constants in optimizer (#149969) 2026-05-18 12:20:42 +05:30
Zachary Ware c62c3710dc gh-124111: Update Windows build to use Tcl/Tk 9.0.3 (GH-149477) 2026-05-14 12:47:28 -05:00
Kumar Aditya 94bca40ff0 gh-148906: fix performance scaling of descriptors on free-threading (#148915) 2026-05-13 23:03:59 +05:30
Petr Viktorin fa81cd976a gh-140550: Update xxlimited with 3.15 limited API (GH-142827) 2026-05-13 18:35:50 +02:00
Sergey B Kirpichev 9eb3b14668 gh-115119: Removed bundled copy of the libmpdec (GH-133964)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
2026-05-12 21:34:37 +00:00
sobolevn b546cc10f5 Update mypy to 2.1.0 (#149709) 2026-05-12 08:40:51 +00: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
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
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
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
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 fc96028191 gh-148600: Add OpenSSL 4.0.0 support to test configurations (#149356)
Co-authored-by: Charlie Lin <tuug@gmx.us>
2026-05-04 16:21:04 +03:00
Zachary Ware 68fe899feb gh-149254: Update CI to use latest OpenSSL and AWS-LC versions (GH-149330)
Also update Modules/_ssl_data_36.h to include an added symbol from OpenSSL 3.6.2.
2026-05-03 20:20:51 +00:00
Sergey Miryanov 39f123c587 GH-146527: Add get_gc_stats function to _remote_debugging (#148071) 2026-05-02 15:04:18 +00:00
Diego Russo c7b7ca2cd5 GH-126910: Add gdb support for unwinding JIT frames (#146071)
Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2026-05-02 13:42:03 +00:00
Neko Asakura 0102c1d9b9 gh-149204: add _RROT_3 uop to reduce stack moves (GH-149205) 2026-05-01 12:35:31 +01:00
Savannah Ostrowski c0e0640039 GH-146475: Block Apple Clang for building JIT stencils (#149188) 2026-04-30 22:09:36 +00:00
Petr Viktorin a94c7900be Revert pylock.toml change to make MSI builds pass (#149175)
GH-149058 made MSI installer tests fail. GHA didn't catch this because MSI-related files weren't changed.

This reverts the build.bat change from commit 40dc61a0e0.

Also: a README style nitpick to trigger CI.
2026-04-30 10:30:34 +02:00
Hai Zhu be968c7210 gh-148571: [JIT] Preserve family-head recorder layouts for specialized opcode families (GH-148730)
* Records the same objects for each member of family before execution
* Records derived values when recording the trace
* This makes sure that specialization, or deoptimization, does not cause invalid values to be recorded
2026-04-28 13:41:16 +01:00
Jelle Zijlstra 29a92abb60 gh-148829: Implement PEP 661 (#148831)
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-27 19:28:30 -07:00
Diego Russo 9633c5239d GH-126910: Build/link the JIT shim in the Python interpreter (#148872) 2026-04-23 12:23:18 +01:00
Isuru Fernando 59b41c8c3b gh-148858: Remove duplicated recipe.yaml files in Tools/pixi-packages (#148859) 2026-04-22 20:50:30 +03:00
Mark Shannon f93834ff01 GH-146073: Add example script for dumping JIT traces (GH-148840) 2026-04-22 11:09:05 +01:00
Uwe L. Korn 5a3f479601 gh-138451: Support custom LLVM installation path (#138452)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-04-20 16:45:53 +00:00
John Seong 28b8d5ffcc gh-133403: Add type annotations to generate_levenshtein_examples.py (#143317)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-18 21:50:17 +03:00
Mark Shannon cecf564073 GH-146128: Fix AArch64 multi-instruction constants and relocations (GH-148598)
Fix AArch64 multi-instruction constants and relocations

* Elimates rendundant orr xN, xN, 0xffff after 16 or 32 bit loads
* Merges adrp (21rx) and ldr (12) relocations into single 33rx relocation, when safe to do so.
2026-04-16 15:33:09 +01:00
Mark Shannon 600f4dbd54 GH-145668: Add FOR_ITER specialization for virtual iterators. Specialize GET_ITER. (GH-147967)
* Add FOR_ITER_VIRTUAL to specialize FOR_ITER for virtual iterators
* Add GET_ITER_SELF to specialize GET_ITER for iterators (including generators)
* Add GET_ITER_VIRTUAL to specialize GET_ITER for iterables as virtual iterators
* Add new (internal) _tp_iteritem function slot to PyTypeObject
* Put limited RESUME at start of genexpr for free-threading. Fix up exception handling in genexpr
2026-04-16 15:22:22 +01:00
Petr Viktorin 0fcf2b72d3 gh-146636: PEP 803: Reference documentation (GH-148013)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-16 14:17:44 +02:00
Bénédikt Tran 69e0a78e6e gh-148390: fix undefined behavior of memoryview(...).cast("?") (#148454) 2026-04-15 11:42:20 +00:00
Filipe Laíns 0012686d92 GH-145278: freeze encodings (partially) and linecache (#148347) 2026-04-14 21:01:23 +01:00
Hai Zhu 5ce0fe8b6c gh-148378: Allow multiple consecutive recording ops per macro op (GH-148496) 2026-04-14 19:26:53 +08:00
Neko Asakura e02ac1d907 gh-148515: make optimizer_generator respect multiple caches (#148524) 2026-04-14 12:51:05 +08:00
Charlie Lin 10d275fdf8 gh-148483: Use Py_GCC_ATTRIBUTE(unused) for stop_tracing label (GH-148481) 2026-04-13 21:05:34 +08:00
Neko Asakura 5e74d920c8 gh-148285: Allow recording uops after specializing uops (GH-148482) 2026-04-13 20:56:29 +08:00
Neko Asakura 9831dea3bf gh-148211: decompose _POP_TWO/_POP_CALL(_ONE/_TWO) in JIT (GH-148377) 2026-04-11 20:46:56 +08:00
Neko Asakura 72006a71b2 gh-148211: decompose [_POP_TWO/_INSERT_2]_LOAD_CONST_INLINE_BORROW in JIT (GH-148357) 2026-04-11 18:27:51 +08:00