4805 Commits

Author SHA1 Message Date
Seth Michael Larson
daae1279ad
[3.14] gh-143572: Run 'python3-libraries' fuzzer in CI using CIFuzz (… (#143912)
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <578543+webknjaz@users.noreply.github.com>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-01-16 19:24:30 +02:00
Miss Islington (bot)
bbd11568a7
[3.14] gh-143054: Disallow non-top-level Cut for now (GH-143622) (GH-143790)
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.
(cherry picked from commit f0a0467c176e245a8fd45d4480a0876d748d7e78)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-01-15 13:52:39 +01:00
Miss Islington (bot)
37c4a6551a
[3.14] gh-141004: Document symbol visibility macros (PyAPI_DATA, Py_EXPORTED_SYMBOL, Py_LOCAL_SYMBOL,Py_IMPORTED_SYMBOL) (GH-143508) (GH-143786)
(cherry picked from commit a7ba3b124f707f73b94b59f13908872f1a48e24f)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-01-15 13:34:27 +01:00
Miss Islington (bot)
fd174d76de
[3.14] gh-141004: Document several soft-deprecated C APIs (GH-141634) (GH-143837)
gh-141004: Document several soft-deprecated C APIs (GH-141634)
(cherry picked from commit 0e0d51cdcef903d8a990c8e264f32f2f28af0673)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-01-14 13:25:57 +00:00
Petr Viktorin
9c834b4f84
[3.14] gh-141004: Document PyUnicode_IS_COMPACT and PyUnicode_IS_COMPACT_ASCII macros (GH-143494) (GH-143785)
(cherry picked from commit 42f7c2dfba58a8a8f31aba727d0fc51dd3ce2fce)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
2026-01-13 19:06:23 +01:00
Miss Islington (bot)
a705f57678
[3.14] gh-141004: Don't trigger run-tests when Tools/check-c-api-docs/ignored_c_api.txt is changed (GH-143583) (GH-143793)
gh-141004: Don't trigger `run-tests` when `Tools/check-c-api-docs/ignored_c_api.txt` is changed (GH-143583)
(cherry picked from commit 1176facbf21388ef29276ec55a95a66423f61191)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-01-13 13:53:59 +00:00
Petr Viktorin
deb75a5296
[3.14] gh-141004: Improve make check-c-api-docs (GH-143564) (GH-143593)
- 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)

(cherry picked from commit 234a15dc4ec2d8f8ababea91532ebe896a96387a)
2026-01-12 14:04:39 +01:00
Miss Islington (bot)
0f02dbe4ab
[3.14] gh-142095: Use thread local frame info in py-bt and py-bt-full when available (gh-143371) (#143566)
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.
(cherry picked from commit 49c3b0a67a77bb42e736cea7dcbc1aa8fa704074)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-01-08 12:35:31 -05:00
Miss Islington (bot)
eb1284eb26
[3.14] gh-142859: Add Tools/check-c-api-docs to mypy check (GH-142860) (#142871)
gh-142859: Add `Tools/check-c-api-docs` to mypy check (GH-142860)
(cherry picked from commit 248eb3efb3cad7799ef9b4a2dd77a66d1ae65c11)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-12-17 11:50:22 +00:00
Stan Ulbrych
b317c60e04
[3.14] gh-142278: Add granular change detection for platforms in CI (GH-142350) (#142537)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-11 09:16:13 +02:00
Miss Islington (bot)
7621bbd828
[3.14] gh-142454: Make the JIT digest more deterministic by sorting the files in Tools/jit (GH-142455) (#142485)
gh-142454: Make the JIT digest more deterministic by sorting the files in Tools/jit (GH-142455)
(cherry picked from commit bcf90de8ba2ea087540a5f632656ef880ee46b5c)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2025-12-09 18:50:53 +00:00
Miss Islington (bot)
8cb65ca1dd
[3.14] gh-138061: Exclude __pycache__ directory from the computed digest in the JIT stencils (GH-138131) (#142482)
Co-authored-by: alm <alonme@users.noreply.github.com>
2025-12-09 18:18:14 +00:00
Miss Islington (bot)
20b454d272
[3.14] Fix typo in Tools/wasm/README.md (GH-142426) (GH-142429)
Fix typo in `Tools/wasm/README.md` (GH-142426)
(cherry picked from commit 719d7960e2b55ab8310df3d9d69b7c9df3283fbf)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-08 20:54:24 +00:00
Miss Islington (bot)
5a639ca1b3
[3.14] Introduce build-python and build-host subcommands for Tools/wasm/wasi (GH-142266) (#142322)
Introduce `build-python` and `build-host` subcommands for `Tools/wasm/wasi` (GH-142266)

It should make it easier when you need to rebuild just the e.g. host Python, but it requires ./configure to run.
(cherry picked from commit 58e1c7a16f0926b1047c336eeed2849d5fff7c70)

Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-12-05 15:04:50 -08:00
Peter Bierma
d069edc9e8
[3.14] gh-141004: Add a CI job ensuring that new C APIs include documentation (GH-142102) (GH-142247)
* gh-141004: Add a CI job ensuring that new C APIs include documentation (GH-142102)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
(cherry picked from commit 1a7824a927f0706300af7bfc182884a43e2f587a)

---------

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-04 08:07:39 -05:00
Miss Islington (bot)
afaa3b02f7
[3.14] Being more flexible in when not to explicitly set the sysroot when compiling for WASI (GH-142242) (GH-142246)
Being more flexible in when not to explicitly set the sysroot when compiling for WASI (GH-142242)
(cherry picked from commit c5252045d3a7164f1829503d122091b5e469fda3)

Co-authored-by: Brett Cannon <brett@python.org>
2025-12-04 00:16:37 +00:00
Sam Gross
b7c25eabd6
[3.14] gh-139103: fix free-threading dataclass.__init__ perf issue (gh-141596) (gh-141750)
The dataclasses `__init__` function is generated dynamically by a call to `exec()` and so doesn't have deferred reference counting enabled. Enable deferred reference counting on functions when assigned as an attribute to type objects to avoid reference count contention when creating dataclass instances.
(cherry picked from commit ce791541769a41beabec0f515cd62e504d46ff1c)

Co-authored-by: Edward Xu <xuxiangad@gmail.com>
2025-11-19 15:00:51 +00:00
Miss Islington (bot)
79195df23c
[3.14] gh-140260: fix data race in _struct module initialization with subinterpreters (GH-140909) (#141501)
gh-140260: fix data race in `_struct` module initialization with subinterpreters (GH-140909)
(cherry picked from commit 63548b36998e7f7cd5c7c28b53b348a93f836737)

Co-authored-by: Shamil <ashm.tech@proton.me>
2025-11-13 17:23:22 +05:30
Hugo van Kemenade
7168553c00
[3.14] gh-138189: Document type slots, and other constants, as part of Limited API (GH-138190) (GH-141131)
(cherry picked from commit d81e1ef0f3a7c63f5d246e4cf918700016b72489)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-11-06 12:39:19 +01:00
Miss Islington (bot)
ab1fdf3d7c
[3.14] gh-140312: Set lltrace on JIT debug builds (GH-140313) (#140887)
gh-140312: Set lltrace on JIT debug builds (GH-140313)
(cherry picked from commit f701f98052e906af9a065d68bdf2398ef3b476d9)

Co-authored-by: Ken Jin <kenjin@python.org>
Co-authored-by: Mark Shannon <mark@hotpy.org>
2025-11-01 16:49:35 +00:00
Miss Islington (bot)
6c025a040d
[3.14] Make printing log lines to the terminal a little cleaner when building WASI (GH-140772) (GH-140804)
Make printing log lines to the terminal a little cleaner when building WASI (GH-140772)
(cherry picked from commit abd19eddee20a7d05266f11f6042a84b04d29664)

Co-authored-by: Brett Cannon <brett@python.org>
2025-10-30 18:02:10 +00:00
Miss Islington (bot)
e595d995c4
[3.14] GH-140768: Warn when the WASI SDK version doesn't match the supported version (GH-140769) (GH-140801)
GH-140768: Warn when the WASI SDK version doesn't match the supported version (GH-140769)
(cherry picked from commit 95a3564869daa3cc083e4d4603f5f03ee5f53e31)

Co-authored-by: Brett Cannon <brett@python.org>
2025-10-30 17:01:22 +00:00
Miss Islington (bot)
5848d80536
[3.14] gh-139590: Stricter ruff rules for Tools/wasm (GH-139752) (#139811)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-10-14 10:29:32 +03:00
Miss Islington (bot)
7c03e9078d
[3.14] GH-129805: Clean up some changes from GH-129806 (GH-133540) (#138972)
Co-authored-by: Brandt Bucher <brandt@python.org>
2025-10-09 14:12:25 +03:00
Kumar Aditya
90cd009209
[3.14] gh-139748: fix leaks in AC error paths when using unicode FS-b… (#139789)
* [3.14] gh-139748: fix leaks in AC error paths when using unicode FS-based converters (GH-139765)
(cherry picked from commit b04a57deef66ce08233be57d1ab5873388df2cea)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-10-08 22:16:21 +05:30
Miss Islington (bot)
c5ab1b7661
[3.14] GH-139590: Run ruff format on pre-commit for Tools/wasm (GH-139591) (#139744)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-10-08 08:11:09 -07:00
Miss Islington (bot)
297157d968
[3.14] gh-92266: Update pre-commit (GH-139411) (#139466)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-10-08 13:25:17 +03:00
Miss Islington (bot)
9e0b7d0866
[3.14] GH-137484: Have Tools/wasm/wasi use the build triple instead of "build" (GH-137485) (#137487)
GH-137484: Have `Tools/wasm/wasi` use the build triple instead of "build" (GH-37485)

This should help prevent issuse where something like a container is used to do one build and then someone tries to build again locally.
(cherry picked from commit 0953200b136bcb3293cc1bd57a062796ffcd529d)

Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-10-08 02:11:31 +00:00
Miss Islington (bot)
6b090c9272
[3.14] GH-137248: Add a --logdir option to Tools/wasm/wasi (GH-137249) (GH-137252)
GH-137248: Add a `--logdir` option to `Tools/wasm/wasi` (GH-137249)
(cherry picked from commit 94498a53f308a079be9860e0f0d470eeaeb082ff)

Co-authored-by: Brett Cannon <brett@python.org>
2025-10-07 23:51:19 +00:00
Miss Islington (bot)
9f97fa30f8
[3.14] GH-137243: Have Tools/wasm/wasi detect WASI SDK installs in /opt when the release tarball is extracted (GH-137244) (GH-137250)
GH-137243: Have `Tools/wasm/wasi` detect WASI SDK installs in `/opt` when the release tarball is extracted (GH-137244)
(cherry picked from commit 2f1a9f2ed498b3cb2dd5f4616bf3a07fd1ad074c)

Co-authored-by: Brett Cannon <brett@python.org>
2025-10-07 23:13:35 +00:00
Miss Islington (bot)
e953cead61
[3.14] Touch up Setup.local handling in Tools/wasm/wasi (GH-137051) (GH-137053)
Touch up `Setup.local` handling in `Tools/wasm/wasi` (GH-137051)

The comment in the generated file is now more self-explanatory. The checks for unexpected file contents are also strengthened.
(cherry picked from commit ec7fad79d24e79961b86e17177a32b32bb340fe5)

Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Zachary Ware <zach@python.org>
2025-10-07 20:58:53 +00:00
Serhiy Storchaka
9ec4e3838a
[3.14] gh-138264: Fix gcc 14 compiler warnings (GH-138265) (GH-138426)
(cherry picked from commit 4a33077fdb546db71b16d50cdd552529a9a1c910)
2025-10-07 22:26:05 +02:00
Miss Islington (bot)
db8b943259
[3.14] GH-92266: Remove embedded tabs from `c-analyzer/cpython/_parser.py` (GH-137622) (#139718)
GH-92266: Remove embedded tabs from ``c-analyzer/cpython/_parser.py`` (GH-137622)
(cherry picked from commit 2212ae5557d4ad9dfc792f728d2bf2697b063b92)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-10-07 18:45:49 +00:00
Miss Islington (bot)
0a517786af
[3.14] Bump mypy to 1.17.1 (GH-137542) (#137543)
Bump mypy to 1.17.1 (GH-137542)
(cherry picked from commit fb1cb00030c706366dfd1a457dd5de324d5619ea)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-10-07 19:32:55 +01:00
Miss Islington (bot)
bf397e272c
[3.14] gh-133467: fix data race in type_set_name (GH-137302) (#137303)
gh-133467: fix data race in `type_set_name` (GH-137302)

Fix data race in `type_set_name` by assigning name under stop the world pause making it thread safe in free-threading.
(cherry picked from commit e99bc7fd44bbbf2464c37d5a57777ac0e1264c37)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-10-07 18:18:23 +00:00
Miss Islington (bot)
7d9b2671c6
[3.14] gh-123681: Check NORMALIZE_CENTURY behavior at runtime; require C99 (GH-136022) (GH-137947)
A runtime check is needed to support cross-compiling.

Remove the _Py_NORMALIZE_CENTURY macro.
Remove _pydatetime.py's _can_support_c99.
(cherry picked from commit 719e5c3f7111bcda5eee72fe648786c427c4d4c2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-07 19:59:06 +02:00
Sam Gross
85dabb9c15
[3.14] gh-137238: Fix data race in _Py_slot_tp_getattr_hook (gh-137240) (#137416)
Replacing the slot isn't thread-safe if the GIL is disabled. Don't
require that the slot has been replaced when specializing.
(cherry picked from commit 485b16b4f7b28cefdfb524c2869d473078e349bf)
2025-10-07 17:36:56 +00:00
Miss Islington (bot)
8cb73119c6
[3.14] gh-139573: Update OpenSSL in CI (GH-139577) (#139583)
gh-139573: Update OpenSSL in CI (GH-139577)
(cherry picked from commit 98e748b3a0d97bd2c785efc63693f971113b3b63)

Co-authored-by: Zachary Ware <zach@python.org>
2025-10-05 07:50:26 +03:00
Miss Islington (bot)
7519ac294f
[3.14] gh-139330: Check expat version/checksum in SBOM with refresh.sh
gh-139330: Check expat version/checksum in SBOM with refresh.sh

Check expat version/checksum in SBOM with refresh.sh
(cherry picked from commit 89b5571025a5316ea3855c8e595a5f3c3ae11f8f)

Co-authored-by: Seth Michael Larson <seth@python.org>
2025-09-25 18:30:14 +00:00
Miss Islington (bot)
0e4e608f03
[3.14] gh-128627: Use __builtin_wasm_test_function_pointer_signature for Emscripten trampoline (GH-137470) (#139039)
gh-128627: Use __builtin_wasm_test_function_pointer_signature for Emscripten trampoline (GH-137470)

With https://github.com/llvm/llvm-project/pull/150201 being merged, there is
now a better way to generate the Emscripten trampoline, instead of including
hand-generated binary WASM content. Requires Emscripten 4.0.12.
(cherry picked from commit 2629ee4eb0e9f66f28772cb4b4cc44ebe6de79ad)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2025-09-17 17:21:01 +01:00
Miss Islington (bot)
c1154943b1
[3.14] gh-138896: Fix error installing C runtime on non-updated Windows machines (GH-138932) (#139034)
Co-authored-by: adang1345 <adang1345@gmail.com>
2025-09-17 17:22:41 +03:00
Miss Islington (bot)
389450399a
[3.14] gh-136264: Fix `--relative-paths` for PEP 739's build-details.json (GH-138510) (#138638)
* gh-136264: Fix ``--relative-paths`` for PEP 739's build-details.json (GH-138510)

* KeyError is not raised for defaultdict
* Fix relative paths on different drives on Windows
* Add a round-trip test
(cherry picked from commit 057ee1741015067b46446e46eab467c1fa82610d)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Itamar Oren <itamarost@gmail.com>

* Update test_build_details.py

* Update Lib/test/test_build_details.py

---------

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Itamar Oren <itamarost@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-09-09 19:15:40 +03:00
Miss Islington (bot)
b6fa945ff9
[3.14] gh-138286: Run `ruff on Tools/i18n` (GH-138287) (#138513)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
2025-09-05 11:28:56 +00:00
Miss Islington (bot)
09f1eff0df
[3.14] gh-138515: Include email module in Emscripten build (gh-138520) (#138533)
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
2025-09-05 13:53:39 +03:00
sobolevn
8e1c2fe3d3
[3.14] gh-138281: Run ruff on Tools/peg_generator (GH-138282) (#138469)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-09-04 11:13:36 +00:00
Miss Islington (bot)
5ec6d56405
[3.14] gh-138257: Fix internal RuleCollectorVisitor attribute name (GH-138208) (#138259)
Co-authored-by: chemelnucfin <3982092+chemelnucfin@users.noreply.github.com>
2025-08-31 09:54:59 +03:00
Miss Islington (bot)
b79becefb6
[3.14] gh-138158: Use the "data" tarfile extraction filter in Tools/ssl/multissltests.py (GH-138147) (#138262)
Co-authored-by: Tommaso Bona <piergeolo@gmail.com>
2025-08-31 09:53:21 +03:00
Miss Islington (bot)
e3fb55ed2d
[3.14] gh-133403: Run mypy on Tools/build/check_warnings.py (GH-137700) (#137763)
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-08-27 18:37:56 +03:00
Miss Islington (bot)
bb3c3d4444
[3.14] gh-137964: Remove the "experimental" designation from the Windows installer (GH-137965) (#137971)
Co-authored-by: Itamar Oren <itamarost@gmail.com>
2025-08-20 20:19:45 +03:00
Zachary Ware
d8f4d56f83
[3.14] gh-132339: Add support for OpenSSL 3.5 (GH-137720) (#137747)
* Add OpenSSL 3.5.2 definitions to Modules/_ssl_data_35.h (moved from Modules/_ssl_data_34.h)

* Demote OpenSSL 3.1 to "old", remove it from CI

* Update all OpenSSL versions to latest patchlevel in CI config and multissltests defaults

* Add OpenSSL 3.5.2 to CI configuration and multissltests default list

* Fix a typo in the argument parser description of multissltests.py
(cherry picked from commit 7a703c8f1942c8bd07943458962f6e59d2892757)
2025-08-14 08:58:18 +03:00