From e104eea34a80a8d5ae929c3b1aebc83febb3b06d Mon Sep 17 00:00:00 2001
From: Charlie Marsh
Date: Thu, 26 Jun 2025 22:45:45 -0400
Subject: [PATCH] Bump `--python-platform linux` to `manylinux_2_28` (#14300)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Right now, `--python-platform linux` to defaults to `manylinux_2_17`.
Defaulting to `manylinux_2_17` causes some problems for users, since it
means we can't use (e.g.) `manylinux_2_28` wheels, and end up having to
build from source.
cibuildwheel made `manylinux_2_28` their default in
https://github.com/pypa/cibuildwheel/pull/1988, and there's a lot of
discussion in https://github.com/pypa/cibuildwheel/issues/1772 and
https://github.com/pypa/cibuildwheel/issues/2047. In short, the
`manylinux_2014` image is EOL, and the vast majority of consumers now
run at least glibc 2.28 (https://mayeut.github.io/manylinux-timeline/):

Note that this only changes the _default_. Users can still compile
against `manylinux_2_17` by specifying it.
---
crates/uv-configuration/src/target_triple.rs | 8 ++++----
crates/uv/tests/it/pip_compile.rs | 2 +-
docs/reference/cli.md | 16 ++++++++--------
uv.schema.json | 4 ++--
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/crates/uv-configuration/src/target_triple.rs b/crates/uv-configuration/src/target_triple.rs
index b9ca3fafe..68030108c 100644
--- a/crates/uv-configuration/src/target_triple.rs
+++ b/crates/uv-configuration/src/target_triple.rs
@@ -33,7 +33,7 @@ pub enum TargetTriple {
#[serde(rename = "i686-pc-windows-msvc")]
I686PcWindowsMsvc,
- /// An x86 Linux target. Equivalent to `x86_64-manylinux_2_17`.
+ /// An x86 Linux target. Equivalent to `x86_64-manylinux_2_28`.
#[cfg_attr(feature = "clap", value(name = "x86_64-unknown-linux-gnu"))]
#[serde(rename = "x86_64-unknown-linux-gnu")]
#[serde(alias = "x8664-unknown-linux-gnu")]
@@ -56,7 +56,7 @@ pub enum TargetTriple {
#[serde(alias = "x8664-apple-darwin")]
X8664AppleDarwin,
- /// An ARM64 Linux target. Equivalent to `aarch64-manylinux_2_17`.
+ /// An ARM64 Linux target. Equivalent to `aarch64-manylinux_2_28`.
#[cfg_attr(feature = "clap", value(name = "aarch64-unknown-linux-gnu"))]
#[serde(rename = "aarch64-unknown-linux-gnu")]
Aarch64UnknownLinuxGnu,
@@ -240,7 +240,7 @@ impl TargetTriple {
Self::Linux | Self::X8664UnknownLinuxGnu => Platform::new(
Os::Manylinux {
major: 2,
- minor: 17,
+ minor: 28,
},
Arch::X86_64,
),
@@ -262,7 +262,7 @@ impl TargetTriple {
Self::Aarch64UnknownLinuxGnu => Platform::new(
Os::Manylinux {
major: 2,
- minor: 17,
+ minor: 28,
},
Arch::Aarch64,
),
diff --git a/crates/uv/tests/it/pip_compile.rs b/crates/uv/tests/it/pip_compile.rs
index c80027761..37c52fcdb 100644
--- a/crates/uv/tests/it/pip_compile.rs
+++ b/crates/uv/tests/it/pip_compile.rs
@@ -14731,7 +14731,7 @@ fn invalid_platform() -> Result<()> {
uv_snapshot!(context
.pip_compile()
.arg("--python-platform")
- .arg("linux")
+ .arg("x86_64-manylinux_2_17")
.arg("requirements.in"), @r"
success: false
exit_code: 1
diff --git a/docs/reference/cli.md b/docs/reference/cli.md
index 82fe0fa3d..0cfc7b5da 100644
--- a/docs/reference/cli.md
+++ b/docs/reference/cli.md
@@ -1678,10 +1678,10 @@ interpreter. Use --universal
to display the tree for all platforms,
macos
: An alias for aarch64-apple-darwin
, the default target for macOS
x86_64-pc-windows-msvc
: A 64-bit x86 Windows target
i686-pc-windows-msvc
: A 32-bit x86 Windows target
-x86_64-unknown-linux-gnu
: An x86 Linux target. Equivalent to x86_64-manylinux_2_17
+x86_64-unknown-linux-gnu
: An x86 Linux target. Equivalent to x86_64-manylinux_2_28
aarch64-apple-darwin
: An ARM-based macOS target, as seen on Apple Silicon devices
x86_64-apple-darwin
: An x86 macOS target
-aarch64-unknown-linux-gnu
: An ARM64 Linux target. Equivalent to aarch64-manylinux_2_17
+aarch64-unknown-linux-gnu
: An ARM64 Linux target. Equivalent to aarch64-manylinux_2_28
aarch64-unknown-linux-musl
: An ARM64 Linux target
x86_64-unknown-linux-musl
: An x86_64
Linux target
x86_64-manylinux2014
: An x86_64
target for the manylinux2014
platform. Equivalent to x86_64-manylinux_2_17
@@ -3363,10 +3363,10 @@ by --python-version
.
macos
: An alias for aarch64-apple-darwin
, the default target for macOS
x86_64-pc-windows-msvc
: A 64-bit x86 Windows target
i686-pc-windows-msvc
: A 32-bit x86 Windows target
-x86_64-unknown-linux-gnu
: An x86 Linux target. Equivalent to x86_64-manylinux_2_17
+x86_64-unknown-linux-gnu
: An x86 Linux target. Equivalent to x86_64-manylinux_2_28
aarch64-apple-darwin
: An ARM-based macOS target, as seen on Apple Silicon devices
x86_64-apple-darwin
: An x86 macOS target
-aarch64-unknown-linux-gnu
: An ARM64 Linux target. Equivalent to aarch64-manylinux_2_17
+aarch64-unknown-linux-gnu
: An ARM64 Linux target. Equivalent to aarch64-manylinux_2_28
aarch64-unknown-linux-musl
: An ARM64 Linux target
x86_64-unknown-linux-musl
: An x86_64
Linux target
x86_64-manylinux2014
: An x86_64
target for the manylinux2014
platform. Equivalent to x86_64-manylinux_2_17
@@ -3620,10 +3620,10 @@ be used with caution, as it can modify the system Python installation.
macos
: An alias for aarch64-apple-darwin
, the default target for macOS
x86_64-pc-windows-msvc
: A 64-bit x86 Windows target
i686-pc-windows-msvc
: A 32-bit x86 Windows target
-x86_64-unknown-linux-gnu
: An x86 Linux target. Equivalent to x86_64-manylinux_2_17
+x86_64-unknown-linux-gnu
: An x86 Linux target. Equivalent to x86_64-manylinux_2_28
aarch64-apple-darwin
: An ARM-based macOS target, as seen on Apple Silicon devices
x86_64-apple-darwin
: An x86 macOS target
-aarch64-unknown-linux-gnu
: An ARM64 Linux target. Equivalent to aarch64-manylinux_2_17
+aarch64-unknown-linux-gnu
: An ARM64 Linux target. Equivalent to aarch64-manylinux_2_28
aarch64-unknown-linux-musl
: An ARM64 Linux target
x86_64-unknown-linux-musl
: An x86_64
Linux target
x86_64-manylinux2014
: An x86_64
target for the manylinux2014
platform. Equivalent to x86_64-manylinux_2_17
@@ -3902,10 +3902,10 @@ should be used with caution, as it can modify the system Python installation.macos
: An alias for aarch64-apple-darwin
, the default target for macOS
x86_64-pc-windows-msvc
: A 64-bit x86 Windows target
i686-pc-windows-msvc
: A 32-bit x86 Windows target
-x86_64-unknown-linux-gnu
: An x86 Linux target. Equivalent to x86_64-manylinux_2_17
+x86_64-unknown-linux-gnu
: An x86 Linux target. Equivalent to x86_64-manylinux_2_28
aarch64-apple-darwin
: An ARM-based macOS target, as seen on Apple Silicon devices
x86_64-apple-darwin
: An x86 macOS target
-aarch64-unknown-linux-gnu
: An ARM64 Linux target. Equivalent to aarch64-manylinux_2_17
+aarch64-unknown-linux-gnu
: An ARM64 Linux target. Equivalent to aarch64-manylinux_2_28
aarch64-unknown-linux-musl
: An ARM64 Linux target
x86_64-unknown-linux-musl
: An x86_64
Linux target
x86_64-manylinux2014
: An x86_64
target for the manylinux2014
platform. Equivalent to x86_64-manylinux_2_17
diff --git a/uv.schema.json b/uv.schema.json
index 26d6ac7a3..807fa55fa 100644
--- a/uv.schema.json
+++ b/uv.schema.json
@@ -2062,7 +2062,7 @@
"const": "i686-pc-windows-msvc"
},
{
- "description": "An x86 Linux target. Equivalent to `x86_64-manylinux_2_17`.",
+ "description": "An x86 Linux target. Equivalent to `x86_64-manylinux_2_28`.",
"type": "string",
"const": "x86_64-unknown-linux-gnu"
},
@@ -2077,7 +2077,7 @@
"const": "x86_64-apple-darwin"
},
{
- "description": "An ARM64 Linux target. Equivalent to `aarch64-manylinux_2_17`.",
+ "description": "An ARM64 Linux target. Equivalent to `aarch64-manylinux_2_28`.",
"type": "string",
"const": "aarch64-unknown-linux-gnu"
},