aboutsummaryrefslogtreecommitdiff
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* bpo-42997: Improve error message for missing : before suites (GH-24292)Pablo Galindo2021-02-024-2/+70
| | | | | | | | * Add to the peg generator a new directive ('&&') that allows to expect a token and hard fail the parsing if the token is not found. This allows to quickly emmit syntax errors for missing tokens. * Use the new grammar element to hard-fail if the ':' is missing before suites.
* bpo-42955: Remove sub-packages from sys.stdlib_module_names (GH-24353)Victor Stinner2021-01-281-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.
* bpo-42802: Remove distutils bdist_wininst command (GH-24043)Victor Stinner2021-01-091-23/+0
| | | | | | | | | | The distutils bdist_wininst command deprecated in Python 3.8 has been removed. The distutils bidst_wheel command is now recommended to distribute binary packages on Windows. * Remove Lib/distutils/command/bdist_wininst.py * Remove PC/bdist_wininst/ project * Remove Lib/distutils/command/wininst-*.exe programs * Remove all references to bdist_wininst
* Do not remove x bit from published directories (GH-24101)Steve Dower2021-01-041-2/+2
|
* Add small validator utility for PEG grammars (GH-23519)Pablo Galindo2020-12-262-0/+55
|
* bpo-36876: [c-analyzer tool] Additional CLI updates for "capi" command. ↵Eric Snow2020-12-253-93/+380
| | | | | (gh-23929) https://bugs.python.org/issue36876
* bpo-36876: [c-analyzer tool] Add a "capi" subcommand to the c-analyzer tool. ↵Eric Snow2020-12-2410-57/+849
| | | | | | | (gh-23918) This will help identify which C-API items will need to be updated for subinterpreter support. https://bugs.python.org/issue36876
* closes bpo-42726: gdb libpython: InstanceProxy support for py3 (GH-23912)Augusto Hack2020-12-241-1/+1
| | | | | | | On Fedora 31 gdb is using python 3.7.9, calling `proxyval` on an instance with a dictionary fails because of the `dict.iteritems` usage. This PR changes the code to be compatible with py2 and py3. This changed seemed small enough to not need an issue and news blurb, if one is required please let me know. Automerge-Triggered-By: GH:benjaminp
* bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781)Serhiy Storchaka2020-12-191-8/+4
| | | | | | | | | | | * Tkinter functions and constructors which need a default root window raise now RuntimeError with descriptive message instead of obscure AttributeError or NameError if it is not created yet or cannot be created automatically. * Add tests for all functions which use default root window. * Fix import in the pynche script.
* bpo-42613: Fix freeze.py config directory (GH-23792)Victor Stinner2020-12-161-10/+10
| | | Fix freeze.py tool to use the prope config and library directories.
* 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-36876: [c-analyzer tool] Tighten up the results and output. (GH-23431)Eric Snow2020-11-2013-109/+3202
| | | We also update the "ignored" file with a temporary list of all known globals.
* bpo-42398: Fix "make regen-all" race condition (GH-23362)Victor Stinner2020-11-181-19/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a race condition in "make regen-all" when make -jN option is used to run jobs in parallel. The clinic.py script now only use atomic write to write files. Moveover, generated files are now left unchanged if the content does not change, to not change the file modification time. The "make regen-all" command runs "make clinic" and "make regen-importlib" targets: * "make regen-importlib" builds object files (ex: Modules/_weakref.o) from source files (ex: Modules/_weakref.c) and clinic files (ex: Modules/clinic/_weakref.c.h) * "make clinic" always rewrites all clinic files (ex: Modules/clinic/_weakref.c.h) Since there is no dependency between "clinic" and "regen-importlib" Makefile targets, these two targets can be run in parallel. Moreover, half of clinic.py file writes are not atomic and so there is a race condition when "make regen-all" runs jobs in parallel using make -jN option (which can be passed in MAKEFLAGS environment variable). Fix clinic.py to make all file writes atomic: * Add write_file() function to ensure that all file writes are atomic: write into a temporary file and then use os.replace(). * Moreover, write_file() doesn't recreate or modify the file if the content does not change to avoid modifying the file modification file. * Update test_clinic to verify these assertions with a functional test. * Remove Clinic.force attribute which was no longer used, whereas Clinic.verify remains useful.
* bpo-40754: Adds _testinternalcapi to Windows installer for test suite (GH-23271)Steve Dower2020-11-131-2/+2
|
* bpo-42246: Partial implementation of PEP 626. (GH-23113)Mark Shannon2020-11-121-4/+13
| | | * Implement new line number table format, as defined in PEP 626.
* bpo-36310: Allow pygettext.py to detect calls to gettext in f-strings. ↵jack11422020-11-101-0/+53
| | | | | | | (GH-19875) Adds support to Tools/i18n/pygettext.py for gettext calls in f-strings. This process is done by parsing the f-strings, processing each value, and flagging the ones which contain a gettext call. Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
* bpo-41712: Avoid runaway regex match in upload scripts (GH-23166)Yash Shete2020-11-091-1/+1
|
* Enable signing of nuget.org packages and update to supported timestamp ↵Steve Dower2020-11-031-3/+3
| | | | server (GH-23132)
* bpo-42218: Correctly handle errors in left-recursive rules (GH-23065)Lysandros Nikolaou2020-10-311-0/+3
| | | | | | | Left-recursive rules need to check for errors explicitly, since even if the rule returns NULL, the parsing might continue and lead to long-distance failures. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-36876: Small adjustments to the C-analyzer tool. (GH-23045)Eric Snow2020-10-3016-218/+633
| | | This is a little bit of clean-up, small fixes, and additional helpers prior to building an updated & accurate list of globals to eliminate.
* bpo-42208: Fix test_gdb for gc_collect_main() name (GH-23041)Victor Stinner2020-10-301-2/+2
| | | | The gcmodule.c collect() function was renamed to gc_collect_main(): update gdb/libpython.py (python-gdb.py).
* bpo-42161: Remove private _PyLong_Zero and _PyLong_One (GH-23003)Victor Stinner2020-10-271-2/+0
| | | | | Use PyLong_FromLong(0) and PyLong_FromLong(1) of the public C API instead. For Python internals, _PyLong_GetZero() and _PyLong_GetOne() of pycore_long.h can be used.
* bpo-42123: Run the parser two times and only enable invalid rules on the ↵Lysandros Nikolaou2020-10-271-1/+4
| | | | | | | | | | second run (GH-22111) * Implement running the parser a second time for the errors messages The first parser run is only responsible for detecting whether there is a `SyntaxError` or not. If there isn't the AST gets returned. Otherwise, the parser is run a second time with all the `invalid_*` rules enabled so that all the customized error messages get produced.
* bpo-36876: Fix the C analyzer tool. (GH-22841)Eric Snow2020-10-2272-6239/+8882
| | | | | | | The original tool wasn't working right and it was simpler to create a new one, partially re-using some of the old code. At this point the tool runs properly on the master. (Try: ./python Tools/c-analyzer/c-analyzer.py analyze.) It take ~40 seconds on my machine to analyze the full CPython code base. Note that we'll need to iron out some OS-specific stuff (e.g. preprocessor). We're okay though since this tool isn't used yet in our workflow. We will also need to verify the analysis results in detail before activating the check in CI, though I'm pretty sure it's close. https://bugs.python.org/issue36876
* bpo-41971: Fix test failure in test.test_tools.test_c_analyzer when mutating ↵Pablo Galindo2020-10-111-1/+3
| | | | global state (GH-22652)
* bpo-41985: Add _PyLong_FileDescriptor_Converter and AC converter for ↵Serhiy Storchaka2020-10-091-0/+13
| | | | "fildes". (GH-22620)
* Revert "Fix all Python Cookbook links (#22205)" (GH-22424)Andre Delfino2020-09-271-2/+2
| | | This commit reverts commit ac0333e1e117b7f61ed7ef1dbcdb6e515ada603b as the original links are working again and they provide extended features such as comments and alternative versions.
* bpo-41834: Remove _Py_CheckRecursionLimit variable (GH-22359)Victor Stinner2020-09-232-2/+0
| | | | | | | | | | Remove the global _Py_CheckRecursionLimit variable: it has been replaced by ceval.recursion_limit of the PyInterpreterState structure. There is no need to keep the variable for the stable ABI, since Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() were not usable in Python 3.8 and older: these macros accessed PyThreadState members, whereas the PyThreadState structure is opaque in the limited C API.
* bpo-41715: Fix potential catastrofic backtracking in c_analyzer. (GH-22091)Serhiy Storchaka2020-09-171-6/+6
|
* bpo-41746: Add type information to asdl_seq objects (GH-22223)Pablo Galindo2020-09-164-6/+56
| | | | | | | | | | | | | * Add new capability to the PEG parser to type variable assignments. For instance: ``` | a[asdl_stmt_seq*]=';'.small_stmt+ [';'] NEWLINE { a } ``` * Add new sequence types from the asdl definition (automatically generated) * Make `asdl_seq` type a generic aliasing pointer type. * Create a new `asdl_generic_seq` for the generic case using `void*`. * The old `asdl_seq_GET`/`ast_seq_SET` macros now are typed. * New `asdl_seq_GET_UNTYPED`/`ast_seq_SET_UNTYPED` macros for dealing with generic sequences. * Changes all possible `asdl_seq` types to use specific versions everywhere.
* Fix all Python Cookbook links (#22205)Andre Delfino2020-09-151-2/+2
|
* bpo-41744: Package python.props with correct name in NuGet package (GH-22154)Václav Slavík2020-09-144-4/+7
| | | | | | | | NuGet automatically includes .props file from the build directory in the target using the package, but only if the .props file has the correct name: it must be $(id).props Rename python.props correspondingly in all the nuspec variants. Also keep python.props as it were for backward compatibility.
* Fix 'gather' rules in the python parser generator (GH-22021)Pablo Galindo2020-09-031-0/+3
| | | | | | Currently, empty sequences in gather rules make the conditional for gather rules fail as empty sequences evaluate as "False". We need to explicitly check for "None" (the failure condition) to avoid false negatives.
* bpo-41526: Fixed layout of final page of the installer (GH-21871)Steve Dower2020-08-142-5/+3
|
* bpo-41521: Replace whitelist/blacklist with allowlist/denylist (GH-21822)Victor Stinner2020-08-111-4/+4
| | | Automerge-Triggered-By: @tiran
* 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-41412 and bpo-40948: Windows installer updates (GH-21656)Steve Dower2020-07-284-69/+22
| | | | | Prevent installation on Windows 8 and earlier. Download UCRT on demand when required (non-updated Windows 8.1 only) Add reference to py launcher to post-install message
* bpo-40939: Remove even more references to the old parser (GH-21642)Lysandros Nikolaou2020-07-273-7/+0
| | | Automerge-Triggered-By: @lysnikolaou
* Delete remaining references to Grammar/Grammar from docs (#21624)Guido van Rossum2020-07-261-1/+1
| | | (Ironically, the file itself remains, see https://github.com/we-like-parsers/cpython/issues/135.)
* bpo-39573: Use the Py_TYPE() macro (GH-21433)Victor Stinner2020-07-101-1/+1
| | | Replace obj->ob_type with Py_TYPE(obj).
* bpo-41173: Copy test results file from ARM worker before uploading (GH-21305)Steve Dower2020-07-081-2/+4
|
* bpo-41215: Don't use NULL by default in the PEG parser keyword list (GH-21355)Pablo Galindo2020-07-061-1/+1
| | | Automerge-Triggered-By: @lysnikolaou
* bpo-36346: Undeprecate private function _PyUnicode_AsUnicode(). (GH-21336)Serhiy Storchaka2020-07-051-6/+0
|
* bpo-36346: Prepare for removing the legacy Unicode C API (AC only). (GH-21223)Serhiy Storchaka2020-06-301-2/+63
|