summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
Commit message (Collapse)AuthorAgeFilesLines
* [3.10] gh-96002: Add functional test for Argument Clinic (GH-96178) (#100232)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>
* 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>
* gh-91271: Document which parts of structs are in limited API/stable ABI ↵Petr Viktorin2022-08-051-2/+21
| | | | | (GH-32196) (GH-95711) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* gh-91172: Create a workflow for verifying bundled pip and setuptools ↵Miss Islington (bot)2022-06-221-0/+98
| | | | | | | | | (GH-31885) (GH-94122) 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>
* bpo-45561: Run smelly.py tool from $(srcdir) (GH-29138)Miss Islington (bot)2021-11-231-3/+6
| | | | | (cherry picked from commit 457e6a6e96b5afad403a0bc892508a77beef4d33) Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
* [3.10] bpo-45688: Add _scproxy to sys.stdlib_module_names (GH-29358) (GH-29361)Miss Islington (bot)2021-11-021-1/+5
| | | Co-authored-by: Christian Heimes <christian@python.org>
* [3.10] Fix typos in the Tools directory (GH-28769) (GH-28801)Christian Clauss2021-10-072-5/+5
| | | | | | | | Like GH-28744 but for the Tools directory. Automerge-Triggered-By: GH:pablogsal (cherry picked from commit 682aecfdeba481c876bfc9f3796c635bd5b5df50) Co-authored-by: Christian Clauss <cclauss@me.com>
* [3.10] Fix typos in pep384_macrocheck.py (GH-28220) (GH-28272)Miss Islington (bot)2021-09-101-2/+2
| | | | | | | | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> (cherry picked from commit 4338aeeb9e07607f17bbada8ebfd97e7cc7a203c) Co-authored-by: Ikko Ashimine <eltociear@gmail.com> Automerge-Triggered-By: GH:Fidget-Spinner
* bpo-43795: Don't list private names in the limited API (GH-26740)Miss Islington (bot)2021-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 (cherry picked from commit 7cad9cb51bdae2144cbab330f13a607ba3471742) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* bpo-43795: PEP 652 user documentation (GH-25668) (GH-26034)Miss Islington (bot)2021-05-141-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 (cherry picked from commit b05955d6f5f149523b5855a335444b7c6324bdb7) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* bpo-44125: Fix "make patchcheck" on non-English locale (GH-26102)Miss Islington (bot)2021-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 (cherry picked from commit 1aa3530314d339725519f4ad95b7dea4b00b657e) Co-authored-by: Antoine Pitrou <antoine@python.org>
* bpo-44074: let patchcheck infer the base branch name (GH-25991)Miss Islington (bot)2021-05-101-4/+26
| | | | | (cherry picked from commit 21fbbb98bac8bfe56f8b931258c36750e84f9285) Co-authored-by: Leonardo Lai <leonardo.lai@live.com>
* 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)