summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* [3.14] gh-124621: Emscripten: Support pyrepl in browser (GH-136931) (GH-136988)Łukasz Langa2025-07-224-3/+229
| | | | | | | | | | | | | | | | | | | 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 c933a6bb329bb97bc7e448388dad1b74f7ca4baa) Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Éric <merwok@netwok.org>
* [3.14] gh-136251: Improvements to WASM demo REPL (GH-136252) (GH-136977)Miss Islington (bot)2025-07-222-51/+321
| | | | | | (cherry picked from commit d1d526afe7ce62c787b150652a2ba136cb949d74) Co-authored-by: adam j hartz <adam@smatz.net> Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
* [3.14] gh-124621: Emscripten: Add support for async input devices ↵Miss Islington (bot)2025-07-221-1/+11
| | | | | | | | | | | | | | | | | | | | | | | (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 7ae4749d064bd49b0dd96172fee20c1f1678d9e9) Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
* [3.14] gh-133600: Move config.site-wasm32-emscripten into the emscripten ↵Miss Islington (bot)2025-07-222-2/+2
| | | | | | | | folder (GH-136934) (#136956) Reorganises the large Emscripten-specific file into the Emscripten folder. (cherry picked from commit bbe589f93ccaf32eb95fd9d1f8f3dc9a536e8db1) Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
* [3.14] gh-136852: Emscripten: Add PYTHON_NODE_VERSION environment variable ↵Miss Islington (bot)2025-07-211-0/+11
| | | | | | | | | | | (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 aec7f5f8b2e8b5e02869cdb4e1f8a9ef87c9f953) Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
* [3.14] parser_generator.py typo - keywods -> keywords (GH-135014) (#136772)Miss Islington (bot)2025-07-191-1/+1
| | | | Co-authored-by: chemelnucfin <3982092+chemelnucfin@users.noreply.github.com>
* [3.14] gh-127146: Report uid in Emscripten + node as native uid (GH-136509) ↵Miss Islington (bot)2025-07-161-0/+1
| | | | | | | | (#136699) Corrects the handling of getuid on emscripten, which was consistently reporting as 0. (cherry picked from commit e81c4e84b3a8688a367099e3adf9b2fcf914447f) Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
* [3.14] gh-116738: Make grp module thread-safe (GH-135434) (#136658)Miss Islington (bot)2025-07-151-0/+1
| | | | | | | | | | 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 9363703bd3bf86e363c14a02e3d729caf1e29f44) Co-authored-by: Alper <alperyoney@fb.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* [3.14] gh-135256: Simplify parsing parameters in Argument Clinic (GH-135257) ↵Miss Islington (bot)2025-07-131-51/+13
| | | | | | | (121914136635) (cherry picked from commit b74fb8e220a50a9580320dfd398a16995b845c69) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.14] gh-136297: Fix `hypothesis` and `subTest` usage in ↵Miss Islington (bot)2025-07-081-1/+1
| | | | | | | | `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 db699db99d214dccb7c4849fa609fdd5188ee038) Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.14] GH-134273: Allow setting JIT compiler flags at build time with ↵Miss Islington (bot)2025-07-012-0/+9
| | | | | | CFLAGS_JIT (GH-135792) (cherry picked from commit 2b0c684e0759dc3fec0e9dd0fc8383e6c75b7b5c) Co-authored-by: Zanie Blue <contact@zanie.dev>
* [3.14] Doc: fix duplicated words (GH-136086) (#136108)Miss Islington (bot)2025-06-291-1/+1
| | | | | | | | | Doc: fix duplicated words (GH-136086) --------- (cherry picked from commit 698bab5a4031c8f54e04e1dd42bcbe3e4564eba5) Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.14] GH-133600: Backport file reorg of `Tools/wasm/wasi` (GH-135950)Brett Cannon2025-06-264-372/+384
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.14] gh-135648: Document that `shutil.copyfileobj` doesn't flush ↵Miss Islington (bot)2025-06-241-1/+2
| | | | | | | | | (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 34393cbdd46fd965de86f1e7bc89ab111f506723) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
* [3.14] Bump mypy to 1.16.1 (GH-135720) (#135848)Miss Islington (bot)2025-06-232-4/+4
| | | | Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.14] patchcheck: use URL paths to identify upstream remote (GH-135806) ↵Miss Islington (bot)2025-06-231-11/+35
| | | | | | (#135808) Co-authored-by: Kattni <kattni@kattni.com>
* [3.14] gh-134262: Catch both URLError and ConnectionError in retries ↵Miss Islington (bot)2025-06-171-1/+1
| | | | | | (GH-135365) (#135611) Co-authored-by: Emma Smith <emma@emmatyping.dev>
* [3.14] gh-134262: increase retries in `Tools/build/generate_sbom.py` … ↵Emma Smith2025-06-171-4/+7
| | | | (#135596)
* [3.14] gh-134632: Fix `build-details.json` to use `INCLUDEPY` path ↵Miss Islington (bot)2025-06-171-2/+2
| | | | | | | | | | | | | | | | | | (GH-134633) (#135605) gh-134632: Fix `build-details.json` to use `INCLUDEPY` path (GH-134633) * gh-134632: Fix `build-details.json` to use `INCLUDEPY` path Fix ``build-details.json`` generation to use ``INCLUDEPY``, in order to reference the ``pythonX.Y`` subdirectory of the include directory, as required in :pep:`739`, instead of the top-level include directory. * test_build_details: Add tests for the c_api section * test_build_details: Expect pkgconfig for CPython unconditionally (cherry picked from commit 0d582def34babca7417ece8a9e4e16cc2a752d44) Co-authored-by: Michał Górny <mgorny@gentoo.org>
* [3.14] gh-133967: Do not normalize locale name 'C.UTF-8' to 'en_US.UTF-8' ↵Miss Islington (bot)2025-06-111-0/+3
| | | | | | | (GH-135347) (GH-135349) (cherry picked from commit 0f866cbfefd797b4dae25962457c5579bb90dde5) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.14] gh-133157: remove usage of `_Py_NO_SANITIZE_UNDEFINED` in ↵Miss Islington (bot)2025-06-101-22/+36
| | | | | | | | `Parser/pegen.c` (GH-134048) (#135320) gh-133157: remove usage of `_Py_NO_SANITIZE_UNDEFINED` in `Parser/pegen.c` (GH-134048) (cherry picked from commit 754e7c9b5187fcad22acf7555479603f173a4a09) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.14] gh-135144: Add `_remote_debugging` to the MSI (legacy) Windows ↵Miss Islington (bot)2025-06-042-2/+2
| | | | | | | installers. (GH-135145) (#135150) (cherry picked from commit e598eecf4c97509acef517e94053e45db51636fb) Co-authored-by: T. Wouters <thomas@python.org>
* [3.14] gh-135028: Increase parser MAXSTACK for nested parenthesis ↵Miss Islington (bot)2025-06-031-1/+1
| | | | | | | | (GH-135031) (#135059) gh-135028: Increase parser MAXSTACK for nested parenthesis (GH-135031) (cherry picked from commit 6e80f11eb5eba360334b4ace105eb7d73394baf7) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.14] gh-134262: Add retries to generate_sbom.py (GH-134460)Miss Islington (bot)2025-05-281-1/+18
| | | | | | | | | (cherry picked from commit 0c5a8b0b55238a45b9073d06a10c3a59568cdf3c) Includes fix for off-by-one error from GH-134867 (cherry-picked from commit e64395e8eb8d3a9e35e3e534e87d427ff27ab0a5) Co-authored-by: Emma Smith <emma@emmatyping.dev> Co-authored-by: Semyon Moroz <donbarbos@proton.me>
* [3.14] gh-127833: lexical analysis: Improve section on Names (GH-131474) ↵Miss Islington (bot)2025-05-261-1/+1
| | | | | | | | (#134423) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Co-authored-by: Blaise Pabon <blaise@gmail.com>
* [3.14] GH-131769: fix detecting a pydebug build of the build Python when ↵Brett Cannon2025-05-221-8/+14
| | | | building for WASI (GH-133219)
* [3.14] gh-134455: Fix `build-details.json` to use the ``c_api.headers`` key ↵Miss Islington (bot)2025-05-221-1/+1
| | | | | | | (GH-134456) (#134504) Co-authored-by: Michał Górny <mgorny@gentoo.org> Co-authored-by: Filipe Laíns 🇵🇸 <lains@riseup.net>
* [3.14] GH-133779: Fix finding pyconfig.h on Windows JIT builds (GH-134359)Miss Islington (bot)2025-05-202-12/+25
| | | | (cherry picked from commit 7ad90463df16e1938a3b6725b0f02af34cea372e)
* [3.14] gh-133779: Revert Windows generation of pyconfig.h and go back to a ↵Steve Dower2025-05-192-1/+3
| | | | | | static header. (GH-133966) Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds. This was usually the case already, but this change guarantees it in all circumstances.
* [3.14] gh-128045: Mark unknown opcodes as deopting to themselves (GH-128044) ↵Miss Islington (bot)2025-05-191-0/+7
| | | | | (#134228) * gh-128045: Mark unknown opcodes as deopting to themselves (GH-128044)
* [3.14] gh-133410: Fix PR detection in build workflow (GH-133671) (#134055)Miss Islington (bot)2025-05-151-1/+1
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.14] gh-133403: Check `Tools/build/deepfreeze.py` with mypy (GH-133802) ↵Miss Islington (bot)2025-05-154-25/+43
| | | | | | | | (#134038) gh-133403: Check `Tools/build/deepfreeze.py` with mypy (GH-133802) (cherry picked from commit 7eaa09739059aaac4812395f8d6bb586af8eadcc) Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.14] gh-133403: Check `Tools/build/generate-build-details.py` with mypy ↵Miss Islington (bot)2025-05-092-6/+15
| | | | | | | | (GH-133735) (#133764) gh-133403: Check `Tools/build/generate-build-details.py` with mypy (GH-133735) (cherry picked from commit cd2f234ad2ddd95e2d650edac5a6d593c865756a) Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.14] gh-133412: amend docs for the `inst` definition (GH-133708) (#133729)Miss Islington (bot)2025-05-091-1/+1
| | | | | | | | gh-133412: amend docs for the `inst` definition (GH-133708) The `stack_effect` is incorrectly documented as being allowed to be optional. (cherry picked from commit f77dac66e1867cfdf6f7549822dd64416f6063bc) Co-authored-by: Nybblista <170842536+nybblista@users.noreply.github.com>
* [3.14] gh-133467: Add TSAN suppressions for races in typeobject (gh-133534) ↵Miss Islington (bot)2025-05-081-1/+9
| | | | | (gh-133717) (cherry picked from commit 8679c8d5ccf657835a88de5095d4fc6e2eb47633)
* gh-133626: Ensure the traditional Windows installer doesn't accidentally ↵Miss Islington (bot)2025-05-081-2/+1
| | | | | | | pick up site-packages (GH-133693) (cherry picked from commit 6ce469dcba482772bc94c4048e90fa9598897c4a) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.14] gh-133403: Check `Tools/build/verify_ensurepip_wheels.py` with mypy ↵Miss Islington (bot)2025-05-082-2/+8
| | | | | | | | | | (GH-133453) (#133689) gh-133403: Check `Tools/build/verify_ensurepip_wheels.py` with mypy (GH-133453) (cherry picked from commit 5f3d3f2a6c8ddf7a6be340c3f4c696e2a5eb51f0) Co-authored-by: Flosckow <66554425+Flosckow@users.noreply.github.com> Co-authored-by: Daniil Dumchenko <dumchenko.de@sibvaleo.com> Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.14] gh-133583: Add support for fixed size unsigned integers in argument ↵Miss Islington (bot)2025-05-081-66/+58
| | | | | | | | | | | parsing (GH-133584) (GH-133650) * Add Argument Clinic converters: uint8, uint16, uint32, uint64. * Add private C API: _PyLong_UInt8_Converter(), _PyLong_UInt16_Converter(), _PyLong_UInt32_Converter(), _PyLong_UInt64_Converter(). (cherry picked from commit 4c914e7a36033d5e8d52cdef3a4063eb9b012ed2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.14] gh-133403: Type `Tools/build/update_file.py` and check it with `mypy` ↵Miss Islington (bot)2025-05-082-4/+26
| | | | | | | | | (GH-133404) (#133603) gh-133403: Type `Tools/build/update_file.py` and check it with `mypy` (GH-133404) (cherry picked from commit 50b52cba2d13a1854bc835412ac3f3c0ad42b5ba) Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Zachary Ware <zach@python.org>
* [3.14] gh-133555: Allow regenerating the parser with Python < 3.14 ↵Miss Islington (bot)2025-05-081-0/+5
| | | | | | | | | (GH-133557) (#133630) gh-133555: Allow regenerating the parser with Python < 3.14 (GH-133557) (cherry picked from commit b48599b8017f896c965e89c402bb70feef49808a) Co-authored-by: Alex Prengère <2138730+alexprengere@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* GH-113464: Add the JIT to What's New (GH-133486)Brandt Bucher2025-05-061-3/+3
|
* GH-132983: Build ``_zstd`` on Windows (#133366)Adam Turner2025-05-052-2/+2
|
* Bump mypy to 1.15 (#133405)sobolevn2025-05-051-1/+1
|
* GH-133410: Use commit hashes for change detection (gh-133416)Adam Turner2025-05-051-13/+11
|
* GH-91048: Minor fixes for ``_remotedebugging`` & rename to ↵Adam Turner2025-05-051-1/+0
| | | | ``_remote_debugging`` (#133398)
* gh-126835: Rename `ast_opt.c` to `ast_preprocess.c` and related stuff after ↵Yan Yanchii2025-05-041-1/+0
| | | | moving const folding to the peephole optimizier (#131830)
* GH-133231: Changes to executor management to support proposed `sys._jit` ↵Mark Shannon2025-05-041-1/+4
| | | | | | | | module (GH-133287) * Track the current executor, not the previous one, on the thread-state. * Batch executors for deallocation to avoid having to constantly incref executors; this is an ad-hoc form of deferred reference counting.
* gh-132983: Introduce `_zstd` bindings module (GH-133027)Emma Smith2025-05-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add _zstd module for https://peps.python.org/pep-0784/ This commit introduces the `_zstd` module, with bindings to libzstd from the pyzstd project. It also includes the unix build system configuration. Windows build system support will be integrated independently as it depends on integration with cpython-source-deps. * Add _zstd to modules * Fix path for compression.zstd module * Ignore _zstd module like _io * Expand module state macros to improve code quality Also removes module state references from the classes in the _zstd module and instead uses PyType_GetModuleState() * Remove backticks suggested in review Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> * Use critical sections to lock object state This should avoid races and deadlocks. * Remove compress/decompress and mark module as not reliant on the GIL The `compress`/`decompress` functions will be moved to Python code for simplicity. C implementations can always be re-added in the future. Also, mark _zstd as not requiring the GIL. * Lift critical section to avoid clang warning * Respond to comments by picnixz * Call out pyzstd explicitly in license description Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> * Use a much more robust implementation... ... for `get_zstd_state_from_type` Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> * Use PyList_GetItemRef for thread safety purposes * Use a macro for the minimum supported version * remove const from primivite types * Use PyMem_New in another spot * Simplify error handling in _get_frame_size * Another simplification of error handling in get_frame_info * Rename _module_state to mod_state * Rewrite comment explaining the context of the code * Add link to pyzstd * Add TODO about refactoring dict training code * Use PyModule_AddObjectRef over PyModule_AddObject PyModule_AddObject is soft-deprecated, so we should use PyModule_AddObjectRef * Check result of OutputBufferGrow * Simplify return logic in `add_constant_to_type` Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> * Ignore return value of _zstd_clear() Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> * Remove redundant comments * Remove __reduce__ from ZstdDict We should instead document that to pickle a dictionary a user should use the `.dict_content` attribute. * Use PyUnicode_FromFormat instead of a buffer * Don't use C constants/types in error messages * Make error messages easier to understand for Python users * Lower minimum required version 1.4.0 * Use casts and make slot function signatures correct * Be consistent with CPython on const usage * Make else clauses in line with PEP 7 * Fix over-indented blocks in argument clinic * Add critical section around ZSTD_DCtx_setParameter * Add a TODO about refactoring critical sections * Use Py_UNREACHABLE * Move bytes operations out of Py_BEGIN_ALLOW_THREADS * Add TODO about ensuring a lock is held * Remove asserts that may not be correct * Add TODO to make ZstdDict and others GC objects * Make objects GC tracked * Remove unused include * Fix some memory issues * Fix refleaks on module and in ZstdDict * Update configure to check for ZDICT_finalizeDictionary * Properly check version in configure * exit(1) if check fails * Use AC_RUN_IFELSE * Use a define() to re-use version check * Actually properly set _zstd module status based on version --------- 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: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* GH-91048: Add utils for printing the call stack for asyncio tasks (#133284)Pablo Galindo Salgado2025-05-041-1/+1
|
* Lint: Use Ruff to format ``Tools/build/check_warnings.py`` (#133317)Adam Turner2025-05-022-23/+20
|