summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* 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-132-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-071-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
|
* bpo-41070: Simplify pyshellext.dll build (GH-21037)Nikita Nemkin2020-06-231-0/+5
| | | | | Replace MIDL-generated file with manual GUID definition. Use the same .def file for release and debug builds. Update setup build to support latest toolset
* 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-41044: Generate valid PEG python parsers for opt+seq rules (GH-20995)Batuhan Taskaya2020-06-201-1/+7
| | | Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-41043: Escape literal part of the path for glob(). (GH-20994)Serhiy Storchaka2020-06-204-6/+10
|
* Fix trailing whitespace in keyword.py (GH-20881)Pablo Galindo2020-06-151-2/+2
|
* Include soft keywords in keyword.py (GH-20877)Pablo Galindo2020-06-152-4/+13
|
* bpo-40939: Clean and adapt the peg_generator directory after deleting the ↵Pablo Galindo2020-06-126-304/+30
| | | | old parser (GH-20822)
* bpo-40939: Remove some extra references to PYTHONOLDPARSER (GH-20815)Pablo Galindo2020-06-111-2/+1
| | | Automerge-Triggered-By: @pablogsal
* bpo-40939: Remove the old parser (GH-20768)Pablo Galindo2020-06-111-3/+2
| | | This commit removes the old parser, the deprecated parser module, the old parser compatibility flags and environment variables and all associated support code and documentation.
* bpo-40939: Generate keyword.py using the new parser (GH-20800)Lysandros Nikolaou2020-06-111-0/+73
|
* Refactor scripts in Tools/peg_generator/scripts (GH-20401)Lysandros Nikolaou2020-06-066-140/+131
|
* bpo-30008: Fix OpenSSL no-deprecated compilation (GH-20397)Christian Heimes2020-06-011-0/+1
| | | | | | | | | Fix :mod:`ssl`` code to be compatible with OpenSSL 1.1.x builds that use ``no-deprecated`` and ``--api=1.1.0``. Note: Tests assume full OpenSSL API and fail with limited API. Signed-off-by: Christian Heimes <christian@python.org> Co-authored-by: Mark Wright <gienah@gentoo.org>
* bpo-40792: Make the result of PyNumber_Index() always having exact type int. ↵Serhiy Storchaka2020-05-281-1/+1
| | | | | | | | | | | | (GH-20443) Previously, the result could have been an instance of a subclass of int. Also revert bpo-26202 and make attributes start, stop and step of the range object having exact type int. Add private function _PyNumber_Index() which preserves the old behavior of PyNumber_Index() for performance to use it in the conversion functions like PyLong_AsLong().
* Fix lookahead of soft keywords in the PEG parser (GH-20436)Pablo Galindo2020-05-261-2/+9
| | | Automerge-Triggered-By: @gvanrossum
* Add soft keywords (GH-20370)Guido van Rossum2020-05-261-4/+20
| | | | | | | These are like keywords but they only work in context; they are not reserved except when there is an exact match. This would enable things like match statements without reserving `match` (which would be bad for the `re.match()` function and probably lots of other places). Automerge-Triggered-By: @gvanrossum
* bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)Serhiy Storchaka2020-05-261-52/+2
| | | | Only __index__ should be used to make integer conversions lossless.
* Fix peg_generator compiler warnings under MSVC (GH-20405)Ammar Askar2020-05-261-4/+4
|
* bpo-40688: Use the correct parser in the peg_generator scripts (GH-20235)Lysandros Nikolaou2020-05-255-120/+55
| | | | | | | The scripts in `Tools/peg_generator/scripts` mostly assume that `ast.parse` and `compile` use the old parser, since this was the state of things, while we were developing them. They need to be updated to always use the correct parser. `_peg_parser` is being extended to support both parsing and compiling with both parsers.
* bpo-40750: Do not expand the new parser debug flags if Py_BUILD_CORE is not ↵Pablo Galindo2020-05-251-1/+1
| | | | defined (GH-20393)
* bpo-40750: Support -d flag in the new parser (GH-20340)Pablo Galindo2020-05-252-25/+61
|
* bpo-40334: Support suppressing of multiple optional variables in Pegen ↵Batuhan Taskaya2020-05-241-2/+2
| | | | (GH-20367)
* Fix debug output in PEG parser generator (GH-20308)Pablo Galindo2020-05-221-3/+3
|
* Fix typing problems reported by mypy in pegen (GH-20297)Pablo Galindo2020-05-212-27/+23
|
* bpo-40334: Correctly generate C parser when assigned var is None (GH-20296)Batuhan Taskaya2020-05-211-1/+4
| | | | | When there are 2 negative lookaheads in the same rule, let's say `!"(" blabla "," !")"`, there will the 2 `FunctionCall`'s where assigned value is None. Currently when the `add_var` is called the first one will be ignored but when the second lookahead's var is sent to dedupe it will be returned as `None_1` and this won't be ignored by the declaration generator in the `visit_Alt`. This patch adds an explicit check to `add_var` to distinguish whether if there is a variable or not.
* bpo-39631: Fix file association MIME type in the Windows installer (GH-20205)Zackery Spytz2020-05-191-2/+2
| | | Use text/x-python instead of text/plain to avoid issues with tools assuming that "ShellExecute(script)" is a non-executable operation.
* bpo-40669: Use requirements.pip when installing PEG dependencies (GH-20194)Pablo Galindo2020-05-181-1/+1
|
* bpo-40669: Install PEG benchmarking dependencies in a venv (GH-20183)Lysandros Nikolaou2020-05-183-15/+29
| | | | | | | | Create a `make venv` target, that creates a virtual environment and installs the dependency in that venv. `make time` and all the related targets are changed to use the virtual environment python. Automerge-Triggered-By: @pablogsal
* bpo-40661: Fix segfault when parsing invalid input (GH-20165)Lysandros Nikolaou2020-05-181-8/+9
| | | | | | Fix segfaults when parsing very complex invalid input, like `import äˆ ð£„¯ð¢·žð±‹á”€ð””ð‘©±å®ä±¬ð©¾\n𗶽`. Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* bpo-40334: Improvements to error-handling code in the PEG parser (GH-20003)Lysandros Nikolaou2020-05-171-21/+12
| | | | | | | | The following improvements are implemented in this commit: - `p->error_indicator` is set, in case malloc or realloc fail. - Avoid memory leaks in the case that realloc fails. - Call `PyErr_NoMemory()` instead of `PyErr_Format()`, because it requires no memory. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-40503: PEP 615: Tests and implementation for zoneinfo (GH-19909)Paul Ganssle2020-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the initial implementation of PEP 615, the zoneinfo module, ported from the standalone reference implementation (see https://www.python.org/dev/peps/pep-0615/#reference-implementation for a link, which has a more detailed commit history). This includes (hopefully) all functional elements described in the PEP, but documentation is found in a separate PR. This includes: 1. A pure python implementation of the ZoneInfo class 2. A C accelerated implementation of the ZoneInfo class 3. Tests with 100% branch coverage for the Python code (though C code coverage is less than 100%). 4. A compile-time configuration option on Linux (though not on Windows) Differences from the reference implementation: - The module is arranged slightly differently: the accelerated module is `_zoneinfo` rather than `zoneinfo._czoneinfo`, which also necessitates some changes in the test support function. (Suggested by Victor Stinner and Steve Dower.) - The tests are arranged slightly differently and do not include the property tests. The tests live at test/test_zoneinfo/test_zoneinfo.py rather than test/test_zoneinfo.py or test/test_zoneinfo/__init__.py because we may do some refactoring in the future that would likely require this separation anyway; we may: - include the property tests - automatically run all the tests against both pure Python and C, rather than manually constructing C and Python test classes (similar to the way this works with test_datetime.py, which generates C and Python test cases from datetimetester.py). - This includes a compile-time configuration option on Linux (though not on Windows); added with much help from Thomas Wouters. - Integration into the CPython build system is obviously different from building a standalone zoneinfo module wheel. - This includes configuration to install the tzdata package as part of CI, though only on the coverage jobs. Introducing a PyPI dependency as part of the CI build was controversial, and this is seen as less of a major change, since the coverage jobs already depend on pip and PyPI. Additional changes that were introduced as part of this PR, most / all of which were backported to the reference implementation: - Fixed reference and memory leaks With much debugging help from Pablo Galindo - Added smoke tests ensuring that the C and Python modules are built The import machinery can be somewhat fragile, and the "seamlessly falls back to pure Python" nature of this module makes it so that a problem building the C extension or a failure to import the pure Python version might easily go unnoticed. - Adjustments to zoneinfo.__dir__ Suggested by Petr Viktorin. - Slight refactorings as suggested by Steve Dower. - Removed unnecessary if check on std_abbr Discovered this because of a missing line in branch coverage.