Commit graph

4783 commits

Author SHA1 Message Date
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 b04a57deef)

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 0953200b13)

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 94498a53f3)

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 2f1a9f2ed4)

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 ec7fad79d2)

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 4a33077fdb)
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 2212ae5557)

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 fb1cb00030)

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 e99bc7fd44)

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 719e5c3f71)

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 485b16b4f7)
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 98e748b3a0)

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 89b5571025)

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 2629ee4eb0)

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 057ee17410)

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 7a703c8f19)
2025-08-14 08:58:18 +03:00
Miss Islington (bot)
b7df473260
[3.14] gh-133403: Check generate_stdlib_module_names and check_extension_modules with mypy (GH-137546) (#137679)
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-08-13 13:42:26 +03:00
Miss Islington (bot)
38a42fe32c
[3.14] gh-136976: Emscripten: Add _decimal and libmpdec (GH-136997) (#137066)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Zachary Ware <zach@python.org>
2025-07-29 23:10:39 +03:00
Miss Islington (bot)
64eb54062d
[3.14] gh-124621: Emscripten: Add smoke test for using pyrepl in Chrome (GH-137004) (#137067)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Zachary Ware <zach@python.org>
2025-07-29 23:09:47 +03:00
Miss Islington (bot)
d996cb6700
[3.14] Exclude _testclinic_depr.c.h from c-analyzer (GH-137086) (#137089)
Exclude _testclinic_depr.c.h from c-analyzer (GH-137086)

_testclinic.c mocks out PY_VERSION_HEX to 3.8 before including
_testclinic_depr.c.h to avoid the errors the preprocessor would
otherwise throw due to the deprecation feature it is testing.

(cherry picked from commit d5e75c0768)

Co-authored-by: Zachary Ware <zach@python.org>
2025-07-25 00:36:11 +03:00
Łukasz Langa
591019e1f2
[3.14] gh-124621: Emscripten: Support pyrepl in browser (GH-136931) (GH-136988)
Basic support for pyrepl in Emscripten. Limitations:
* requires JSPI
* no signal handling implemented

As followup work, it would be nice to implement a webworker variant
for when JSPI is not available and proper signal handling.

Because it requires JSPI, it doesn't work in Safari. Firefox requires
setting an experimental flag. All the Chromiums have full support since
May. Until we make it work without JSPI, let's keep the original web_example
around.
(cherry picked from commit c933a6bb32)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Éric <merwok@netwok.org>
2025-07-22 15:04:11 +02:00
Miss Islington (bot)
4f1f648c3b
[3.14] gh-136251: Improvements to WASM demo REPL (GH-136252) (GH-136977)
(cherry picked from commit d1d526afe7)

Co-authored-by: adam j hartz <adam@smatz.net>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2025-07-22 13:25:35 +02:00
Miss Islington (bot)
d118bc061b
[3.14] gh-124621: Emscripten: Add support for async input devices (GH-136822) (GH-136935)
This is useful for implementing proper `input()`. It requires the
JavaScript engine to support the wasm JSPI spec which is now stage 4.
It is supported on Chrome since version 137 and on Firefox and node
behind a flag.

We override the `__wasi_fd_read()` syscall with our own variant that
checks for a readAsync operation. If it has it, we use our own async
variant of `fd_read()`, otherwise we use the original `fd_read()`.
We also add a variant of `FS.createDevice()` called
`FS.createAsyncInputDevice()`.

Finally, if JSPI is available, we wrap the `main()` symbol with
`WebAssembly.promising()` so that we can stack switch from `fd_read()`.
If JSPI is not available, attempting to read from an AsyncInputDevice
will raise an `OSError`.
(cherry picked from commit 7ae4749d06)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2025-07-22 11:51:02 +02:00
Miss Islington (bot)
4af1b72b31
[3.14] gh-133600: Move config.site-wasm32-emscripten into the emscripten folder (GH-136934) (#136956)
Reorganises the large Emscripten-specific file into the Emscripten folder.
(cherry picked from commit bbe589f93c)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2025-07-22 00:22:57 +00:00
Miss Islington (bot)
4f6f3ee8d3
[3.14] gh-136852: Emscripten: Add PYTHON_NODE_VERSION environment variable (GH-136853) (GH-136907)
To choose the node version we use. Together with:
https://github.com/python/buildmaster-config/pull/614
closes GH-136852.
(cherry picked from commit aec7f5f8b2)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2025-07-21 11:58:57 +02:00
Miss Islington (bot)
81aab6d51c
[3.14] parser_generator.py typo - keywods -> keywords (GH-135014) (#136772)
Co-authored-by: chemelnucfin <3982092+chemelnucfin@users.noreply.github.com>
2025-07-19 09:18:55 +00:00
Miss Islington (bot)
cdf98c3b7e
[3.14] gh-127146: Report uid in Emscripten + node as native uid (GH-136509) (#136699)
Corrects the handling of getuid on emscripten, which was consistently reporting as 0.
(cherry picked from commit e81c4e84b3)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2025-07-16 06:50:51 +02:00
Miss Islington (bot)
55eaaab8a4
[3.14] gh-116738: Make grp module thread-safe (GH-135434) (#136658)
gh-116738: Make grp module thread-safe (GH-135434)

Make grp module methods getgrgid() and getgrnam() thread-safe when the GIL is disabled and getgrgid_r()/getgrnam_r() C APIs are not available.
---------
(cherry picked from commit 9363703bd3)

Co-authored-by: Alper <alperyoney@fb.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-07-15 11:03:33 +05:30
Miss Islington (bot)
ba070b6b07
[3.14] gh-135256: Simplify parsing parameters in Argument Clinic (GH-135257) (121914136635)
(cherry picked from commit b74fb8e220)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-07-13 20:52:02 +00:00
Miss Islington (bot)
145c08629b
[3.14] gh-136297: Fix hypothesis and subTest usage in test_zoneinfo_property.py (GH-136384) (#136407)
gh-136297: Fix `hypothesis` and `subTest` usage in `test_zoneinfo_property.py` (GH-136384)
(cherry picked from commit db699db99d)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-07-08 08:16:51 +00:00
Miss Islington (bot)
3bc42942af
[3.14] GH-134273: Allow setting JIT compiler flags at build time with CFLAGS_JIT (GH-135792)
(cherry picked from commit 2b0c684e07)
Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-07-01 14:34:59 -07:00
Miss Islington (bot)
5e65cbbe64
[3.14] Doc: fix duplicated words (GH-136086) (#136108)
Doc: fix duplicated words (GH-136086)

---------
(cherry picked from commit 698bab5a40)

Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-06-29 18:45:26 -04:00
Brett Cannon
4ba18128f9
[3.14] GH-133600: Backport file reorg of Tools/wasm/wasi (GH-135950)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-26 19:24:33 +00:00
Miss Islington (bot)
148f31f2d8
[3.14] gh-135648: Document that shutil.copyfileobj doesn't flush (GH-135737) (#135873)
Adds a note about flush/close on copyfileobj, and updates
the Emscripten build script to follow documented advice.
(cherry picked from commit 34393cbdd4)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-06-24 01:22:07 +00:00
Miss Islington (bot)
aad47c1e0b
[3.14] Bump mypy to 1.16.1 (GH-135720) (#135848)
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-06-23 13:09:24 +00:00
Miss Islington (bot)
a843fece61
[3.14] patchcheck: use URL paths to identify upstream remote (GH-135806) (#135808)
Co-authored-by: Kattni <kattni@kattni.com>
2025-06-23 12:56:06 +03:00
Miss Islington (bot)
91d9e9e64e
[3.14] gh-134262: Catch both URLError and ConnectionError in retries (GH-135365) (#135611)
Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-06-17 12:16:17 +00:00
Emma Smith
3233cff84e
[3.14] gh-134262: increase retries in Tools/build/generate_sbom.py … (#135596) 2025-06-17 14:50:15 +03:00