summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43795: Don't list private names in the limited API (GH-26740)Petr Viktorin2021-06-161-0/+12
| | | | | | | | | | | | | * Remove struct _node from the stable ABI list This struct was removed along with the old parser in Python 3.9 (PEP 617) * Stable ABI list: Use the public name "PyFrameObject" rather than "_frame" * Ensure limited API doesn't contain private names Names prefixed by an underscore are private by definition. * Add a blurb
* bpo-44337: Port LOAD_ATTR to PEP 659 adaptive interpreter (GH-26595)Mark Shannon2021-06-101-0/+9
| | | | | | | | | | | | | | * Specialize LOAD_ATTR with LOAD_ATTR_SLOT and LOAD_ATTR_SPLIT_KEYS * Move dict-common.h to internal/pycore_dict.h * Add LOAD_ATTR_WITH_HINT specialized opcode. * Quicken in function if loopy * Specialize LOAD_ATTR for module attributes. * Add specialization stats
* bpo-44125: Fix "make patchcheck" on non-English locale (GH-26102)Antoine Pitrou2021-05-131-1/+4
| | | | | The patch from [bpo-44074]() does not account for a possibly non-English locale and blindly greps for "HEAD branch" in a possibly localized text. Automerge-Triggered-By: GH:pitrou
* bpo-43795: PEP 652 user documentation (GH-25668)Petr Viktorin2021-05-111-6/+27
| | | | | | - Reformat the C API and ABI Versioning page (and extend/clarify a bit) - Rewrite the stable ABI docs into a general text on C API Compatibility - Add a list of Limited API contents, and notes for the individual items. - Replace `Include/README.rst` with a link to a devguide page with the same info
* bpo-44074: let patchcheck infer the base branch name (GH-25991)Leonardo Lai2021-05-101-4/+26
|
* bpo-40222: "Zero cost" exception handling (GH-25729)Mark Shannon2021-05-071-6/+4
| | | | | | | | "Zero cost" exception handling. * Uses a lookup table to determine how to handle exceptions. * Removes SETUP_FINALLY and POP_TOP block instructions, eliminating (most of) the runtime overhead of try statements. * Reduces the size of the frame object by about 60%.
* bpo-43795: Generate python3dll.c and doc data from manifest (PEP 652) (GH-25315)Petr Viktorin2021-04-292-111/+485
|
* bpo-43651: PEP 597: Fix pdeps used locale encoding (GH-25204)Inada Naoki2021-04-061-1/+1
|
* bpo-43688: Support "make regen-limited-abi" in debug mode (GH-25133)Victor Stinner2021-04-021-5/+0
|
* bpo-43690: stable_abi.py no longer parses macros (GH-25136)Victor Stinner2021-04-011-32/+1
| | | | | | | | The stable_abi.py script no longer parse macros. Macro targets can be static inline functions which are not part of the stable ABI, only part of the limited C API. Run "make regen-limited-abi" to exclude PyType_HasFeature from Doc/data/stable_abi.dat.
* bpo-42955: Add _overlapped to sys.stdlib_module_names (GH-25122)Victor Stinner2021-04-011-0/+1
|
* bpo-43244: Remove symtable.h header file (GH-24910)Victor Stinner2021-03-191-1/+0
| | | | | | | | | | | | | | | | | | Rename Include/symtable.h to to Include/internal/pycore_symtable.h, don't export symbols anymore (replace PyAPI_FUNC and PyAPI_DATA with extern) and rename functions: * PyST_GetScope() to _PyST_GetScope() * PySymtable_BuildObject() to _PySymtable_Build() * PySymtable_Free() to _PySymtable_Free() Remove PySymtable_Build(), Py_SymtableString() and Py_SymtableStringObject() functions. The Py_SymtableString() function was part the stable ABI by mistake but it could not be used, since the symtable.h header file was excluded from the limited C API. The Python symtable module remains available and is unchanged.
* bpo-43456: Remove _xxsubinterpreters from sys.stdlib_module_names (GH-24814)Victor Stinner2021-03-101-0/+1
|
* bpo-43445: Add frozen modules to sys.stdlib_module_names (GH-24798)Victor Stinner2021-03-101-3/+32
| | | | | | Add frozen modules to sys.stdlib_module_names. For example, add "_frozen_importlib" and "_frozen_importlib_external" names. Add "list_frozen" command to Programs/_testembed.
* bpo-35134: Move non-limited C API files to Include/cpython/ (GH-24561)Nicholas Sim2021-02-191-1/+0
| | | | | | Include/{odictobject.h,parser_interface.h,picklebufobject.h,pydebug.h,pyfpe.h} into Include/cpython/. Parser: peg_api: include Python.h instead of parser_interface.h.
* bpo-35134: Move Include/{pyarena.h,pyctype.h} to Include/cpython/ (GH-24550)Nicholas Sim2021-02-171-2/+0
| | | | Move non-limited C API headers pyarena.h and pyctype.h into Include/cpython/ directory.
* bpo-43103: Add configure --without-static-libpython (GH-24418)Victor Stinner2021-02-172-3/+8
| | | | | | | | Add a new configure --without-static-libpython option to not build the libpythonMAJOR.MINOR.a static library and not install the python.o object file. Fix smelly.py and stable_abi.py tools when libpython3.10.a is missing.
* bpo-42955: Remove sub-packages from sys.stdlib_module_names (GH-24353)Victor Stinner2021-01-271-19/+7
|
* bpo-42955: Rename module_names to sys.stdlib_module_names (GH-24332)Victor Stinner2021-01-251-4/+5
| | | | * Rename _Py_module_names to _Py_stdlib_module_names. * Rename Python/module_names.h to Python/stdlib_module_names.h.
* bpo-42955: Add sys.modules_names (GH-24238)Victor Stinner2021-01-251-76/+26
| | | | Add sys.module_names, containing the list of the standard library module names.
* bpo-42955: Add Python/module_names.h (GH-24258)Victor Stinner2021-01-191-0/+200
| | | | | | | | | | Add a private list of all stdlib modules: _Py_module_names. * Add Tools/scripts/generate_module_names.py script. * Makefile: Add "make regen-module-names" command. * setup.py: Add --list-module-names option. * GitHub Action and Travis CI also runs "make regen-module-names", not ony "make regen-all", to ensure that the module names remains up to date.
* Update stable ABI script for MacOS and update list of exported symbols ↵Pablo Galindo2020-12-151-1/+5
| | | | (GH-23783)
* bpo-42545: Improve the error message in the stable API script (GH-23648)Pablo Galindo2020-12-041-21/+41
|
* bpo-42545: Check that all symbols in the limited ABI are exported (GH-23616)Pablo Galindo2020-12-041-0/+234
|
* bpo-42212: smelly.py also checks the dynamic library (GH-23423)Victor Stinner2020-11-241-35/+119
| | | | | | | | The smelly.py script now also checks the Python dynamic library and extension modules, not only the Python static library. Make also the script more verbose: explain what it does. The GitHub Action job now builds Python with the libpython dynamic library.
* bpo-41463: Generate information about jumps from 'opcode.py' rather than ↵Mark Shannon2020-08-041-0/+19
| | | | | duplicating it in 'compile.c' (GH-21714) Generate information about jumps from 'opcode.py' rather than duplicate it in 'compile.c'
* bpo-39573: Use the Py_TYPE() macro (GH-21433)Victor Stinner2020-07-101-1/+1
| | | Replace obj->ob_type with Py_TYPE(obj).
* bpo-40939: Remove the old parser (Part 2) (GH-21005)Lysandros Nikolaou2020-06-201-53/+0
| | | Remove some remaining files and Makefile targets for the old parser
* bpo-40939: Remove some extra references to PYTHONOLDPARSER (GH-20815)Pablo Galindo2020-06-111-2/+1
| | | Automerge-Triggered-By: @pablogsal
* closes bpo-40385: Remove Tools/scripts/checkpyc.py (GH-19709)Ammar Askar2020-04-252-70/+0
| | | | | This is one of the few files that has intimate knowledge of the pyc file format. Since it lacks tests it tends to become outdated fairly quickly. At present it has been broken since the introduction of PEP 552.
* bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503)Pablo Galindo2020-04-221-1/+3
| | | | Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-40267: Fix message when last input character produces a SyntaxError ↵Lysandros Nikolaou2020-04-151-0/+4
| | | | | | | | (GH-19521) When there is a SyntaxError after reading the last input character from the tokenizer and if no newline follows it, the error message used to be `unexpected EOF while parsing`, which is wrong.
* bpo-40094: Fix which.py script exit code (GH-19286)Victor Stinner2020-04-021-0/+1
| | | | It now uses os.waitstatus_to_exitcode() to convert os.system() exit status into an exit code.
* bpo-39156: Break up COMPARE_OP into four logically distinct opcodes. (GH-17754)Mark Shannon2020-01-141-5/+0
| | | | | | | | Break up COMPARE_OP into four logically distinct opcodes: * COMPARE_OP for rich comparisons * IS_OP for 'is' and 'is not' tests * CONTAINS_OP for 'in' and 'is not' tests * JUMP_IF_NOT_EXC_MATCH for checking exceptions in 'try-except' statements.
* bpo-38347: find pathfix for Python scripts whose name contain a '-' (GH-16536)Ruediger Pluem2019-10-111-4/+1
| | | pathfix.py: Assume all files that end on '.py' are Python scripts when working recursively.
* bpo-37064: Add option -a to pathfix.py tool (GH-15717)PatrikKopkan2019-09-251-5/+30
| | | Add option -a to Tools/Scripts/pathfix.py script: add flags.
* Mark files as executable that are meant as scripts. (GH-15354)Greg Price2019-09-091-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This is the converse of GH-15353 -- in addition to plenty of scripts in the tree that are marked with the executable bit (and so can be directly executed), there are a few that have a leading `#!` which could let them be executed, but it doesn't do anything because they don't have the executable bit set. Here's a command which finds such files and marks them. The first line finds files in the tree with a `#!` line *anywhere*; the next-to-last step checks that the *first* line is actually of that form. In between we filter out files that already have the bit set, and some files that are meant as fragments to be consumed by one or another kind of preprocessor. $ git grep -l '^#!' \ | grep -vxFf <( \ git ls-files --stage \ | perl -lane 'print $F[3] if (!/^100644/)' \ ) \ | grep -ve '\.in$' -e '^Doc/includes/' \ | while read f; do head -c2 "$f" | grep -qxF '#!' \ && chmod a+x "$f"; \ done
* bpo-37064: Add option -k to Tools/scripts/pathfix.py (GH-15548)PatrikKopkan2019-09-051-5/+34
| | | Add flag -k to pathscript.py script: preserve shebang flags.
* bpo-37704: Remove Tools/scripts/h2py.py (GH-15000)Victor Stinner2019-07-302-172/+0
| | | Use cffi to access a C API in Python.
* bpo-14546: Fix the argument handling in Tools/scripts/lll.py (GH-13026)Zackery Spytz2019-05-021-4/+3
|
* bpo-36345: Update wsgiref example (GH-12562)Stéphane Wirtel2019-04-161-2/+3
| | | | Use literalinclude markup to include Tools/scripts/serve.py code. Tools/scripts/serve.py first argument on the command line is now optional.
* bpo-22831: Use "with" to avoid possible fd leaks in tools (part 2). (GH-10927)Serhiy Storchaka2019-03-3019-216/+208
|
* bpo-22831: Use "with" to avoid possible fd leaks in tools (part 1). (GH-10926)Serhiy Storchaka2019-03-305-228/+226
|
* bpo-35884: Add string-keys-only microbenchmark for dict access to ↵Stefan Behnel2019-03-251-12/+28
| | | | var_access_benchmark.py (GH-11905)
* bpo-35884: Add missing FIFO queue benchmark (GH-11898)Raymond Hettinger2019-02-161-1/+10
| | | https://bugs.python.org/issue35884
* Fix typo (micro->nano) (GH-11759)Raymond Hettinger2019-02-051-1/+1
|
* bpo-35884: Add variable access benchmarking script (GH-11725)Raymond Hettinger2019-02-031-0/+272
|
* bpo-30455: Generate all token related code and docs from Grammar/Tokens. ↵Serhiy Storchaka2018-12-222-0/+321
| | | | | | | | | | | | | | | | | | | (GH-10370) "Include/token.h", "Lib/token.py" (containing now some data moved from "Lib/tokenize.py") and new files "Parser/token.c" (containing the code moved from "Parser/tokenizer.c") and "Doc/library/token-list.inc" (included in "Doc/library/token.rst") are now generated from "Grammar/Tokens" by "Tools/scripts/generate_token.py". The script overwrites files only if needed and can be used on the read-only sources tree. "Lib/symbol.py" is now generated by "Tools/scripts/generate_symbol_py.py" instead of been executable itself. Added new make targets "regen-token" and "regen-symbol" which are now dependencies of "regen-all". The documentation contains now strings for operators and punctuation tokens.
* bpo-35133: Fix mistakes when concatenate string literals on different lines. ↵Serhiy Storchaka2018-11-051-2/+2
| | | | | | | | | | (GH-10284) Two kind of mistakes: 1. Missed space. After concatenating there is no space between words. 2. Missed comma. Causes unintentional concatenating in a list of strings.
* bpo-32256: Make patchcheck.py work for out-of-tree builds (GH-4760)Alexey Izbyshev2018-10-201-3/+9
| | | Set SRCDIR as the current directory for git.