3229 Commits

Author SHA1 Message Date
Miss Islington (bot)
9524203dee
[3.10] gh-90953: Don't use deprecated AST nodes in clinic.py (GH-104322) (GH-140855)
(cherry picked from commit fe694a6db620062f467469bd2bb987315d72fd62)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-10-31 17:56:30 +01:00
Petr Viktorin
6a2f12a754
[3.10] gh-125529: Avoid f-strings in the metagrammar (#125582)
Grammar actions need to be valid Python tokens and the accepted tokens need to be
listed in the actions mini-grammar).

In Python 3.12+ (PEP 701), f-strings are no longer STRING tokens, so pegen fails
to regenerate the metaparser on this Python version, as in:

   PYTHON_FOR_REGEN=python3.12 make regen-pegen-metaparser

Use `+` and plain strings rather than f-strings.

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2024-10-22 12:41:51 +01:00
Dimitri John Ledkov
333c7dccd8
[3.10] gh-100454: Fix running SSL tests with OpenSSL 3.1+ (GH-100456) (GH-118262)
This fixes Ubuntu pipeline with OpenSSL 3.1+

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
2024-05-07 12:00:40 +02:00
Miss Islington (bot)
d0524caed0
[3.10] Upgrade bundled libexpat to 2.6.0 (GH-115399) (GH-115468) (#115473)
Manual backport due to code differences.
(cherry picked from commit e071b0d558b2f5cddd5a9fc6afadb4ba109ec77e)

Co-authored-by: Seth Michael Larson <seth@python.org>
2024-02-19 14:58:39 +00:00
Ned Deily
97ce15c5f8
[3.10] gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and multissltests to use 1.1.1w, 3.0.11, and 3.1.3. (#110007)
gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and multissltests to use 1.1.1w, 3.0.11, and 3.1.3.

(cherry picked from commit c88037d137a98d7c399c7bd74d5117b5bcae1543)
2023-09-28 15:34:02 +01:00
Miss Islington (bot)
63a7f7765c
[3.10] gh-109002: Ensure only one wheel for each vendored package (GH-109003) (#109007)
Output with one wheel:
```
❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py
Verifying checksum for /Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl.
Expected digest: 7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be
Actual digest:   7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be
::notice file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Successfully verified the checksum of the pip wheel.
```

Output with two wheels:
```
❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py
::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-22.0.4-py3-none-any.whl::Found more than one wheel for package pip.

::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Found more than one wheel for package pip.
```

Output without wheels:
```
❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py
::error file=::Could not find a pip wheel on disk.
```
(cherry picked from commit f8a047941f2e4a1848700c21d58a08c9ec6a9c68)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-09-06 20:01:13 +02:00
Ned Deily
56e8c87e84
[3.10] gh-107565: Update multissltests and GitHub CI workflows to use OpenSSL 1.1.1v, 3.0.10, and 3.1.2. (GH-108120)
(cherry picked from commit 441797d4ffb12acda257370b9e5e19ed8d6e8a71)
2023-08-18 21:21:19 +00:00
Gregory P. Smith
cb37100bec
[3.10] gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (GH-105174) (GH-105200) (#105204)
Upgrade builds to OpenSSL 1.1.1u.

This OpenSSL version addresses a pile if less-urgent CVEs since 1.1.1t.

The Mac/BuildScript/build-installer.py was already updated.

Also updates _ssl_data_111.h from OpenSSL 1.1.1u, _ssl_data_300.h from 3.0.9.

Manual edits to the _ssl_data_300.h file prevent it from removing any existing definitions in case those exist in some peoples builds and were important (avoiding regressions during backporting).

(cherry picked from commit ede89af).
(cherry picked from commit a5d2b546c1b0b73d0695b98838a3ddd497382999)
(cherry picked from commit f90d3f68db720bd6d0deda8cc0030339ccd43858)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-06-05 18:07:30 +02:00
Steve Dower
f22ddbfc7a
[3.10] Improves the Windows MSI test run on PR (GH-104929)
Correctly set the exit code when builds fail
Also build docs as part of the test
2023-05-25 17:45:47 +01:00
Steve Dower
decf7a7cb7
gh-103262: Fixes Windows installer build to work with latest compilers (GH-103281) 2023-04-05 17:02:04 +01:00
Pablo Galindo Salgado
6b49cc64a4
[3.10] gh-102416: Do not memoize incorrectly loop rules in the parser (GH-102467). (#102474) 2023-03-06 16:59:16 +00:00
Steve Dower
b8149a9d7e
gh-101726: Update the OpenSSL version to 1.1.1t (GH-101727)
Fixes CVE-2023-0286 (High) and a couple of Medium security issues.
https://www.openssl.org/news/secadv/20230207.txt

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-02-09 19:29:14 +00:00
Steve Dower
a0b7c3fd2a
[3.10] Fix MSI build PlatformToolset detection (#101651)
Fix MSI build PlatformToolset detection
2023-02-08 11:05:01 +01:00
Pablo Galindo Salgado
9345eea256
[3.10] gh-101046: Fix a potential memory leak in the parser when raising MemoryError (GH-101051). (#101086)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-01-16 23:48:38 +00:00
colorfulappl
53063b7ffa
[3.10] gh-99240: Fix double-free bug in Argument Clinic str_converter generated code (GH-99241) (#100353)
(cherry picked from commit 8dbe08eb7c807f484fe9870f5b7f5ae2881fd966)

Fix double-free bug mentioned at GH-99240, by moving memory clean up out of "exit" label.
2022-12-20 15:50:42 +05:30
colorfulappl
3144aca3da
[3.10] gh-96002: Add functional test for Argument Clinic (GH-96178) (#100232)
(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>
2022-12-17 12:06:06 +05:30
Miss Islington (bot)
84a26e114e
gh-95731: Fix module docstring extraction in pygettext (GH-95732)
(cherry picked from commit 120b4ab2b68aebf96ce0de243eab89a25fc2d282)

Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-10-15 08:33:19 -07:00
Serhiy Storchaka
769b9dccd2
[3.10] gh-97728: Argument Clinic: Fix uninitialized variable in the Py_UNICODE converter (GH-97729) (GH-97760)
It affects function os.system() on Windows and Windows-specific modules
winreg, _winapi, _overlapped, and _msi.
(cherry picked from commit 0ee9619a4cba58730c45e65d22288fadbf7680de)
2022-10-03 16:59:21 +03:00
Steve Dower
1dc1d5d59a
gh-90989: Clarify some installer text (GH-97676) 2022-09-30 14:54:31 +01:00
Miss Islington (bot)
e3815d7d6d
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>
2022-09-28 16:50:07 -07:00
Miss Islington (bot)
4e1303b4c9
gh-96729: Ensure installers built with Tools/msi/buildrelease.bat have matching UUIDs with official releases (GH-96755)
(cherry picked from commit 662782e95f97d26bd57b3edc6aaf674e30899f44)

Co-authored-by: adang1345 <adang1345@gmail.com>
2022-09-12 07:46:26 -07:00
Christian Heimes
32a45011e7
[3.10] gh-94682: Build and test with OpenSSL 1.1.1q (gh-94683) (gh-96391)
Co-authored-by: Christian Heimes <christian@python.org>
2022-08-29 20:02:00 +02:00
Steve Dower
fa118f0cd3
bpo-46744: Support "-Win32" and make platform flags case insensitive in Windows build scripts. (GH-31803)
Co-authored-by: conioh <10606081+conioh@users.noreply.github.com>
2022-08-25 21:16:15 +01:00
Serhiy Storchaka
da4aae29f8
[3.10] gh-91838: Resolve more HTTP links which redirect to HTTPS (GH-95650). (GH-95786)
(cherry picked from commit cc9160a29bc3356ced92348bcd8e6668c67167c9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-08-08 18:09:06 +03:00
Petr Viktorin
b66b6e1cc0
gh-91271: Document which parts of structs are in limited API/stable ABI (GH-32196) (GH-95711)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-08-05 17:30:51 +02:00
Erlend Egeberg Aasland
dc36801f7c
[3.10] gh-94430: Allow params named module or self with custom C names in AC (GH-94431) (#94650)
(cherry picked from commit 8bbd70b4d130f060f87e3f53810dc747a49fa369)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-07 13:26:21 +02:00
Miss Islington (bot)
5bd56a030d
gh-94538: Fix Argument Clinic output to custom file (GH-94539) (GH-94556)
(cherry picked from commit 2b8ed4d3d4741811da31fc774a202d535755c0a9)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-05 14:33:23 +02:00
Miss Islington (bot)
036a2c1201
bpo-45816: Support building with VS 2022 (v143 toolset) on Windows (GH-29577)
(cherry picked from commit d9301703fb1086cafbd730c17e3d450a192485d6)

Co-authored-by: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
2022-06-23 12:50:36 -07:00
Miss Islington (bot)
4a28525614
gh-91172: Create a workflow for verifying bundled pip and setuptools (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>
2022-06-22 16:04:06 +02:00
Miss Islington (bot)
7954b664d4
gh-92256: Improve Argument Clinic parser error messages (GH-92268)
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>
2022-05-10 00:43:26 -07:00
Serhiy Storchaka
62ddbbcfaf
[3.10] gh-91583: AC: Fix regression for functions with defining_class (GH-91739) (GH-92079)
Argument Clinic now generates the same efficient code as before
adding the defining_class parameter.
(cherry picked from commit a055dac0b45031878a8196a8735522de018491e3)
2022-05-03 11:53:46 +03:00
Miss Islington (bot)
84c279b514
gh-91595: fix the comparison of character and integer by using ord() (GH-91596)
* 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>
2022-04-16 07:59:32 -07:00
Steve Dower
04fdbb4f70
[3.10] bpo-47032: Ensure Windows install builds fail correctly with a non-zero exit code when part of the build fails (GH-31921) (GH-31926)
Automerge-Triggered-By: GH:zooba
2022-03-15 19:07:42 -07:00
Miss Islington (bot)
58d30b992d
bpo-46948: Fix launcher installer build failure due to first part of fix (GH-31920)
(cherry picked from commit 708812085355c92f32e547d1f1d1f29aefbbc27e)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-03-15 18:13:03 -07:00
Christian Heimes
a59ac1e7d2
[3.10] bpo-47024: Update OpenSSL to 1.1.1n (GH-31895) (GH-31916)
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>.
Co-authored-by: Christian Heimes <christian@python.org>
2022-03-15 21:31:00 +01:00
Steve Dower
136842c91b
bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses the install path during repair (GH-31727) 2022-03-07 17:23:20 +00:00
Luca Chiodini
0ff033b859
[3.10] Update grammar_grapher with the new forced (&&) directive (GH-31704) (GH-31719)
(cherry picked from commit 7f07b5ee9c2d17f837c44440bf066c73f92dac14)

Co-authored-by: Luca Chiodini <luca@chiodini.org>
2022-03-07 14:54:08 +00:00
Pablo Galindo Salgado
14284b0e71
[3.10] Allow the parser to avoid nested processing of invalid rules (GH-31252). (GH-31257)
(cherry picked from commit 390459de6db1e68b79c0897cc88c0d562693ec5c)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-02-10 14:38:31 +00:00
Miss Islington (bot)
34895f694c
Optimize images by IMGbot (GH-21348)
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
(cherry picked from commit ba650af7d660084e08859dd1ee1917cccee24e88)
2022-02-04 16:31:21 +09:00
Gregory P. Smith
f5ebec4d3e
[3.10] bpo-46576: bpo-46524: Disable compiler optimization within test_peg_generator. (GH-31015) (GH-31089)
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>
2022-02-02 20:02:59 -08:00
Miss Islington (bot)
a8912a0f8d
bpo-29844: Remove obsolete paragraph from Tools/msi/README.txt (GH-29141)
(cherry picked from commit 098a33f6a60ca2df88e03024ac9d8da507cfa5c8)
2022-01-27 10:59:20 -06:00
Ned Deily
cf96c279ac
bpo-46106: Update OpenSSL to 1.1.1m (GH-30211) (GH-30224)
Co-authored-by: Ned Deily <nad@python.org>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2021-12-21 23:24:03 -05:00
Pablo Galindo Salgado
dc73199a21
[3.10] bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser (GH-30177) (GH-30214)
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>.
(cherry picked from commit e9898bf153d26059261ffef11f7643ae991e2a4c)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-12-20 16:23:37 +00:00
Miss Islington (bot)
251d2eadc7
bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170)
(cherry picked from commit 2985feac4e02d590bb78bcce9e30864be53280ac)

Co-authored-by: Christian Heimes <christian@python.org>
2021-12-17 07:38:11 -08:00
Victor Stinner
b6defde2af
bpo-45866: pegen strips directory of "generated from" header (GH-29777) (GH-29792)
"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)
2021-11-26 16:38:50 +01:00
Miss Islington (bot)
327c764fa2
bpo-45561: Run smelly.py tool from $(srcdir) (GH-29138)
(cherry picked from commit 457e6a6e96b5afad403a0bc892508a77beef4d33)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2021-11-23 02:32:31 -08:00
Miss Islington (bot)
9e7a2e4920
Fix out-of-tree build support for multissltest (GH-29694)
(cherry picked from commit 512dbf6f56364d359e16988b3fd7e766edfaebf9)

Co-authored-by: Christian Heimes <christian@python.org>
2021-11-22 02:14:28 -08:00
Miss Islington (bot)
b2ae631619
[3.10] bpo-45688: Add _scproxy to sys.stdlib_module_names (GH-29358) (GH-29361)
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-02 12:32:36 +01:00
Łukasz Langa
5c9cab595e
[3.10] bpo-45494: Fix parser crash when reporting errors involving invalid continuation characters (GH-28993) (GH-29070)
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>
2021-10-19 22:31:18 +02:00
Christian Clauss
03bf55d8cf
[3.10] Fix typos in the Tools directory (GH-28769) (GH-28801)
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>
2021-10-07 17:34:55 +02:00