From b7065a4f0570585f9d90c46e5296d13304a70eb3 Mon Sep 17 00:00:00 2001 From: Chris Burroughs Date: Thu, 12 Sep 2024 09:22:44 -0400 Subject: [PATCH] bump default version of pip to support Python 3.13 The first version of pip to support Python 3.13 was 24.1, but I don't think there is any merit to holding back when 24.2 is already out. (Pants itself uses `latest`.) The first version of Pex to support 24.2 is v2.13.0. (Pip 24.1 and 24.2 also both contain meaningful performance improvements to dependency resolution --> #21223) Release notes for where pex added support: https://github.com/pex-tool/pex/releases/tag/v2.13.0 ref #20852 --- docs/notes/2.24.x.md | 2 ++ src/python/pants/backend/python/subsystems/setup.py | 2 +- src/python/pants/backend/python/util_rules/pex_cli.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/notes/2.24.x.md b/docs/notes/2.24.x.md index 36621f66191..e907380adf4 100644 --- a/docs/notes/2.24.x.md +++ b/docs/notes/2.24.x.md @@ -30,6 +30,8 @@ The default lockfiles bundled with Pants for various tools (ex: to run `black`) As a consequence of the lockfile generation, newer versions of many tools are now included in the default lockfiles. +The default version of pip is now [24.2](https://pip.pypa.io/en/stable/news/#v24-2) bringing performance improvements to dependency resolution and support or the upcoming Python 3.13 release. + #### Shell diff --git a/src/python/pants/backend/python/subsystems/setup.py b/src/python/pants/backend/python/subsystems/setup.py index b8063e7ff85..e217ea3b59b 100644 --- a/src/python/pants/backend/python/subsystems/setup.py +++ b/src/python/pants/backend/python/subsystems/setup.py @@ -253,7 +253,7 @@ def interpreter_constraints(self) -> tuple[str, ...]: ), ) pip_version = StrOption( - default="24.0", + default="24.2", help=softwrap( f""" Use this version of Pip for resolving requirements and generating lockfiles. diff --git a/src/python/pants/backend/python/util_rules/pex_cli.py b/src/python/pants/backend/python/util_rules/pex_cli.py index 5e894e8d53d..ec9b19ae238 100644 --- a/src/python/pants/backend/python/util_rules/pex_cli.py +++ b/src/python/pants/backend/python/util_rules/pex_cli.py @@ -42,7 +42,7 @@ class PexCli(TemplatedExternalTool): default_version = "v2.16.2" default_url_template = "https://github.com/pex-tool/pex/releases/download/{version}/pex" - version_constraints = ">=2.3.0,<3.0" + version_constraints = ">=2.13.0,<3.0" # extra args to be passed to the pex tool; note that they # are going to apply to all invocations of the pex tool.