cpython/Tools
Hood Chatham 7ae4749d06
gh-124621: Emscripten: Add support for async input devices (GH-136822)
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`.
2025-07-19 17:14:29 +02:00
..
build gh-134262: Catch both URLError and ConnectionError in retries (#135365) 2025-06-17 14:51:23 +03:00
buildbot gh-115556: Remove quotes from command-line arguments in test.bat and rt.bat (#115557) 2024-02-16 21:24:56 +01:00
c-analyzer gh-116738: Make pwd module thread-safe (#136695) 2025-07-17 09:16:01 -07:00
cases_generator gh-136183: Deal with escapes in JIT optimizer's constant evaluator (GH-136184) 2025-07-02 14:08:25 +08:00
clinic gh-135256: Simplify parsing parameters in Argument Clinic (GH-135257) 2025-07-13 23:27:48 +03:00
freeze gh-65701: document that freeze doesn't work with framework builds on macOS (#113352) 2023-12-21 16:28:00 +01:00
ftscalingbench gh-134043: use stackrefs in vectorcalling methods (#134044) 2025-05-27 22:28:27 +05:30
gdb gh-127119: Faster check for small ints in long_dealloc (GH-127620) 2025-01-29 15:22:18 +00:00
i18n gh-133967: Do not normalize locale name 'C.UTF-8' to 'en_US.UTF-8' (#135347) 2025-06-10 13:38:32 +00:00
importbench gh-58032: Do not use argparse.FileType in module CLIs and scripts (GH-113649) 2024-01-10 15:07:19 +02:00
inspection gh-91048: Fix external inspection multi-threaded performance (#136005) 2025-06-28 14:11:31 +01:00
jit GH-135904: Improve the JIT's performance on macOS (GH-136528) 2025-07-14 10:14:20 -07:00
lockbench gh-108724: Add PyMutex and _PyParkingLot APIs (gh-109344) 2023-09-19 09:54:29 -06:00
msi gh-135144: Add _remote_debugging to the MSI (legacy) Windows installers. (#135145) 2025-06-04 21:39:00 +02:00
nuget
patchcheck patchcheck: use URL paths to identify upstream remote (GH-135806) 2025-06-22 04:51:23 +00:00
peg_generator parser_generator.py typo - keywods -> keywords (#135014) 2025-07-19 11:54:20 +03:00
scripts Doc: fix duplicated words (#136086) 2025-06-29 18:04:02 -04:00
ssl gh-135401: Test AWS-LC as a cryptography library in CI (GH-135402) 2025-07-11 17:24:11 -05:00
tsan gh-127266: avoid data races when updating type slots (gh-133177) 2025-05-27 18:27:41 -07:00
tz
unicode gh-127833: lexical analysis: Improve section on Names (GH-131474) 2025-05-21 16:01:52 +02:00
unittestgui
wasm gh-124621: Emscripten: Add support for async input devices (GH-136822) 2025-07-19 17:14:29 +02:00
README gh-100176: Remove outdated Tools/{io,cc,string}bench (#101853) 2024-02-17 14:17:21 -07:00
requirements-dev.txt Bump mypy to 1.16.1 (#135720) 2025-06-23 15:29:30 +03:00
requirements-hypothesis.txt gh-136297: Fix hypothesis and subTest usage in test_zoneinfo_property.py (#136384) 2025-07-08 07:51:36 +00:00

This directory contains a number of Python programs that are useful
while building or extending Python.

build           Automatically generated directory by the build system
                contain build artifacts and intermediate files.

buildbot        Batchfiles for running on Windows buildbot workers.

c-analyzer      Tools to check no new global variables have been added.

cases_generator Tooling to generate interpreters.

clinic          A preprocessor for CPython C files in order to automate
                the boilerplate involved with writing argument parsing
                code for "builtins".

freeze          Create a stand-alone executable from a Python program.

gdb             Python code to be run inside gdb, to make it easier to
                debug Python itself (by David Malcolm).

i18n            Tools for internationalization. pygettext.py
                parses Python source code and generates .pot files,
                and msgfmt.py generates a binary message catalog
                from a catalog in text format.

importbench     A set of micro-benchmarks for various import scenarios.

msi             Support for packaging Python as an MSI package on Windows.

nuget           Files for the NuGet package manager for .NET.

patchcheck      Tools for checking and applying patches to the Python source code
                and verifying the integrity of patch files.

peg_generator   PEG-based parser generator (pegen) used for new parser.

scripts         A number of useful single-file programs, e.g. run_tests.py
                which runs the Python test suite.

ssl             Scripts to generate ssl_data.h from OpenSSL sources, and run
                tests against multiple installations of OpenSSL and LibreSSL.

tz              A script to dump timezone from /usr/share/zoneinfo.

unicode         Tools for generating unicodedata and codecs from unicode.org
                and other mapping files (by Fredrik Lundh, Marc-Andre Lemburg
                and Martin von Loewis).

unittestgui     A Tkinter based GUI test runner for unittest, with test
                discovery.

wasm            Config and helpers to facilitate cross compilation of CPython
                to WebAssembly (WASM).

Note: The pynche color editor has moved to https://gitlab.com/warsaw/pynche