Commit Graph
4955 Commits
Author SHA1 Message Date
Donghee NaandGitHub 28b3a8ac08 gh-141510: Update ftscalingbench to support frozendict (gh-144999) 2026-02-19 23:06:15 +09:00
Chris EiblandGitHub c06f4f4301 GH-144679: When building with VS 2026 on Windows, use PlatformToolset v145 by default (GH-144680) 2026-02-19 12:38:46 +00:00
Serhiy StorchakaandGitHub 767b4d02e2 gh-144882: Optimize name tables in unicodedata by excluding names derived by rule NR2 (GH-144883)
Since the code for rule NR2 is already here, to support CJK unified
ideographs and Tangut ideographs, it can also be used for other names
derived by rule NR2.
2026-02-18 12:58:21 +02:00
Stan UlbrychandGitHub e49bfca87c gh-142224: unicodedata: support bidi classes for unassigned code points (GH-144815) 2026-02-18 12:54:07 +02:00
696cdfc0a2 gh-141510, PEP 814: Add built-in frozendict type (#144757)
Add TYPE_FROZENDICT to the marshal module.

Add C API functions:

* PyAnyDict_Check()
* PyAnyDict_CheckExact()
* PyFrozenDict_Check()
* PyFrozenDict_CheckExact()
* PyFrozenDict_New()

Add PyFrozenDict_Type C type.

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Adam Johnson <[email protected]>
Co-authored-by: Benedikt Johannes <[email protected]>
2026-02-17 10:54:41 +01:00
8b7b5a9946 gh-80667: Fix Tangut ideographs names in unicodedata (GH-144789)
Co-authored-by: Pierre Le Marre <[email protected]>
2026-02-16 13:31:18 +02:00
Zachary WareandGitHub b933ef9261 gh-144551: Update CI to use latest OpenSSL versions (GH-144794)
Also update _ssl_data_36.h to include an added symbol from 3.6.1.
2026-02-13 13:06:07 -06:00
46d5106cfa gh-142349: Implement PEP 810 - Explicit lazy imports (#142351)
Co-authored-by: T. Wouters <[email protected] >
Co-authored-by: Brittany Reynoso <[email protected]>
Co-authored-by: Dino Viehland <[email protected]>
2026-02-12 00:15:33 +00:00
Stan UlbrychandGitHub fd190d1fa1 gh-144492: Fix process_changed_files outputs for reusable-{macos, wasi}.yml (#144518)
Fix `process_changed_files` double-processing reusable-{macos, wasi] ending up with incorrect outputs
2026-02-09 19:30:19 +02:00
Savannah OstrowskiandGitHub e682141c49 Bump pre-commit hooks (#144576) 2026-02-07 23:14:18 +00:00
d891b2bbd1 gh-139103: Improve namedtuple scaling in free-threaded build (gh-144332)
Add `_Py_type_getattro_stackref`, a variant of type attribute lookup
that returns `_PyStackRef` instead of `PyObject*`. This allows returning
deferred references in the free-threaded build, reducing reference count
contention when accessing type attributes.

This significantly improves scaling of namedtuple instantiation across
multiple threads.

* Add blurb

* Rename PyObject_GetAttrStackRef to _PyObject_GetAttrStackRef

* Apply suggestion from @vstinner

Co-authored-by: Victor Stinner <[email protected]>

* Apply suggestion from @vstinner

Co-authored-by: Victor Stinner <[email protected]>

* format

* Update Include/internal/pycore_function.h

Co-authored-by: Victor Stinner <[email protected]>

---------

Co-authored-by: Victor Stinner <[email protected]>
2026-02-06 09:43:05 -05:00
914fbec214 gh-141004: Document remaining pyport.h utility macros (GH-144279)
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
2026-02-04 11:43:47 -05:00
37c35542a9 gh-143120: pixi builds for free-threading and TSAN (#142872)
Co-authored-by: Isuru Fernando <[email protected]>
Co-authored-by: Lucas Colley <[email protected]>
2026-02-04 09:58:29 +05:30
Sam GrossandGitHub 7e2c9bdc98 gh-120321: Add gi_state, cr_state, and ag_state attributes (gh-144409)
Add `gi_state`, `cr_state`, and `ag_state` attributes to generators,
coroutines, and async generators respectively. These attributes return the
current state as a string (e.g., `GEN_RUNNING`, `CORO_SUSPENDED`).

The `inspect.getgeneratorstate()`, `inspect.getcoroutinestate()`, and
`inspect.getasyncgenstate()` functions now return these attributes directly.

This is in preparation for making `gi_frame` thread-safe, which may involve
stop-the-world synchronization. The new state attributes avoid potential
performance cliffs in `inspect.getgeneratorstate()` and similar functions by
not requiring frame access.

Also removes unused `FRAME_COMPLETED` state and renumbers the frame state enum
to start at 0 instead of -1.
2026-02-03 13:06:32 -05:00
Mark ShannonandGitHub 141fd8b894 GH-144179: Add value recording to JIT tracing front-end (GH-144303) 2026-02-02 16:57:04 +00:00
Petr ViktorinandGitHub 70e67f579e gh-141376: smelly.py: Print only smelly symbols, or all of them with --verbose (GH-141394)
Instead of long and uninteresting output for all checked libraries, only print found issues by default.

Add a new -v/--verbose option to list all symbols (useful for checking that the script finds the symbols).
2026-01-23 17:51:29 +01:00
6181b69970 GH-143941: Move WASI-related files to Platforms/WASI (GH-143942)
Along the way, leave a deprecated Tools/wasm/wasi/__main__.py behind for backwards-compatibility.

Co-authored-by: Zachary Ware <[email protected]>
2026-01-21 14:31:58 -08:00
a126893fa8 gh-143960: Add support for OpenSSL 3.6, drop EOL 3.2 (#143961)
Co-authored-by: Gregory P. Smith <[email protected]>
2026-01-20 17:25:31 +02:00
Hai ZhuandGitHub b4b73245d8 gh-143421: Use new buffer to save optimized uops (GH-143682) 2026-01-17 15:52:16 +00:00
Peter BiermaandGitHub d51c01a271 gh-141004: Document PyException_HEAD and PyDescr_COMMON (GH-143896) 2026-01-17 10:39:29 -05:00
Neil SchemenauerandGitHub bb25f7280a gh-132657: Add maybe_enable_deferred_ref_count() (gh-142843)
If we are specializing to `LOAD_GLOBAL_MODULE` or `LOAD_ATTR_MODULE`, try
to enable deferred reference counting for the value, if the object is owned by
a different thread.  This applies to the free-threaded build only and should
improve scaling of multi-threaded programs.
2026-01-17 01:54:43 +00:00
Ken JinandGitHub 949b5ec8e6 gh-142913: Remove JIT interpreter for interpreter generator tests (GH-143944) 2026-01-17 00:34:39 +00:00
Dino ViehlandandGitHub 4d5a676aa0 gh-142913: Add test case for interpreter generator w/ overridden opcodes (#142911)
Add test case for interpreter generator w/ overridden opcodes
2026-01-16 10:33:29 -08:00
edeebe22cb gh-143572: Run 'python3-libraries' fuzzer in CI using CIFuzz (#143749)
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
2026-01-16 18:09:39 +02:00
bab1d7a561 gh-74902: Add Unicode Grapheme Cluster Break algorithm (GH-143076)
Add the unicodedata.iter_graphemes() function to iterate over grapheme
clusters according to rules defined in Unicode Standard Annex #29.

Add unicodedata.grapheme_cluster_break(), unicodedata.indic_conjunct_break()
and unicodedata.extended_pictographic() functions to get the properties
of the character which are related to the above algorithm.

Co-authored-by: Guillaume "Vermeille" Sanchez <[email protected]>
2026-01-14 14:37:57 +00:00
0e0d51cdce gh-141004: Document several soft-deprecated C APIs (GH-141634)
Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
2026-01-14 08:20:33 -05:00
Stan UlbrychandGitHub 1176facbf2 gh-141004: Don't trigger run-tests when Tools/check-c-api-docs/ignored_c_api.txt is changed (GH-143583) 2026-01-13 08:28:09 -05:00
Petr ViktorinandGitHub f0a0467c17 gh-143054: Disallow non-top-level Cut for now (GH-143622)
The behaviour of Cut in nested parentheses, Repeat, Opt, and similar
is somewhat chaotic. Apparently even the academic papers on PEG aren't
as clear as they could be.

And it doesn't really matter. Python only uses top-level cuts.
When that changes, we can clarify as much as necessary (and even
change the implementation to make sense for what we'll need).

Document that this is deliberately unspecified, and add a test to
make sure any decision is deliberate, tested and documented.
2026-01-13 13:21:59 +01:00
a7ba3b124f gh-141004: Document symbol visibility macros (PyAPI_DATA, Py_EXPORTED_SYMBOL, Py_LOCAL_SYMBOL,Py_IMPORTED_SYMBOL) (GH-143508)
Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
2026-01-13 13:15:02 +01:00
YashrajandGitHub 42f7c2dfba gh-141004: Document PyUnicode_IS_COMPACT and PyUnicode_IS_COMPACT_ASCII macros (GH-143494) 2026-01-12 13:59:59 +01:00
Ken JinandGitHub 548526bbbe gh-134584: JIT: Remove redundant refcounting for UNARY_{INVERT|NEGATIVE} (GH-143704) 2026-01-11 20:42:55 +00:00
Ken JinandGitHub 95259116ec gh-142764: Restore REPLACE_OPCODE_IF_EVALUATES_PURE optimization for some ops (GH-143335) 2026-01-09 23:18:22 +00:00
1932127ec7 gh-141004: Document remaining constants from patchlevel.h (GH-143598)
Co-authored-by: Victor Stinner <[email protected]>
2026-01-09 17:40:07 +00:00
Petr ViktorinandGitHub 234a15dc4e gh-141004: Improve make check-c-api-docs (GH-143564)
- Gather all documented names into a set in a single pass.
  This makes the check much faster.

- Do not match substrings (e.g. documenting `PyErr_WarnEx`
  doesn't mean that `PyErr_Warn` is documented)

- Consider `PY`-prefixed names (a lot of old macros use this)
2026-01-09 11:16:50 +01:00
49c3b0a67a gh-142095: Use thread local frame info in py-bt and py-bt-full when available (gh-143371)
In optimized and `-Og` builds, arguments and local variables are frequently
unavailable in gdb. This makes `py-bt` fail to print anything useful. Use the
`PyThreadState*` pointers `_Py_tss_gilstate` and `Py_tss_tstate` to find the
interpreter frame if we can't get the frame from the
`_PyEval_EvalFrameDefault` call.

Co-authored-by: Victor Stinner <[email protected]>
2026-01-08 09:18:24 -05:00
Sam GrossandGitHub d04394929b gh-117657: Remove remaining TSan suppressions (gh-143499) 2026-01-07 17:34:05 +00:00
Sam GrossandGitHub 98e55d70bc gh-132070: Fix PyObject_Realloc thread-safety in free threaded Python (gh-143441)
The PyObject header reference count fields must be initialized using
atomic operations because they may be concurrently read by another
thread (e.g., from `_Py_TryIncref`).
2026-01-06 15:55:37 -05:00
Donghee NaandGitHub 98258326a9 no-issue: Fix optimizer_generator.py to print abstract_uop_name properly (gh-143366) 2026-01-02 17:18:15 +00:00
Sam GrossandGitHub e8e044eda3 gh-143100: Fix memcpy data race in setobject.c (gh-143127) 2025-12-24 08:02:19 -05:00
Diego RussoandGitHub fc2f0fea6b JIT: Move executor to a register (#143072) 2025-12-24 09:44:16 +00:00
Sam GrossandGitHub 50ecd6b880 gh-143108: Don't instrument faulthandler.c for TSan (#143109)
The dumping of tracebacks has data races and that's okay (it's best
effort).
2025-12-24 02:12:55 +01:00
Sam GrossandGitHub cbe0cb779a gh-143100: Add temporary suppression for set_swap_bodies (gh-143114) 2025-12-23 15:52:59 -05:00
Mark ShannonandGitHub 20aeb3a463 GH-143026: Fix assertion error in executor management. (GH-143104) 2025-12-23 17:19:34 +00:00
Pablo Galindo SalgadoandGitHub 81c8eb85e1 gh-138122: Add blocking mode for accurate stack traces in Tachyon (#142998) 2025-12-23 10:49:47 +00:00
Pablo Galindo SalgadoandGitHub 9e51301234 gh-138122: Allow tachyon to write and read binary output (#142730) 2025-12-22 23:57:20 +00:00
be3c131640 GH-139922: Tail calling for MSVC (VS 2026) (GH-143068)
Co-authored-by: Ken Jin <[email protected]>
Co-authored-by: Brandt Bucher <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
2025-12-22 23:01:34 +00:00
Sam GrossandGitHub e46f28c6af gh-129069: Fix listobject.c data races due to memmove (gh-142957)
The use of memmove and _Py_memory_repeat were not thread-safe in the
free threading build in some cases. In theory, memmove and
_Py_memory_repeat can copy byte-by-byte instead of pointer-by-pointer,
so concurrent readers could see uninitialized data or tearing.

Additionally, we should be using "release" (or stronger) ordering to be
compliant with the C11 memory model when copying objects within a list.
2025-12-19 18:06:47 -05:00
Sam GrossandGitHub 08bc03ff2a gh-120321: Make gi_frame_state transitions atomic in FT build (gh-142599)
This makes generator frame state transitions atomic in the free
threading build, which avoids segfaults when trying to execute
a generator from multiple threads concurrently.

There are still a few operations that aren't thread-safe and may crash
if performed concurrently on the same generator/coroutine:

 * Accessing gi_yieldfrom/cr_await/ag_await
 * Accessing gi_frame/cr_frame/ag_frame
 * Async generator operations
2025-12-19 19:10:37 +00:00
Diego RussoandGitHub 685272eb8a JIT: Rename trampoline.c to shim.c (#142974) 2025-12-19 14:39:41 +00:00
Sam GrossandGitHub f54d44d333 gh-129068: Make range iterators thread-safe (gh-142886)
Now that we specialize range iteration in the interpreter for the common
case where the iterator has only one reference, there's not a
significant performance cost to making the iteration thread-safe.
2025-12-18 13:11:51 -05:00