summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* [3.9] gh-97612: Fix shell injection in get-remote-certificate.py (GH-97613) ↵Miss Islington (bot)2022-10-041-18/+7
| | | | | | | | | | | | | | | | | | (GH-97632) gh-97612: Fix shell injection in get-remote-certificate.py (GH-97613) 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-91172: Create a workflow for verifying bundled pip and setuptools ↵Miss Islington (bot)2022-06-221-0/+98
| | | | | | | | | (GH-31885) (GH-94123) 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>
* gh-92256: Improve Argument Clinic parser error messages (GH-92268)Miss Islington (bot)2022-05-101-3/+9
| | | | | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> (cherry picked from commit 4bd07d1dbd493fc9b2c2a77e9e905c517682052e) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
* [3.9] gh-91583: AC: Fix regression for functions with defining_class ↵Serhiy Storchaka2022-05-031-17/+36
| | | | | | | | (GH-91739) (GH-92080) Argument Clinic now generates the same efficient code as before adding the defining_class parameter. (cherry picked from commit a055dac0b45031878a8196a8735522de018491e3)
* gh-91595: fix the comparison of character and integer by using ord() (GH-91596)Miss Islington (bot)2022-04-161-1/+1
| | | | | | | | | | * fix the comparison of character and integer by using ord() * 📜🤖 Added by blurb_it. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 9300b6d72948b94c0924a75ea14c6298156522d0) Co-authored-by: Yu Liu <yuki.liu@utexas.edu>
* [3.9] bpo-47032: Ensure Windows install builds fail correctly with a ↵Steve Dower2022-03-162-24/+26
| | | | | non-zero exit code when part of the build fails (GH-31921) (GH-31927) Automerge-Triggered-By: GH:zooba
* bpo-46948: Fix launcher installer build failure due to first part of fix ↵Miss Islington (bot)2022-03-161-0/+2
| | | | | | | (GH-31920) (cherry picked from commit 708812085355c92f32e547d1f1d1f29aefbbc27e) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.9] bpo-47024: Update OpenSSL to 1.1.1n (GH-31895) (#31917)Christian Heimes2022-03-151-2/+2
| | | | | Co-authored-by: Zachary Ware <zachary.ware@gmail.com>. Co-authored-by: Christian Heimes <christian@python.org>. Co-authored-by: Christian Heimes <christian@python.org>
* bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly ↵Steve Dower2022-03-0710-4/+24
| | | | uses the install path during repair (GH-31728)
* Optimize images by IMGbot (GH-21348)Miss Islington (bot)2022-02-041-0/+0
| | | | | | Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com> (cherry picked from commit ba650af7d660084e08859dd1ee1917cccee24e88) Co-authored-by: Manish Kumar ⛄ <manishprivet@protonmail.com>
* [3.9] [3.10] bpo-46576: bpo-46524: Disable compiler optimization within ↵Miss Islington (bot)2022-02-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | test_peg_generator. (GH-31015) (GH-31089) (GH-31093) Disable compiler optimization within test_peg_generator. This speed up test_peg_generator by always disabling compiler optimizations by using -O0 or equivalent when the test is building its own C extensions. A build not using --with-pydebug in order to speed up test execution winds up with this test taking a very long time as it would do repeated compilation of parser C code using the same optimization flags as CPython was built with. This speeds the test up 6-8x on gps-raspbian. Also incorporate's GH-31017's win32 conditional and flags. Co-authored-by: Kumar Aditya kumaraditya303. (cherry picked from commit 164a017e13ee96bd1ea1ae79f5ac9e25fe83994e) Co-authored-by: Gregory P. Smith <greg@krypto.org> (cherry picked from commit f5ebec4d3e1199ec38b88920cfde8e460e5120dd) Co-authored-by: Gregory P. Smith <greg@krypto.org> Automerge-Triggered-By: GH:gpshead
* bpo-29844: Remove obsolete paragraph from Tools/msi/README.txt (GH-29141)Miss Islington (bot)2022-01-271-8/+3
| | | (cherry picked from commit 098a33f6a60ca2df88e03024ac9d8da507cfa5c8)
* bpo-46106: Update OpenSSL to 1.1.1m (GH-30211) (GH-30225)Ned Deily2021-12-221-1/+1
| | | | Co-authored-by: Ned Deily <nad@python.org> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* [3.9] bpo-46110: Add a recursion check to avoid stack overflow in the PEG ↵Pablo Galindo Salgado2021-12-201-4/+11
| | | | | | | | parser (GH-30177) (#30215) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>. (cherry picked from commit e9898bf153d26059261ffef11f7643ae991e2a4c) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.9] bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170) (GH-30173)Christian Heimes2021-12-171-1/+1
| | | Co-authored-by: Christian Heimes <christian@python.org>
* bpo-45866: pegen strips directory of "generated from" header (GH-29777) ↵Victor Stinner2021-11-263-3/+7
| | | | | | | | | | (GH-29792) (GH-29797) "make regen-all" now produces the same output when run from a directory other than the source tree: when building Python out of the source tree. (cherry picked from commit 253b7a0a9fef1d72a4cb87b837885576e68e917c) (cherry picked from commit b6defde2afe656db830d6fedf74ca5f6225f5928)
* [3.9] bpo-45838: Fix incorrect line numbers in Tools/gdb/libpython.py (GH-29628)Sam Gross2021-11-191-1/+4
| | | | The line number calculation in libpython.py did not properly handle negative (signed) line table deltas.
* [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