Skip to content

Prefer native Python on Windows ARM64 - #2207

Closed
zaniebot wants to merge 2 commits into
mainfrom
zb/windows-arm64-python-default-20260930
Closed

zaniebot wants to merge 2 commits into
mainfrom
zb/windows-arm64-python-default-20260930

Conversation

@zaniebot

Copy link
Copy Markdown
Collaborator

On Windows ARM64, native uv prefers emulated x86_64 Python because native wheel support was historically limited. Prefer aarch64 Python across Python versions, following CPython's change to the Windows ARM64 default. Keep x86_64 ahead of 32-bit x86 as a fallback when no native distribution is available, and continue honoring explicit architecture requests such as cpython-3.14-windows-x86_64.

@zaniebot zaniebot added the breaking A breaking change label Sep 30, 2026
@astral-automations-bot astral-automations-bot Bot added area:windows Specific to the Windows platform enhancement New feature or request labels Sep 30, 2026
@codspeed

codspeed Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 54 untouched benchmarks
⏩ 35 skipped benchmarks1


Comparing zb/windows-arm64-python-default-20260930 (5179990) with main (b240653)

Open in CodSpeed

Footnotes

  1. 35 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

zanieb added a commit to astral-sh/uv that referenced this pull request Oct 1, 2026
Native ARM64 builds of uv currently prefer emulated x86-64 Python on
Windows. Prefer native `aarch64` Python across Python versions, with
`x86_64` ahead of 32-bit `x86` when no native distribution is available.
Explicit architecture requests continue to select emulated Python.

Ports astral-sh#2207 and adds the 0.13 breaking-change entry.

Land #22098 and #22099 on `main` first, then
bring them into the 0.13 release before landing this change. They
provide the persistent `UV_PYTHON_ARCH=x86_64` opt-out and retain
compatible x86-64 wheels for Windows ARM environment markers.
charliermarsh pushed a commit to astral-sh/uv that referenced this pull request Oct 1, 2026
Native ARM64 builds of uv currently prefer emulated x86-64 Python on
Windows. Prefer native `aarch64` Python across Python versions, with
`x86_64` ahead of 32-bit `x86` when no native distribution is available.
Explicit architecture requests continue to select emulated Python.

Ports astral-sh#2207 and adds the 0.13 breaking-change entry.

Land #22098 and #22099 on `main` first, then
bring them into the 0.13 release before landing this change. They
provide the persistent `UV_PYTHON_ARCH=x86_64` opt-out and retain
compatible x86-64 wheels for Windows ARM environment markers.
@astral-automations-bot
astral-automations-bot Bot force-pushed the zb/windows-arm64-python-default-20260930 branch from 7e9a17b to 728c1b3 Compare October 7, 2026 18:27
zanieb added a commit to astral-sh/uv that referenced this pull request Oct 7, 2026
Native ARM64 builds of uv currently prefer emulated x86-64 Python on
Windows. Prefer native `aarch64` Python across Python versions, with
`x86_64` ahead of 32-bit `x86` when no native distribution is available.
Explicit architecture requests continue to select emulated Python.

Ports astral-sh#2207 and adds the 0.13 breaking-change entry.

Land #22098 and #22099 on `main` first, then
bring them into the 0.13 release before landing this change. They
provide the persistent `UV_PYTHON_ARCH=x86_64` opt-out and retain
compatible x86-64 wheels for Windows ARM environment markers.
@astral-automations-bot
astral-automations-bot Bot force-pushed the zb/windows-arm64-python-default-20260930 branch from 728c1b3 to aaebf9e Compare October 8, 2026 01:57
let x86_64_arch = Arch::from_str("x86_64").expect("valid architecture");
let mut request = PythonDownloadRequest::from_str("cpython-windows")
.expect("valid download request")
.with_libc(Libc::None);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Avoid calling the private libc builder from this test

On aarch64 targets, this test cannot compile: PythonDownloadRequest::with_libc is private in uv-python-types/src/download_request.rs:208, so calling it from uv-python-managed violates Rust visibility rules. The architecture gate hides this from x86_64 checks. Set the public request.libc field to Some(Libc::None) alongside request.arch instead.

@zaniebot
zaniebot deployed to automations October 8, 2026 23:38 — with GitHub Actions Active
zanieb added a commit to astral-sh/uv that referenced this pull request Oct 9, 2026
Native ARM64 builds of uv currently prefer emulated x86-64 Python on
Windows. Prefer native `aarch64` Python across Python versions, with
`x86_64` ahead of 32-bit `x86` when no native distribution is available.
Explicit architecture requests continue to select emulated Python.

Ports astral-sh#2207 and adds the 0.13 breaking-change entry.

Land #22098 and #22099 on `main` first, then
bring them into the 0.13 release before landing this change. They
provide the persistent `UV_PYTHON_ARCH=x86_64` opt-out and retain
compatible x86-64 wheels for Windows ARM environment markers.
@astral-automations-bot
astral-automations-bot Bot force-pushed the zb/windows-arm64-python-default-20260930 branch from 5179990 to 2c802ca Compare October 9, 2026 18:08
astral-automations-bot Bot pushed a commit that referenced this pull request Oct 10, 2026
Native ARM64 builds of uv currently prefer emulated x86-64 Python on
Windows. Prefer native `aarch64` Python across Python versions, with
`x86_64` ahead of 32-bit `x86` when no native distribution is available.
Explicit architecture requests continue to select emulated Python.

Ports #2207 and adds the 0.13 breaking-change entry.

Land astral-sh#22098 and astral-sh#22099 on `main` first, then
bring them into the 0.13 release before landing this change. They
provide the persistent `UV_PYTHON_ARCH=x86_64` opt-out and retain
compatible x86-64 wheels for Windows ARM environment markers.

zsol commented Oct 13, 2026

Copy link
Copy Markdown
Member

Closing as superseded by astral-sh#22100, which has been merged.

@zsol zsol closed this Oct 13, 2026

This branch was successfully deployed

1 active deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:windows Specific to the Windows platform breaking A breaking change enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

⌂ 换网址