summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-109408: Add the docs whitespace check from patchcheck to ↵Miss Islington (bot)2023-10-101-32/+12
| | | | | | | | | | pre-commit (GH-109854) (#110595) gh-109408: Add the docs whitespace check from patchcheck to pre-commit (GH-109854) (cherry picked from commit 7426ed0347d66f7ef61ea7ae6c3163258b8fb128) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-109615: Fix support test_copy_python_src_ignore() (#109958) (#109962)Victor Stinner2023-09-271-1/+8
| | | | | | | | | | | | | | gh-109615: Fix support test_copy_python_src_ignore() (#109958) Fix the test when run on an installed Python: use "abs_srcdir" of sysconfig, and skip the test if the Python source code cannot be found. * Tools/patchcheck/patchcheck.py, Tools/freeze/test/freeze.py and Lib/test/libregrtest/utils.py now first try to get "abs_srcdir" from sysconfig, before getting "srcdir" from sysconfig. * test.pythoninfo logs sysconfig "abs_srcdir". (cherry picked from commit b89ed9df39851348fbb1552294644f99f6b17d2c)
* [3.11] gh-108740: Fix "make regen-all" race condition (#108741) (#109021)Victor Stinner2023-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | gh-108740: Fix "make regen-all" race condition (#108741) Fix a race condition in "make regen-all". The deepfreeze.c source and files generated by Argument Clinic are now generated or updated before generating "global objects". Previously, some identifiers may miss depending on the order in which these files were generated. * "make regen-global-objects": Make sure that deepfreeze.c is generated and up to date, and always run "make clinic". * "make regen-deepfreeze" now only updates deepfreeze.c (C file). It doesn't build deepfreeze.o (object) anymore. * Remove misleading messages in "make regen-global-objects" and "make clinic". They are now outdated, these commands are now safe to use. Backport notes: * Omit Doc/using/configure.rst changes. * no need to change "make clinic", it didn't run generate_global_objects.py script before. Co-authored-by: Erlend E. Aasland <erlend@python.org> (cherry picked from commit db1ee6a19ab62191c16ecb732cb4dcaede98a902)
* [3.11] gh-109002: Ensure only one wheel for each vendored package ↵Miss Islington (bot)2023-09-061-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-109003) (#109006) Output with one wheel: ``` ❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py Verifying checksum for /Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl. Expected digest: 7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be Actual digest: 7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be ::notice file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Successfully verified the checksum of the pip wheel. ``` Output with two wheels: ``` ❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py ::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-22.0.4-py3-none-any.whl::Found more than one wheel for package pip. ::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Found more than one wheel for package pip. ``` Output without wheels: ``` ❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py ::error file=::Could not find a pip wheel on disk. ``` (cherry picked from commit f8a047941f2e4a1848700c21d58a08c9ec6a9c68) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.11] Fix the long64 reader in umarshal.py (GH-107828) (GH-107850)Miss Islington (bot)2023-08-101-4/+4
| | | | | (cherry picked from commit 50bbc56009ae7303d2482f28eb62f2603664b58f) Co-authored-by: Martin DeMello <martindemello@gmail.com>
* [3.11] gh-96002: Add functional test for Argument Clinic (GH-96178) (#100230)colorfulappl2022-12-171-0/+1
| | | | | | (cherry picked from commit c450c8c9ed6e420025f39d0e4850a79f8160cdcd) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.11] gh-99016: Make build scripts compatible with Python 3.8 (GH-99017). ↵Serhiy Storchaka2022-11-221-1/+1
| | | | | | (GH-99693) (cherry picked from commit f520d720f667c87f7b70ed86ea58d73892d6b969)
* gh-97612: Fix shell injection in get-remote-certificate.py (GH-97613)Miss Islington (bot)2022-09-281-18/+7
| | | | | | | | | | | | | | Fix a shell code injection vulnerability in the get-remote-certificate.py example script. The script no longer uses a shell to run "openssl" commands. Issue reported and initial fix by Caleb Shortt. Remove the Windows code path to send "quit" on stdin to the "openssl s_client" command: use DEVNULL on all platforms instead. Co-authored-by: Caleb Shortt <caleb@rgauge.com> (cherry picked from commit 83a0f44ffd8b398673ae56c310cf5768d359c341) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] GH-95113: Don't use EXTENDED_ARG_QUICK in unquickened code (GH-95121) ↵Brandt Bucher2022-07-221-7/+0
| | | | | (GH-95143) (cherry picked from commit e402b26b7fb953a2f0c17a0044bb6d6cbd726e54)
* gh-94773: deepfreeze: support frozensets with unsortable types (GH-94775)Miss Islington (bot)2022-07-121-1/+6
| | | | | (cherry picked from commit 0c66074e9f8c9728e1d920910d35da0c62f30403) Co-authored-by: Christian Heimes <christian@python.org>
* [3.11] GH-93516: Backport GH-93769 (GH-94231)Mark Shannon2022-06-281-0/+7
| | | * Store offset of first traceable instruction to avoid having to recompute it all the time when tracing.
* gh-93771: Clarify how deepfreeze.py is run (GH-94150)Miss Islington (bot)2022-06-231-2/+4
| | | | | (cherry picked from commit 4e796f56465f7264ddba63c8396d2649e098b617) Co-authored-by: Guido van Rossum <guido@python.org>
* [3.11] gh-93382: Cache result of `PyCode_GetCode` in codeobject (GH-93383) ↵Ken Jin2022-06-231-0/+1
| | | | | | (#93493) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
* [3.11] GH-93516: Backport GH-93769: Speedup line number checks when tracing ↵Mark Shannon2022-06-221-0/+2
| | | | | (GH-94127) Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* gh-91172: Create a workflow for verifying bundled pip and setuptools ↵Miss Islington (bot)2022-06-221-0/+98
| | | | | | | | | (GH-31885) (GH-94121) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> (cherry picked from commit d36954b7ead06daead3dcf9b0dd9f8002eab508f) Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
* gh-84461: Fix parallel testing on WebAssembly (GH-93768)Miss Islington (bot)2022-06-131-2/+2
| | | | | (cherry picked from commit c2007573dd449ae054f9fd5227e49ac9eef00ae8) Co-authored-by: Christian Heimes <christian@python.org>
* gh-84461: Use HOSTRUNNER to run regression tests (GH-93694)Miss Islington (bot)2022-06-111-4/+42
| | | | | | Co-authored-by: Brett Cannon <brett@python.org> (cherry picked from commit dc5e02b2f44dada145a3743ef77b07dbcf3e4a4a) Co-authored-by: Christian Heimes <christian@python.org>
* gh-92031: Deoptimize Static Code at Finalization (GH-92039)Dennis Sweeney2022-05-031-0/+7
|
* gh-91324: Convert the stable ABI manifest to TOML (GH-92026)Petr Viktorin2022-04-291-126/+123
|
* bpo-36329: Remove 'make -C Doc serve' in favour of 'make -C Doc htmlview' ↵Hugo van Kemenade2022-04-292-37/+0
| | | | | | | | | | | | | | | | | | (GH-32354) Also updated `make -C htmlview` so it used a full path with `file://`, because the original didn't open the page (macOS). For example: ```sh cd Doc # Doesn't open anything: python3 -c "import webbrowser; webbrowser.open('build/html/index.html')" # Opens the docs page e.g. file:///Users/hugo/github/cpython/Doc/build/html/index.html : python3 -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))" ``` https://bugs.python.org/issue36329
* gh-91324: List feature macros in the stable ABI manifest, improve tests ↵Petr Viktorin2022-04-281-23/+88
| | | | (GH-32415)
* gh-91719: Add pycore_opcode.h internal header file (#91906)Victor Stinner2022-04-251-28/+59
| | | | | | | | | | | Move the following API from Include/opcode.h (public C API) to a new Include/internal/pycore_opcode.h header file (internal C API): * EXTRA_CASES * _PyOpcode_Caches * _PyOpcode_Deopt * _PyOpcode_Jump * _PyOpcode_OpName * _PyOpcode_RelativeJump
* gh-91575: Add a script for generating data for case-insensitive matching in ↵Serhiy Storchaka2022-04-221-0/+95
| | | | | re (GH-91660) Also test that all extra cases are in BMP.
* GH-91719: Make MSVC generate somewhat faster switch code (#91718)Guido van Rossum2022-04-211-0/+7
| | | | | | | | | | | Apparently a switch on an 8-bit quantity where all cases are present generates a more efficient jump (doing only one indexed memory load instead of two). So we make opcode and use_tracing uint8_t, and generate a macro full of extra `case NNN:` lines for all unused opcodes. See https://github.com/faster-cpython/ideas/issues/321#issuecomment-1103263673
* bpo-47169: Export PyOS_CheckStack on Windows (GH-32414)Petr Viktorin2022-04-211-0/+1
|
* GH-88116: Use a compact format to represent end line and column offsets. ↵Mark Shannon2022-04-212-6/+0
| | | | | | | | | | | | (GH-91666) * Stores all location info in linetable to conform to PEP 626. * Remove column table from code objects. * Remove end-line table from code objects. * Document new location table format
* bpo-46712: share more global strings in deepfreeze (gh-32152)Kumar Aditya2022-04-192-14/+9
| | | (for gh-90868)
* gh-91404: Use computed gotos and reduce indirection in re (#91495)Brandt Bucher2022-04-151-2/+18
|
* gh-91428: include specialized opcodes in _PyOpcode_OpName (GH-91467)Dennis Sweeney2022-04-141-8/+21
|
* bpo-47152: Automatically regenerate sre_constants.h (GH-91439)Serhiy Storchaka2022-04-121-0/+62
| | | | | | | * Move the code for generating Modules/_sre/sre_constants.h from Lib/re/_constants.py into a separate script Tools/scripts/generate_sre_constants.py. * Add target `regen-sre` in the makefile. * Make target `regen-all` depending on `regen-sre`.
* gh-91428: Add _PyOpcode_OpName to opcode.h of debug builds (GH-91430)Dennis Sweeney2022-04-111-0/+8
|
* Add feature macro PY_HAVE_THREAD_NATIVE_ID to the stable ABI definition ↵Petr Viktorin2022-04-081-2/+11
| | | | (GH-32365)
* bpo-47115: Document which parts of structs are in limited API/stable ABI ↵Petr Viktorin2022-04-061-2/+21
| | | | | | (GH-32196) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-47146: Stop Depending On regen-deepfreeze For regen-global-objects ↵Eric Snow2022-03-311-1/+0
| | | | | | | | | (gh-32218) This effectively reverts the Makefile change in gh-31637. I've added some notes so it is more clear what is going on. We also update the "Check if generated files are up to date" job to run "make regen-deepfreeze" to ensure "make regen-global-objects" catches deepfreeze.c. https://bugs.python.org/issue47146
* bpo-47146: Avoid Using make Recursively (gh-32206)Eric Snow2022-03-311-1/+6
| | | https://bugs.python.org/issue47146
* bpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124)Hugo van Kemenade2022-03-301-1/+1
|
* bpo-46429: tweak deepfreeze output (#32107)Kumar Aditya2022-03-271-0/+6
|
* bpo-46712: Do not Regen Deep-Frozen Modules before Generating Global Objects ↵Eric Snow2022-03-231-11/+30
| | | | | | | | | (gh-32061) We have to run "make regen-deepfreeze" before running Tools/scripts/generate-global-objects.py; otherwise we will miss any changes to global objects in deep-frozen modules (which aren't committed in the repo). However, building $(PYTHON_FOR_FREEZE) fails if one of its source files had a global object (e.g. via _Py_ID(...)) added or removed, without generate-global-objects.py running first. So "make regen-global-objects" would sometimes fail. We solve this by running generate-global-objects.py before *and* after "make regen-deepfreeze". To speed things up and cut down on noise, we also avoid updating the global objects files if there are no changes to them. https://bugs.python.org/issue46712
* bpo-47084: Clear Unicode cached representations on finalization (GH-32032)Jeremy Kloth2022-03-221-0/+1
|
* bpo-46841: Quicken code in-place (GH-31888)Brandt Bucher2022-03-212-28/+36
| | | | | | | | | | | | | | | | | | | * Moves the bytecode to the end of the corresponding PyCodeObject, and quickens it in-place. * Removes the almost-always-unused co_varnames, co_freevars, and co_cellvars member caches * _PyOpcode_Deopt is a new mapping from all opcodes to their un-quickened forms. * _PyOpcode_InlineCacheEntries is renamed to _PyOpcode_Caches * _Py_IncrementCountAndMaybeQuicken is renamed to _PyCode_Warmup * _Py_Quicken is renamed to _PyCode_Quicken * _co_quickened is renamed to _co_code_adaptive (and is now a read-only memoryview). * Do not emit unused nonzero opargs anymore in the compiler.
* summarize_stats.py: add pairs by opcode (GH-31957)Dennis Sweeney2022-03-181-9/+44
|
* CI: Fix patchcheck (GH-31708)Hugo van Kemenade2022-03-141-0/+2
|
* bpo-46881: Statically allocate and initialize the latin1 characters. (GH-31616)Kumar Aditya2022-03-091-0/+13
|
* Remove trailing spaces (GH-31695)Serhiy Storchaka2022-03-051-2/+2
|
* bpo-46712: Let generate_global_objects.py Run on Earlier Python Versions ↵Eric Snow2022-03-011-1/+1
| | | | | (gh-31637) https://bugs.python.org/issue46712
* bpo-46753: Add the empty tuple to the _PyRuntimeState.global_objects. (gh-31345)Eric Snow2022-02-282-0/+5
| | | https://bugs.python.org/issue46753
* bpo-46841: Move the cache for `LOAD_GLOBAL` inline. (GH-31575)Mark Shannon2022-02-281-8/+9
|
* Propagate errors (however unlikely) from _Py_Deepfreeze_Init() (GH-31596)Kumar Aditya2022-02-261-3/+5
|
* bpo-46712: Share global string identifiers in deepfreeze (GH-31261)Kumar Aditya2022-02-252-6/+13
| | | Where appropriate, deepfreeze.c now uses `&_Py_ID(blah)` references instead of locally defining constants. This saves some space.
* bpo-46841: Use *inline* caching for `BINARY_OP` (GH-31543)Brandt Bucher2022-02-251-1/+8
|