summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
Commit message (Collapse)AuthorAgeFilesLines
* gh-97669: Create Tools/build/ directory (#97963)Victor Stinner2022-10-1716-4511/+0
| | | | | | | | | | | | | | | | | | | | | | | Create Tools/build/ directory. Move the following scripts from Tools/scripts/ to Tools/build/: * check_extension_modules.py * deepfreeze.py * freeze_modules.py * generate_global_objects.py * generate_levenshtein_examples.py * generate_opcode_h.py * generate_re_casefix.py * generate_sre_constants.py * generate_stdlib_module_names.py * generate_token.py * parse_html5_entities.py * smelly.py * stable_abi.py * umarshal.py * update_file.py * verify_ensurepip_wheels.py Update references to these scripts.
* gh-97669: Remove Tools/scripts/startuptime.py (#98214)Victor Stinner2022-10-121-22/+0
| | | | | | | | | | The "pyperf command" tool be used instead. Example: $ python3 -m pyperf command -- python3 -c pass ..................... command: Mean +- std dev: 17.8 ms +- 0.4 ms pyperf also computes the standard deviation which gives an idea of the benchmark looks reliable or not.
* gh-97669: Create Tools/patchcheck/ directory (#98186)Victor Stinner2022-10-124-703/+0
| | | | Move patchcheck.py, reindent.py and untabify.py scripts to a new Tools/patchcheck/ directory.
* gh-97669: Remove abitype.py and pep384_macrocheck.py (#98165)Victor Stinner2022-10-113-351/+0
| | | Remove abitype.py and pep384_macrocheck.py scripts of Tools/scripts/.
* gh-97669: Remove outdated example scripts (#97675) (#98167)Victor Stinner2022-10-116-576/+0
| | | | | | | | | | | Remove outdated example scripts of the Tools/scripts/ directory: * gprof2html.py * md5sum.py * nm2def.py * pathfix.py * win_add2path.py Remove test_gprof2html, test_md5sum and test_pathfix of test_tools.
* gh-95756: Lazily created cached co_* attrs (GH-97791)Ken Jin2022-10-111-1/+1
|
* gh-68686: Retire eptag ptag scripts (#98064)Joannah Nanjekye2022-10-083-112/+0
| | | | | | | | | * Retire eptag ptag scripts * 📜🤖 Added by blurb_it. * fix news entry error Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-97669: Move difflib examples to Doc/includes/ (#97964)Victor Stinner2022-10-072-193/+0
| | | | | | | | | | | Remove diff.py and ndiff.py scripts of Tools/scripts/: move them to Doc/includes/. * diff.py and ndiff.py files are no longer executable. Remove also their shebang ("#!/usr/bin/env python3"). * Remove the -profile command from ndiff.py to simply the code. * Remove ndiff.py copyright and history command. The Python documentation examples are distributed under the "Zero Clause BSD License".
* gh-97008: Add a Python implementation of AttributeError and NameError ↵Łukasz Langa2022-10-041-0/+70
| | | | | | | | | suggestions (#97022) Relevant tests moved from test_exceptions to test_traceback to be able to compare both implementations. Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
* gh-97670: Remove sys.getdxp() and analyze_dxp.py script (#97671)Victor Stinner2022-10-042-130/+0
| | | | | | | Remove the sys.getdxp() function and the Tools/scripts/analyze_dxp.py script. DXP stands for "dynamic execution pairs". They were related to DYNAMIC_EXECUTION_PROFILE and DXPAIRS macros which have been removed in Python 3.11. Python can now be built with "./configure --enable-pystats" to gather statistics on Python opcodes.
* gh-97669: Remove outdated example scripts (#97675)Victor Stinner2022-10-0440-6538/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove outdated example scripts of the Tools/scripts/ directory. A copy can be found in the old-demos project: https://github.com/gvanrossum/old-demos Removed scripts (39): * byext.py * byteyears.py * cleanfuture.py * copytime.py * crlf.py * db2pickle.py * dutree.doc * dutree.py * find-uname.py * find_recursionlimit.py * finddiv.py * findlinksto.py * findnocoding.py * fixcid.py * fixdiv.py * fixheader.py * fixnotice.py * fixps.py * get-remote-certificate.py * google.py * highlight.py * ifdef.py * import_diagnostics.py * lfcr.py * linktree.py * lll.py * mailerdaemon.py * make_ctype.py * mkreal.py * objgraph.py * pdeps.py * pickle2db.py * pindent.py * pysource.py * reindent-rst.py * rgrep.py * suff.py * texi2html.py * which.py Changes: * Remove test_fixcid, test_lll, test_pdeps and test_pindent of test.test_tools. * Remove get-remote-certificate.py changelog entry, since the script was removed. Note: there is a copy of crlf.py in Lib/test/test_lib2to3/data/.
* gh-97612: Fix shell injection in get-remote-certificate.py (#97613)Victor Stinner2022-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>
* GH-90699: use statically allocated interned strings in typeobject's slotdefs ↵Kumar Aditya2022-09-071-2/+34
| | | | (GH-94706)
* GH-96458: Statically initialize utf8 representation of static strings (#96481)Kumar Aditya2022-09-032-2/+8
|
* GH-94851: check refcnt of immortal objects after finalization (GH-95001)Kumar Aditya2022-07-251-0/+19
|
* GH-95113: Don't use EXTENDED_ARG_QUICK in unquickened code (GH-95121)Brandt Bucher2022-07-221-7/+0
|
* gh-93939: Build C extensions without setup.py (GH-94474)Christian Heimes2022-07-142-19/+3
| | | Combines GH-93940, GH-94452, and GH-94433
* gh-94773: deepfreeze: support frozensets with unsortable types (GH-94775)Christian Heimes2022-07-121-1/+6
|
* GH-90699: Intern statically allocated strings (GH-93597)Kumar Aditya2022-07-081-4/+10
| | | This is similar to how strings are interned for deepfreeze.
* GH-90699: Move generated static initializer to pycore_runtime_generated.h ↵Kumar Aditya2022-07-071-1/+1
| | | | (GH-94051)
* gh-93939: Add script to check extension modules (#94545)Christian Heimes2022-07-052-40/+496
| | | | | | | | Add script ``Tools/scripts/check_modules.py`` to check and validate builtin and shared extension modules. The script also handles ``Modules/Setup`` and will eventually replace ``setup.py``. Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
* gh-94216: add pseudo instructions to the dis/opcodes modules (GH-94241)Irit Katriel2022-07-011-14/+36
|
* gh-93939: Create and install scripts in Makefile (GH-94324)Christian Heimes2022-06-282-2/+2
| | | Scripts for 2to3, idle, and pydoc are now created and installed by make.
* GH-94163: Add BINARY_SLICE and STORE_SLICE instructions. (GH-94168)Mark Shannon2022-06-271-6/+7
|
* gh-93382: Sync up `co_code` changes with 3.11 (GH-94227)Ken Jin2022-06-241-0/+1
| | | Sync up co_code changes with 3.11 commit 852b4d4bcd12b0b6839a015a262ce976b134f6f3.
* gh-93771: Clarify how deepfreeze.py is run (#94150)Guido van Rossum2022-06-231-2/+4
|
* gh-84623: Remove unused imports (#94132)Victor Stinner2022-06-225-5/+0
|
* gh-91172: Create a workflow for verifying bundled pip and setuptools (GH-31885)Illia Volochii2022-06-221-0/+98
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Stats: Add summary of top instructions for misses and deferred ↵Mark Shannon2022-06-221-2/+20
| | | | specialization. (GH-94072)
* gh-82927: Update files related to HTML entities. (GH-92504)Ezio Melotti2022-06-212-73/+18
|
* gh-54781: Move Lib/lib2to3/tests/ to Lib/test/test_lib2to3/ (#94049)Victor Stinner2022-06-211-1/+0
| | | | | | | | * Move Lib/lib2to3/tests/ to Lib/test/test_lib2to3/. * Remove Lib/test/test_lib2to3.py. * Update imports. * all_project_files(): use different paths and sort files to make the tests more reproducible. * Update references to tests.
* GH-93516: Speedup line number checks when tracing. (GH-93763)Mark Shannon2022-06-201-0/+2
| | | | * Use a lookup table to reduce overhead of getting line numbers during tracing.
* GH-93897: Store frame size in code object and de-opt if insufficient space ↵Mark Shannon2022-06-201-0/+2
| | | | on thread frame stack. (GH-93908)
* Include freelists in allocation total. (GH-93799)Mark Shannon2022-06-141-1/+1
|
* GH-93516: Store offset of first traceable instruction in code object (GH-93769)Mark Shannon2022-06-141-0/+7
|
* gh-84461: Fix parallel testing on WebAssembly (GH-93768)Christian Heimes2022-06-131-2/+2
|
* gh-84461: Use HOSTRUNNER to run regression tests (GH-93694)Christian Heimes2022-06-111-4/+42
| | | Co-authored-by: Brett Cannon <brett@python.org>
* GH-90230: Add stats to breakdown the origin of calls to `PyEval_EvalFrame` ↵Mark Shannon2022-05-271-5/+12
| | | | (GH-93284)
* Split refcount stats into 'interpreter' and 'non-interpreter' (GH-92919)Mark Shannon2022-05-181-0/+6
|
* Summarize stats: Increase number of predecessor/successor pairs shown from 3 ↵Mark Shannon2022-05-171-3/+3
| | | | to 5. (GH-92853)
* Improve object stats (#92845)Mark Shannon2022-05-161-5/+13
| | | | | * Add incref/decref stats * Show ratios for allocation in summary
* gh-92536: PEP 623: Remove wstr and legacy APIs from Unicode (GH-92537)Inada Naoki2022-05-121-12/+0
|
* gh-92651: Remove the Include/token.h header file (#92652)Victor Stinner2022-05-111-13/+16
| | | | | | | | | | | | | | | Remove the token.h header file. There was never any public tokenizer C API. The token.h header file was only designed to be used by Python internals. Move Include/token.h to Include/internal/pycore_token.h. Including this header file now requires that the Py_BUILD_CORE macro is defined. It no longer checks for the Py_LIMITED_API macro. Rename functions: * PyToken_OneChar() => _PyToken_OneChar() * PyToken_TwoChars() => _PyToken_TwoChars() * PyToken_ThreeChars() => _PyToken_ThreeChars()
* bpo-44712: Replace "type(literal)" with corresponding builtin types (GH-27294)Serhiy Storchaka2022-05-081-3/+3
| | | | I suppose it is a remnants of very old code written when str, int, list, dict, etc were functions and not classes.
* 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.