Commit graph

3803 commits

Author SHA1 Message Date
Seth Michael Larson f5406ef454
gh-116122: Add SBOM generation to PCbuild/build.bat (GH-116138)
(cherry picked from commit 72dae53e09)

Co-authored-by: Seth Michael Larson <seth@python.org>
2024-05-01 15:47:41 +01:00
Miss Islington (bot) 97c0194c9f
gh-118347: Fix Windows installer not updating launcher (GH-118386)
(cherry picked from commit 96d8ca7ad6)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-04-29 21:16:17 +00:00
neonene 9f4ae13d2a
[3.12] gh-117613: Argument Clinic: ensure that defining class params are positional-only (#117939) 2024-04-17 21:11:17 +00:00
Miss Islington (bot) 8d42c57789
[3.12] gh-99108: Update and check HACL* version information (GH-117295) (GH-117302)
gh-99108: Update and check HACL* version information (GH-117295)

(cherry picked from commit 669ef49c7d)

Co-authored-by: Seth Michael Larson <seth@python.org>
2024-03-27 22:16:19 +00:00
Antoine Pitrou fcb230180f
[3.12] gh-112536: Add --tsan test for reasonable TSAN execution times. (gh-116601) (#116929)
(cherry picked from commit ebf29b3)

Co-authored-by: Donghee Na <donghee.na@python.org>
2024-03-18 10:22:19 +01:00
Miss Islington (bot) de239beaec
[3.12] gh-116576: Fix Tools/scripts/sortperf.py sorting the same list (GH-116577) (#116582)
gh-116576: Fix `Tools/scripts/sortperf.py` sorting the same list (GH-116577)
(cherry picked from commit 4704e55a71)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-03-11 07:15:51 +00:00
Brett Cannon 88fdb082d9
[3.12] GH-116313: get WASI builds to run under wasmtime 18 w/ WASI 0.2/preview2 primitives (GH-116327) (GH-116373) 2024-03-05 13:35:02 -08:00
Terry Jan Reedy 84b023d243
[3.12] chore: fix typos (#116345) (#116370)
Co-authored-by: cui fliter <imcusg@gmail.com>
(cherry picked from commit e7ba6e9dbe)
2024-03-05 18:51:17 +00:00
Miss Islington (bot) 34efd49280
gh-115554: Improved logic for handling multiple existing py.exe launcher installs (GH-115793)
(cherry picked from commit 9b7f253b55)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-03-05 16:47:03 +00:00
Miss Islington (bot) 8785eab342
[3.12] gh-116265: Remove obsolete sentence. (GH-116284) (#116331)
Remove sentence in Tools/c-analyzer/README referring to deleted
ignore-globals.txt.
(cherry picked from commit 88b5c665ee)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-03-04 22:20:44 +00:00
Miss Islington (bot) 25b21596fe
[3.12] GH-115978: Disable *readv() and *writev() on WASI (GH-116228) (GH-116231)
GH-115978: Disable `*readv()` and `*writev()` on WASI (GH-116228)

Wasmtime doesn't implement these functions in a way to pass test_posix (https://github.com/bytecodealliance/wasmtime/issues/7830).
(cherry picked from commit 5dc8c84d39)

Co-authored-by: Brett Cannon <brett@python.org>
2024-03-02 01:11:41 +00:00
Miss Islington (bot) 211b55951d
[3.12] gh-112844: Add SBOM for external dependencies (GH-115789) (#116128)
Co-authored-by: Seth Michael Larson <seth@python.org>
2024-02-29 21:32:14 +00:00
Miss Islington (bot) dd961d8329
[3.12] gh-108303: Move Lib/test/sortperf.py to Tools/scripts (GH-114687) (#115625)
gh-108303: Move `Lib/test/sortperf.py` to `Tools/scripts` (GH-114687)
(cherry picked from commit f9154f8f23)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-02-18 07:46:23 +00:00
Brett Cannon 0e4f73b8e4
[3.12] GH-113516: don't set LDSHARED when building for WASI (GH-115495) (GH-115496) 2024-02-15 01:19:42 +00:00
Miss Islington (bot) 14930acf5a
[3.12] gh-115399: Upgrade bundled libexpat to 2.6.0 (GH-115431) (#115469)
gh-115399: Upgrade bundled libexpat to 2.6.0 (GH-115431)
(cherry picked from commit 4b2d1786cc)

Co-authored-by: Seth Michael Larson <seth@python.org>
2024-02-14 14:14:34 -08:00
Miss Islington (bot) 50f17a5a0a
[3.12] gh-112302: Move pip SBOM discovery to release-tools (GH-115360) (#115486)
Co-authored-by: Seth Michael Larson <seth@python.org>
2024-02-14 20:43:03 +00:00
John Belmonte 09c98e4633
[3.12] gh-114563: C decimal falls back to pydecimal for unsupported format strings (GH-114879) (GH-115353)
Immediate merits:
* eliminate complex workarounds for 'z' format support
  (NOTE: mpdecimal recently added 'z' support, so this becomes
  efficient in the long term.)
* fix 'z' format memory leak
* fix 'z' format applied to 'F'
* fix missing '#' format support

Suggested and prototyped by Stefan Krah.

Fixes gh-114563, gh-91060

(cherry picked from commit 72340d15cd)

Co-authored-by: John Belmonte <john@neggie.net>
Co-authored-by: Stefan Krah <skrah@bytereef.org>
2024-02-12 23:31:12 +02:00
Miss Islington (bot) 5fb2204ad4
[3.12] gh-112302: Change 'licenseConcluded' field to 'NOASSERTION' (GH-115038) (#115088)
* gh-112302: Change 'licenseConcluded' field to 'NOASSERTION' (GH-115038)
(cherry picked from commit 4bf41879d0)

Co-authored-by: Seth Michael Larson <seth@python.org>

* Update pip SBOM package to version in source

---------

Co-authored-by: Seth Michael Larson <seth@python.org>
2024-02-06 19:34:03 +01:00
Seth Michael Larson 5e64828064
[3.12] gh-112302: Backport SBOM generation tooling (#114730)
[3.12] Backport SBOM generation tooling
2024-02-06 16:02:28 +01:00
Erlend E. Aasland 6f5e360acd
[3.12] gh-115015: Argument Clinic: fix generated code for METH_METHOD methods without params (#115016) (#115067)
(cherry picked from commit 09096a1647)
2024-02-06 11:20:16 +01:00
Miss Islington (bot) 5ddb274040
[3.12] gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.13. (GH-115055)
Also update multissltests to use 1.1.1w, 3.0.13, 3.1.5, and 3.2.1.
(cherry picked from commit 299e16ca0f)

Co-authored-by: Ned Deily <nad@python.org>
2024-02-06 02:29:17 +00:00
Miss Islington (bot) 034bb70aaa
[3.12] Bump ruff to 0.2.0 (GH-114932) (#114935)
Bump ruff to 0.2.0 (GH-114932)
(cherry picked from commit 920b89f627)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-02 22:03:25 +00:00
Miss Islington (bot) d8825c2e76
[3.12] gh-65701: document that freeze doesn't work with framework builds on macOS (GH-113352) (#113362)
gh-65701: document that freeze doesn't work with framework builds on macOS (GH-113352)

* gh-65701: document that freeze doesn't work with framework builds on macOS

The framework install is inherently incompatible with freeze. Document
that that freeze doesn't work with framework builds and bail out
early when trying to run freeze anyway.

(cherry picked from commit df1eec3dae)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-12-22 11:16:30 +01:00
Victor Stinner 34d57d5871
[3.12] gh-106560: Fix redundant declarations in Python/frozen.c (#112612) (#112651)
gh-106560: Fix redundant declarations in Python/frozen.c (#112612)

Avoid duplicated declarations of "extern" functions in
Python/frozen.c.

Compiler warnings seen by building Python with gcc -Wredundant-decls.

(cherry picked from commit d9e444dbb8)
2023-12-03 11:54:59 +00:00
Alex Waygood 4fc010cda2
[3.12] Bump mypy to 1.7.1 (#112581) (#112601) 2023-12-01 17:10:38 +00:00
Eric Snow 4f71f1680d
[3.12] gh-106931: Intern Statically Allocated Strings Globally (gh-107272) (gh-110713)
We tried this before with a dict and for all interned strings.  That ran into problems due to interpreter isolation.  However, exclusively using a per-interpreter cache caused some inconsistency that can eliminate the benefit of interning.  Here we circle back to using a global cache, but only for statically allocated strings.  We also use a more-basic _Py_hashtable_t for that global cache instead of a dict.

Ideally we would only have the global cache, but the optional isolation of each interpreter's allocator means that a non-static string object must not outlive its interpreter.  Thus we would have to store a copy of each such interned string in the global cache, tied to the main interpreter.

(cherry-picked from commit b72947a8d2)
2023-11-27 23:51:12 +00:00
Miss Islington (bot) 8e37445044
[3.12] Remove imp_dummy_def from Tools/c-analyzer/cpython/ignored.tsv (gh-112122) (gh-112177)
It was removed in 3.12, no need to keep the ignore.
(cherry picked from commit 762eb58220)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-11-16 14:09:34 -07:00
Victor Stinner a498433df2
[3.12] gh-112088: Run autoreconf in GHA check_generated_files (GH-112090) (#112159)
gh-112088: Run autoreconf in GHA check_generated_files (#112090)

The "Check if generated files are up to date" job of GitHub Actions
now runs the "autoreconf -ivf -Werror" command instead of the "make
regen-configure" command to avoid depending on the external quay.io
server.

Add Tools/build/regen-configure.sh script to regenerate the configure
with an Ubuntu container image. The
"quay.io/tiran/cpython_autoconf:271" container image
(https://github.com/tiran/cpython_autoconf) is no longer used.

(cherry picked from commit d9fd33a869)
2023-11-16 15:55:40 +01:00
Alex Waygood 7313bde84c
[3.12] Bump mypy to 1.7.0 (GH-111961) (#112033) 2023-11-13 13:59:56 +00:00
Artyom Romanov 3d67b69820
[3.12] Sync location of mypy pin with the main branch (#111317) 2023-10-25 12:54:05 +00:00
Artyom Romanov 5e94556f83
[3.12] Bump test deps: ruff and mypy (GH-111288) (#111313)
Bump test deps: `ruff` and `mypy`
2023-10-25 11:04:55 +00:00
Nikita Sobolev c1e5343928
[3.12] Bump test deps: ruff and pre-commit-hooks (GH-110972) (#110980)
(cherry picked from commit b75b1f389f)
2023-10-17 13:01:57 +00:00
Miss Islington (bot) c06ac1b4cc
[3.12] gh-109408: Revert pre-commit whitespace checks pending portable solution (GH-110726) (#110730)
gh-109408: Revert pre-commit whitespace checks pending portable solution (GH-110726)
(cherry picked from commit de956b263b)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-11 16:37:41 +00:00
Adam Turner c9157feeec
[3.12] GH-109408: Move the C file whitespace check from patchcheck to pre-commit (GH-109890) (#110636)
(cherry picked from commit f5edb56328)
2023-10-10 15:00:00 +00:00
Miss Islington (bot) 948576574f
[3.12] GH-109408: Move the Python file whitespace check from patchcheck to pre-commit (GH-109891) (#110633)
GH-109408: Move the Python file whitespace check from patchcheck to pre-commit (GH-109891)
(cherry picked from commit 08ec4a1dbf)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-10 14:06:35 +00:00
Miss Islington (bot) 55d607683f
[3.12] gh-110558: Enable ruff's pyupgrade rules when running on Argument Clinic (GH-110603) (#110609)
gh-110558: Enable ruff's pyupgrade rules when running on Argument Clinic (GH-110603)
(cherry picked from commit fc811c8d20)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-10 12:35:21 +02:00
Alex Waygood 36886726a2
[3.12] gh-110558: Run ruff on Argument Clinic in CI (#110559) (#110598) 2023-10-10 08:58:56 +00:00
Miss Islington (bot) 0ffbde4e05
[3.12] gh-109408: Add the docs whitespace check from patchcheck to pre-commit (GH-109854) (#110594)
gh-109408: Add the docs whitespace check from patchcheck to pre-commit (GH-109854)
(cherry picked from commit 7426ed0347)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-10 08:39:55 +00:00
Miss Islington (bot) eed92e4f7e
[3.12] gh-103053: Fix test_tools.test_freeze on FreeBSD (GH-110451) (#110456)
gh-103053: Fix test_tools.test_freeze on FreeBSD (GH-110451)

Fix test_tools.test_freeze on FreeBSD: run "make distclean" instead
of "make clean" in the copied source directory to remove also the
"python" program.

Other test_freeze changes:

* Log executed commands and directories, and the current directory.
* No longer uses make -C option to change the directory, instead use
  subprocess cwd parameter.
(cherry picked from commit a4baa9e8ac)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-06 01:31:30 +00:00
Victor Stinner 8939221e91
[3.12] gh-109615: Fix support test_copy_python_src_ignore() (#109958) (#110340)
* gh-109615: Fix support test_copy_python_src_ignore() (#109958)

Fix the test when run on an installed Python: use "abs_srcdir" of
sysconfig, and skip the test if the Python source code cannot be
found.

* Tools/patchcheck/patchcheck.py, Tools/freeze/test/freeze.py and
  Lib/test/libregrtest/utils.py now first try to get "abs_srcdir"
  from sysconfig, before getting "srcdir" from sysconfig.
* test.pythoninfo logs sysconfig "abs_srcdir".

(cherry picked from commit b89ed9df39)

* gh-109615: Fix support test_copy_python_src_ignore() on WASM (#109970)

Not only check if src_dir exists, but look also for Lib/os.py
landmark.

(cherry picked from commit cc54bcf17b)

* gh-109615: Look for 'Modules' as landmark for test_copy_python_src_ignore (GH-110108)

(cherry picked from commit 20bc5f7c28)

* gh-109748: Fix again venv test_zippath_from_non_installed_posix() (#110149)

Call also copy_python_src_ignore() on listdir() names.

shutil.copytree(): replace set() with an empty tuple. An empty tuple
becomes a constant in the compiler and checking if an item is in an
empty tuple is cheap.

(cherry picked from commit 0def8c712b)

---------

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-10-04 10:27:12 +00:00
Miss Islington (bot) 196738fc86
[3.12] Code: Update Donghee Na's name (GH-109744) (#110225)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-02 17:31:34 +00:00
Victor Stinner 1fc25a389c
[3.12] gh-109615: Fix test_tools.test_freeze SRCDIR (#109935) (#109950)
gh-109615: Fix test_tools.test_freeze SRCDIR (#109935)

Fix copy_source_tree() function of test_tools.test_freeze:

* Don't copy SRC_DIR/build/ anymore. This directory is modified by
  other tests running in parallel.
* Add test.support.copy_python_src_ignore().
* Use sysconfig to get the source directory.
* Use sysconfig.get_config_var() to get CONFIG_ARGS variable.

(cherry picked from commit 1512d6c6ee)
2023-10-02 17:40:02 +02:00
Miss Islington (bot) 95fd4edc63
[3.12] gh-109098: Fuzz re module instead of internal sre (GH-109911) (#109932)
gh-109098: Fuzz re module instead of internal sre (GH-109911)

* gh-109098: Fuzz re module instead of internal sre
* Fix c-analyzer globals test failure
* Put globals exception in ignored.tsv
(cherry picked from commit a829356f86)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
2023-10-02 17:39:07 +02:00
Pablo Galindo Salgado f6cb2e4815
[3.12] gh-109596: Ensure repeated rules in the grammar are not allowed and fix incorrect soft keywords (GH-109606). (#109752)
(cherry picked from commit b28ffaa193)
2023-10-02 17:22:07 +02:00
Miss Islington (bot) ef99f5e968
[3.12] 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. (gh-110002) (#110005)
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. (gh-110002)
(cherry picked from commit c88037d137)

Co-authored-by: Ned Deily <nad@python.org>
2023-09-28 17:21:09 +02:00
Victor Stinner de0202e937
[3.12] gh-108740: Fix "make regen-all" race condition (#108741) (#109019)
gh-108740: Fix "make regen-all" race condition (#108741)

Fix a race condition in "make regen-all". The deepfreeze.c source and
files generated by Argument Clinic are now generated or updated
before generating "global objects". Previously, some identifiers may
miss depending on the order in which these files were generated.

* "make regen-global-objects": Make sure that deepfreeze.c is
  generated and up to date, and always run "make clinic".
* "make clinic" no longer runs generate_global_objects.py script.
* "make regen-deepfreeze" now only updates deepfreeze.c (C file).
  It doesn't build deepfreeze.o (object) anymore.
* Remove misleading messages in "make regen-global-objects" and
  "make clinic". They are now outdated, these commands are now
  safe to use.
* Document generates files in Doc/using/configure.rst.

Co-authored-by: Erlend E. Aasland <erlend@python.org>
(cherry picked from commit db1ee6a19a)
2023-09-08 15:19:20 +02:00
Miss Islington (bot) db55cfcbab
[3.12] gh-109002: Ensure only one wheel for each vendored package (GH-109003) (#109005)
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 f8a047941f)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-09-06 20:01:36 +02:00
Miss Islington (bot) bce77915b6
[3.12] Disable differing_test_runners health check (GH-108886) (#108887)
Disable `differing_test_runners` health check (GH-108886)
(cherry picked from commit 6ead5bd6ae)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-04 21:11:16 +02:00
Miss Islington (bot) 149d70c254
[3.12] gh-108179: Add error message for parser stack overflows (GH-108256) (#108263)
gh-108179: Add error message for parser stack overflows (GH-108256)
(cherry picked from commit 86617518c4)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2023-08-22 12:02:32 +02:00
Miss Islington (bot) 359cff5c41
[3.12] gh-107565: Update multissltests and GitHub CI workflows to use OpenSSL 1.1.1v, 3.0.10, and 3.1.2. (GH-108118)
Co-authored-by: Ned Deily <nad@python.org>
2023-08-18 20:30:34 +00:00