summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* gh-125588: Allow to regenerate the parser with Python < 3.12 (#127969)Pablo Galindo Salgado2024-12-152-3/+9
| | | Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
* gh-119786: Fix miscellaneous typos in ↵Stan Ulbrych2024-12-151-3/+3
| | | | `InternalDocs/interpreter_definition.md` (#127957)
* gh-115999: Specialize loading attributes from modules in free-threaded ↵mpage2024-12-132-0/+19
| | | | | | | | | builds (#127711) We use the same approach that was used for specialization of LOAD_GLOBAL in free-threaded builds: _CHECK_ATTR_MODULE is renamed to _CHECK_ATTR_MODULE_PUSH_KEYS; it pushes the keys object for the following _LOAD_ATTR_MODULE_FROM_KEYS (nee _LOAD_ATTR_MODULE). This arrangement avoids having to recheck the keys version. _LOAD_ATTR_MODULE is renamed to _LOAD_ATTR_MODULE_FROM_KEYS; it loads the value from the keys object pushed by the preceding _CHECK_ATTR_MODULE_PUSH_KEYS at the cached index.
* gh-102471, PEP 757: Add PyLong import and export API (#121339)Victor Stinner2024-12-131-0/+1
| | | | | Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Steve Dower <steve.dower@microsoft.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-127629: Add ctypes to the Emscripten build (#127683)Hood Chatham2024-12-103-11/+75
| | | Adds tooling to build libffi and add ctypes to the stdlib for Emscripten.
* gh-127503: Fix realpath handling in emscripten cli (#127632)Hood Chatham2024-12-091-1/+1
| | | Corrects the handling of realpath on Linux.
* gh-127503 Don't propagate native PATH to Emscripten Python (#127633)Hood Chatham2024-12-091-1/+2
| | | | Modifies the handling of PATH to ensure that native executables aren't picked up when running under node.
* [doc] Fix typos in `interpreter_definition.md` (#127742)Stan Ulbrych2024-12-081-3/+3
|
* GH-127652: stop using `--wasi preview2` in `wasi.py` (GH-127704)Brett Cannon2024-12-061-2/+0
| | | It's only to use WASI 0.2 code to back preview1 APIs and is considered experimental anyway.
* gh-127503: Emscripten make Python.sh function as proper Python CLI (#127506)Hood Chatham2024-12-052-15/+49
| | | Modifies the python.sh script to work on macOS, and adapt to recent emscripten changes.
* gh-127111: Apply prettier formatter to Emscripten web example (#127551)Hood Chatham2024-12-052-446/+511
| | | Cleaned up formatting (and a stray closing tag) of the web example HTML and JS.
* Enable native AArch64 Ubuntu CI jobs (#127584)Diego Russo2024-12-041-85/+0
| | | Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* gh-127111: Emscripten Make web example work again (#127113)Hood Chatham2024-12-025-62/+122
| | | | | Moves the Emscripten web example into a standalone folder, and updates Makefile targets to build the web example. Instructions for usage have also been added.
* GH-126491: GC: Mark objects reachable from roots before doing cycle ↵Mark Shannon2024-12-021-1/+4
| | | | | | | | | | | | | collection (GH-127110) * Mark almost all reachable objects before doing collection phase * Add stats for objects marked * Visit new frames before each increment * Update docs * Clearer calculation of work to do.
* summarize: Fix typo in stats (#127450)alm2024-11-301-1/+1
|
* gh-127341: Argument Clinic: fix compiler warnings for getters with ↵Peter Bierma2024-11-291-7/+3
| | | | | docstrings (#127310) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-127303: Add docs for token.EXACT_TOKEN_TYPES (#127304)Илья Любавский2024-11-291-1/+2
| | | | | | | --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Tomas R. <tomas.roun8@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-127330: Update for OpenSSL 3.4 & document+improve the update process ↵Petr Viktorin2024-11-283-6/+34
| | | | | | | | | | | | | | | | | (GH-127331) - Add `git describe` output to headers generated by `make_ssl_data.py` This info is more important than the date when the file was generated. It does mean that the tool now requires a Git checkout of OpenSSL, not for example a release tarball. - Regenerate the older file to add the info. To the other older file, add a note about manual edits. - Add notes on how to add a new OpenSSL version - Add 3.4 error messages and multissl tests
* gh-126612: Include stack effects of uops when computing maximum stack depth ↵mpage2024-11-262-22/+134
| | | | (#126894)
* GH-115869: Make jit_stencils.h reproducible (GH-127166)Brandt Bucher2024-11-244-9/+17
|
* GH-89435: os.path should not be a frozen module (#126924)Filipe Laíns 🇵🇸2024-11-221-3/+0
|
* gh-127022: Simplify `PyStackRef_FromPyObjectSteal` (#127024)Sam Gross2024-11-221-1/+4
| | | | | | | | | This gets rid of the immortal check in `PyStackRef_FromPyObjectSteal()`. Overall, this improves performance about 2% in the free threading build. This also renames `PyStackRef_Is()` to `PyStackRef_IsExactly()` because the macro requires that the tag bits of the arguments match, which is only true in certain special cases.
* gh-126700: pygettext: Support more gettext functions (GH-126912)Tomas R.2024-11-221-73/+171
| | | | Support multi-argument gettext functions: ngettext(), pgettext(), dgettext(), etc.
* Allow local use of `static PyMutex` in the C analyzer (#127102)Peter Bierma2024-11-222-1/+14
|
* gh-115999: Specialize `LOAD_GLOBAL` in free-threaded builds (#126607)mpage2024-11-211-0/+3
| | | | | | | | | | | | | | Enable specialization of LOAD_GLOBAL in free-threaded builds. Thread-safety of specialization in free-threaded builds is provided by the following: A critical section is held on both the globals and builtins objects during specialization. This ensures we get an atomic view of both builtins and globals during specialization. Generation of new keys versions is made atomic in free-threaded builds. Existing helpers are used to atomically modify the opcode. Thread-safety of specialized instructions in free-threaded builds is provided by the following: Relaxed atomics are used when loading and storing dict keys versions. This avoids potential data races as the dict keys versions are read without holding the dictionary's per-object lock in version guards. Dicts keys objects are passed from keys version guards to the downstream uops. This ensures that we are loading from the correct offset in the keys object. Once a unicode key has been stored in a keys object for a combined dictionary in free-threaded builds, the offset that it is stored in will never be reused for a different key. Once the version guard passes, we know that we are reading from the correct offset. The dictionary read fast-path is used to read values from the dictionary once we know the correct offset.
* gh-126316: Make grp.getgrall() thread-safe: add a mutex (#127055)Victor Stinner2024-11-211-0/+1
| | | | grpmodule.c is no longer built with the limited C API, since PyMutex is excluded from the limited C API.
* gh-126898: Emscripten support: Use es6 modules (#126903)Hood Chatham2024-11-213-26/+55
| | | | Modify Emscripten support to use ES6 modules.
* gh-125729: Makes the installation of the turtle module dependent on the ↵CoderTCY2024-11-193-5/+6
| | | | Tcl/Tk install option (GH-126176)
* Revert "GH-126491: GC: Mark objects reachable from roots before doing cycle ↵Hugo van Kemenade2024-11-191-4/+1
| | | | collection (GH-126502)" (#126983)
* GH-126491: GC: Mark objects reachable from roots before doing cycle ↵Mark Shannon2024-11-181-1/+4
| | | | | | | | | | | | | | | | collection (GH-126502) * Mark almost all reachable objects before doing collection phase * Add stats for objects marked * Visit new frames before each increment * Remove lazy dict tracking * Update docs * Clearer calculation of work to do.
* gh-126691: Remove --with-emscripten-target (#126787)Hood Chatham2024-11-162-8/+8
| | | | | This unifies the code for nodejs and the code for the browser. After this commit, the browser example doesn't work; this will be fixed in a subsequent update.
* gh-118973: Add _tkinter to freethreaded MSI (GH-126768)Steve Dower2024-11-151-1/+1
|
* gh-126807: pygettext: Do not attempt to extract messages from function ↵Tomas R.2024-11-141-0/+6
| | | | | | | | | | | | | | | | definitions. (GH-126808) Fixes a bug where pygettext would attempt to extract a message from a code like this: def _(x): pass This is because pygettext only looks at one token at a time and '_(x)' looks like a function call. However, since 'x' is not a string literal, it would erroneously issue a warning.
* gh-89640: Pull in update to float word order detection in autoconf-archive ↵Hood Chatham2024-11-131-1/+1
| | | | (#126747)
* gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792)Seth Michael Larson2024-11-131-0/+28
| | | Update libexpat to 2.6.4, make future updates easier.
* gh-126525: Fix `makeunicodedata.py` output on macOS and Windows (#126526)sobolevn2024-11-121-1/+1
|
* gh-120619: Strength reduce function guards, support 2-operand uop forms ↵Ken Jin2024-11-095-18/+34
| | | | | (GH-124846) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* gh-126187 Add emscripten.py script to automate emscripten build (#126190)Hood Chatham2024-11-092-136/+353
| | | | | Add emscripten.py script to automate emscripten build. This is modeled heavily on `Tools/wasm/wasi.py`. This will form the basis of an Emscripten build bot.
* gh-126497: Add missing venv redirectors to freethreaded installer (GH-126556)Steve Dower2024-11-081-4/+6
|
* gh-122943: Add the varpos parameter in _PyArg_UnpackKeywords (GH-126564)Serhiy Storchaka2024-11-081-9/+4
| | | | Remove _PyArg_UnpackKeywordsWithVararg. Add comments for integer arguments of _PyArg_UnpackKeywords.
* gh-122943: Move code generation for var-positional parameter to converters ↵Serhiy Storchaka2024-11-082-73/+91
| | | | (GH-126575)
* gh-122943: Remove the object converter for var-positional parameter (GH-126560)Serhiy Storchaka2024-11-081-4/+0
|
* GH-123877: default to `wasm32-wasip1` instead of `wasm32-wasi` to be more ↵Brett Cannon2024-11-071-1/+1
| | | | | | | | | specific (GH-126552) Eventually wasm32-wasi will represent WASI 1.0, and so it's currently deprecated so it can be used for that eventual purpose. wasm32-wasip1 is also more specific to what version of WASI is currently supported. --------- Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-122943: Rework support of var-positional parameter in Argument Clinic ↵Serhiy Storchaka2024-11-076-84/+156
| | | | | | | | | | | | | | | | | | (GH-122945) Move creation of a tuple for var-positional parameter out of _PyArg_UnpackKeywordsWithVararg(). Merge _PyArg_UnpackKeywordsWithVararg() with _PyArg_UnpackKeywords(). Add a new parameter in _PyArg_UnpackKeywords(). The "parameters" and "converters" attributes of ParseArgsCodeGen no longer contain the var-positional parameter. It is now available as the "varpos" attribute. Optimize code generation for var-positional parameter and reuse the same generating code for functions with and without keyword parameters. Add special converters for var-positional parameter. "tuple" represents it as a Python tuple and "array" represents it as a continuous array of PyObject*. "object" is a temporary alias of "tuple".
* gh-76785: Minor Cleanup of "Cross-interpreter" Code (gh-126457)Eric Snow2024-11-071-0/+1
| | | | | | | | The primary objective here is to allow some later changes to be cleaner. Mostly this involves renaming things and moving a few things around. * CrossInterpreterData -> XIData * crossinterpdatafunc -> xidatafunc * split out pycore_crossinterp_data_registry.h * add _PyXIData_lookup_t
* GH-126222: Fix `_PyUop_num_popped` (GH-126507)Mark Shannon2024-11-071-0/+2
|
* GH-125911: Rename big trampoline to "shim" (GH-126339)Savannah Ostrowski2024-11-053-4/+4
|
* gh-115999: Fix gdb support for libpython.so after thread-local bytecode ↵T. Wouters2024-11-051-6/+9
| | | | | change (#126440) Fix the gdb pretty printer in the face of --enable-shared by delaying the attempt to load the _PyInterpreterFrame definition until after .so files are loaded.
* gh-126366: Fix crash if `__iter__` raises an exception during `yield from` ↵Peter Bierma2024-11-051-0/+1
| | | | (#126369)
* gh-115999: Implement thread-local bytecode and enable specialization for ↵mpage2024-11-041-1/+22
| | | | | | | | | `BINARY_OP` (#123926) Each thread specializes a thread-local copy of the bytecode, created on the first RESUME, in free-threaded builds. All copies of the bytecode for a code object are stored in the co_tlbc array on the code object. Threads reserve a globally unique index identifying its copy of the bytecode in all co_tlbc arrays at thread creation and release the index at thread destruction. The first entry in every co_tlbc array always points to the "main" copy of the bytecode that is stored at the end of the code object. This ensures that no bytecode is copied for programs that do not use threads. Thread-local bytecode can be disabled at runtime by providing either -X tlbc=0 or PYTHON_TLBC=0. Disabling thread-local bytecode also disables specialization. Concurrent modifications to the bytecode made by the specializing interpreter and instrumentation use atomics, with specialization taking care not to overwrite an instruction that was instrumented concurrently.