summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* [3.9] bpo-45494: Fix parser crash when reporting errors involving invalid ↵Łukasz Langa2021-10-201-1/+1
| | | | | | | | | | | | | | | | | | | continuation characters (GH-28993) (#29071) There are two errors that this commit fixes: * The parser was not correctly computing the offset and the string source for E_LINECONT errors due to the incorrect usage of strtok(). * The parser was not correctly unwinding the call stack when a tokenizer exception happened in rules involving optionals ('?', [...]) as we always make them return valid results by using the comma operator. We need to check first if we don't have an error before continuing.. (cherry picked from commit a106343f632a99c8ebb0136fa140cf189b4a6a57) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> NOTE: unlike the cherry-picked original, this commit points at a crazy location due to a bug in the tokenizer that required a big refactor in 3.10 to fix. We are leaving as-is for 3.9.
* [3.9] Fix typos in the Tools directory (GH-28769) (GH-28800)Christian Clauss2021-10-075-5/+5
| | | | | | Like #28744 but for the Tools directory. Automerge-Triggered-By: GH:pablogsal (cherry picked from commit 682aecfdeba481c876bfc9f3796c635bd5b5df50)
* [3.9] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28512)Łukasz Langa2021-09-221-1/+1
| | | | | | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>. (cherry picked from commit 8f943ca25732d548cf9f0b0393ba8d582fb93e29) Co-authored-by: Mohamad Mansour <66031317+mohamadmansourX@users.noreply.github.com>
* [3.9] Fix typos in pep384_macrocheck.py (GH-28220) (GH-28273)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
* [3.9] bpo-38820: Test with OpenSSL 3.0.0 final (GH-28205) (GH-28217)Łukasz Langa2021-09-081-1/+5
| | | | | | Signed-off-by: Christian Heimes <christian@python.org>. (cherry picked from commit cc7c6801945c6a7373553b78bd899ce09681ec0a) Co-authored-by: Christian Heimes <christian@python.org>
* [3.9] bpo-45060: Get rid of few uses of the equality operators with None ↵Serhiy Storchaka2021-09-011-2/+2
| | | | | | | (GH-28087). (GH-28093) (cherry picked from commit 3c65457156d87e55010507d616b4eecb7a02883d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.9] bpo-45007: Update multissl to openssl 1.1.1l as well (GH-28044) (GH-28062)Christian Heimes2021-08-301-2/+2
| | | | | | This was missed while upgrading CI.. (cherry picked from commit d6cb5dd9e19210f5963ff8beadde7ca2fda71574) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.9] Update URLs in comments and metadata to use HTTPS (GH-27458) (GH-27480)Łukasz Langa2021-07-308-9/+9
| | | | | (cherry picked from commit be42c06bb01206209430f3ac08b72643dc7cad1c) Co-authored-by: Noah Kantrowitz <noah@coderanger.net>
* [3.9] bpo-38820: Test with OpenSSL 3.0.0-alpha16 (GH-25942) (#25944)Christian Heimes2021-07-121-44/+11
| | | | | | Also use new make target to install FIPS provider.. (cherry picked from commit e8525567dd325527e00b3c4ce7c4ce31ff3f1a8c) Co-authored-by: Christian Heimes <christian@python.org>
* Remove a redundant assignment in Tools/unittestgui/unittestgui.py (GH-21438) ↵Miss Islington (bot)2021-05-161-1/+0
| | | | | | | | (#26169) (cherry picked from commit a42d98ed91cd1f08b2e9734ca6ca136dd10dff5d) Co-authored-by: Serhii Hidenko <shidenko97@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>
* [3.9] bpo-38820: Old OpenSSL 3.0.0 releases are in /old/3.0/ (GH-25624) ↵Miss Islington (bot)2021-04-261-10/+14
| | | | | | | | | | | (GH-25626) Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit 3c586ca500854476e6eff06713236faff233d035) Co-authored-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: GH:tiran
* Improve CDN purge script (GH-25251) (#25254)Miss Islington (bot)2021-04-251-0/+3
| | | | | | | (cherry picked from commit e35dd556e1adb4fc8b83e5b75ac59e428a8b5460) Co-authored-by: Steve Dower <steve.dower@python.org> Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.9] bpo-43788: Generate version specific _ssl_data.h (GH-25300) (GH-25310)Christian Heimes2021-04-092-81/+115
| | | | | (cherry picked from commit 150af7543214e1541fa582374502ac1cd70e8eb4) Co-authored-by: Christian Heimes <christian@python.org>
* [3.9] bpo-43631: Update to OpenSSL 1.1.1k (GH-25024) (GH-25088)Christian Heimes2021-03-301-2/+2
| | | | | | | | Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: GH:tiran. (cherry picked from commit a54fc683f237d8f0b6e999a63aa9b8c0a45b7fef) Co-authored-by: Christian Heimes <christian@python.org>
* Do not remove x bit from published directories (GH-24101)Miss Islington (bot)2021-01-041-2/+2
| | | | | (cherry picked from commit af4cd16479f2d55bee3db899e7679d7cde1d2ab7) Co-authored-by: Steve Dower <steve.dower@python.org>
* closes bpo-42726: gdb libpython: InstanceProxy support for py3 (GH-23912)Miss Islington (bot)2020-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 (cherry picked from commit b57ada98da0d5b0cf1ebc2c9c5502d04aa962042) Co-authored-by: Augusto Hack <hack.augusto@gmail.com>
* [3.9] bpo-42630: Improve error reporting in Tkinter for absent default root ↵Serhiy Storchaka2020-12-191-8/+4
| | | | | | | | | | | | | | | (GH-23781) (GH-23853) * 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. (cherry picked from commit 3d569fd6dccf9f582bafaca04d3535094cae393e)
* bpo-42613: Fix freeze.py config directory (GH-23792) (GH-23817)Miss Islington (bot)2020-12-171-10/+10
| | | | | | | | Fix freeze.py tool to use the prope config and library directories. (cherry picked from commit 1c653f17cb84d81df3a74ab0b42140d2bb68c5c4) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-42398: Fix "make regen-all" race condition (GH-23362) (GH-23367)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. (cherry picked from commit 8fba9523cf08029dc2e280d9f48fdd57ab178c9d)
* bpo-40754: Adds _testinternalcapi to Windows installer for test suite (GH-23271)Miss Islington (bot)2020-11-131-2/+2
| | | | | (cherry picked from commit 9b6934230c35e24d8582ea8c58456fa8eab72ae2) Co-authored-by: Steve Dower <steve.dower@python.org>
* Enable signing of nuget.org packages and update to supported timestamp ↵Miss Skeleton (bot)2020-11-031-3/+3
| | | | | | | server (GH-23132) (cherry picked from commit db6434c474f7389a98b8118ca87fca988416bf33) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.9] bpo-42218: Correctly handle errors in left-recursive rules (GH-23065) ↵Lysandros Nikolaou2020-10-311-0/+3
| | | | | | | | | | | | (GH-23066) 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> (cherry picked from commit 02cdfc93f82fecdb7eae97a868d4ee222b9875d9) Automerge-Triggered-By: GH:lysnikolaou
* [3.9] bpo-42123: Run the parser two times and only enable invalid rules on ↵Lysandros Nikolaou2020-10-281-1/+4
| | | | | | | | | | | | the second run (GH-22111) (GH-23011) * 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. (cherry picked from commit bca701403253379409dece03053dbd739c0bd059)
* [3.9] Remove git conflict lines from test_parse_directory in peg_generator ↵Lysandros Nikolaou2020-10-271-5/+0
| | | | (GH-23007)
* bpo-41744: Package python.props with correct name in NuGet package (GH-22154)Miss Skeleton (bot)2020-10-214-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. (cherry picked from commit 7c11a9accabe3720940f334eb1226bb7bb9179c7) Co-authored-by: Václav Slavík <vaclav@slavik.io>
* bpo-41971: Fix test failure in test.test_tools.test_c_analyzer when mutating ↵Miss Skeleton (bot)2020-10-111-1/+3
| | | | | | | | | global state (GH-22652) (GH-22653) (cherry picked from commit 47ecfd8030c391779dd9d3b4b07e6b01a8392481) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* [3.9] Fix 'gather' rules in the python parser generator (GH-22021) (GH-22080)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. (cherry picked from commit e55a0e9) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-41526: Fixed layout of final page of the installer (GH-21871)Miss Islington (bot)2020-08-132-5/+3
| | | | | (cherry picked from commit 6444ca946984c638c67a72aac22fd6d3cc650c16) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-41412 and bpo-40948: Windows installer updates (GH-21656)Miss Islington (bot)2020-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 (cherry picked from commit 37a06cbe5c17c2aa6ad938339fd42531a8a0bea0) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-41173: Copy test results file from ARM worker before uploading (GH-21305)Miss Islington (bot)2020-07-071-2/+4
| | | | | (cherry picked from commit 10772ec1505a4583d662c051e577eb2d4fb6e755) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.9] bpo-41215: Don't use NULL by default in the PEG parser keyword list ↵Pablo Galindo2020-07-061-1/+1
| | | | | | | | | (GH-21355) (GH-21356) (cherry picked from commit 39e76c0fb07e20acad454deb86a0457b279884a9) Co-authored-by: Pablo Galindo <pablogsal@gmail.com> Automerge-Triggered-By: @lysnikolaou
* [3.9] bpo-41043: Escape literal part of the path for glob(). (GH-20994). ↵Serhiy Storchaka2020-07-024-5/+13
| | | | | (GH-21275) (cherry picked from commit 935586845815f5b4c7814794413f6a812d4bd45f)
* bpo-41044: Generate valid PEG python parsers for opt+seq rules (GH-20995)Miss Islington (bot)2020-06-201-1/+7
| | | | | | Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> (cherry picked from commit 55460ee6dc9a4f16bd68d6b6be3a8398c7d4a596) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
* [3.9] Include soft keywords in keyword.py (GH-20877). (GH-20880)Pablo Galindo2020-06-152-7/+14
| | | | | (cherry picked from commit 78319e373d57cd4da67660f888aa7092efbd6f24) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-40939: Generate keyword.py using the new parser (GH-20800)Miss Islington (bot)2020-06-111-0/+73
| | | | | (cherry picked from commit 9727694f08cad4b019d2939224e3416312b1c0e1) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* Refactor scripts in Tools/peg_generator/scripts (GH-20401)Miss Islington (bot)2020-06-066-140/+131
| | | | | (cherry picked from commit ba6fd87e41dceb01dcdacc57c722aca12cde42a9) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-30008: Fix OpenSSL no-deprecated compilation (GH-20397)Miss Islington (bot)2020-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> (cherry picked from commit a871f692b4a2e6c7d45579693e787edc0af1a02c) Co-authored-by: Christian Heimes <christian@python.org>
* [3.9] Backport GH-20370 and GH-20436: Soft keywords (GH-20458)Lysandros Nikolaou2020-05-271-5/+28
|
* Fix peg_generator compiler warnings under MSVC (GH-20405)Miss Islington (bot)2020-05-261-4/+4
| | | | | (cherry picked from commit a2bbedc8b18c001d2f9e702e6e678efbb2990daa) Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
* bpo-40688: Use the correct parser in the peg_generator scripts (GH-20235)Miss Islington (bot)2020-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. (cherry picked from commit 9645930b5bc1833ef495891d22052d1ba65ab7ea) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-40750: Do not expand the new parser debug flags if Py_BUILD_CORE is not ↵Miss Islington (bot)2020-05-251-1/+1
| | | | | | | defined (GH-20393) (cherry picked from commit deb4355a37e41edf1199920789fe9572c1fb43c2) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-40750: Support -d flag in the new parser (GH-20340)Miss Islington (bot)2020-05-252-25/+61
| | | | | (cherry picked from commit 800a35c623bbcdb5793c7d7a4974524286311479) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-40334: Support suppressing of multiple optional variables in Pegen ↵Miss Islington (bot)2020-05-241-2/+2
| | | | | | | (GH-20367) (cherry picked from commit cba503151056b448b7a3730dc36ef6655550ade5) Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
* Fix debug output in PEG parser generator (GH-20308)Miss Islington (bot)2020-05-221-3/+3
| | | | | (cherry picked from commit b831129123dbb4bfba49824ae893448b05398f27) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* [3.9] Fix typing problems reported by mypy in pegen (GH-20297) (GH-20300)Pablo Galindo2020-05-212-28/+27
| | | | | (cherry picked from commit d10fef35c6ce8a3193b974be7e8c8304b1146153) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-39631: Fix file association MIME type in the Windows installer (GH-20205)Miss Islington (bot)2020-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. (cherry picked from commit 8c862e51248c5ebfec787badec88eb58c9267e1e) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-40669: Use requirements.pip when installing PEG dependencies (GH-20194)Miss Islington (bot)2020-05-191-1/+1
| | | | | (cherry picked from commit 3764069f3ba2a7e932837ae19265059339dc86e3) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* 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