Skip to content

Comments

Add an ArchMode to filter displayed architectures in uv python list#13701

Closed
zanieb wants to merge 1 commit intomainfrom
zb/arch-mode
Closed

Add an ArchMode to filter displayed architectures in uv python list#13701
zanieb wants to merge 1 commit intomainfrom
zb/arch-mode

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented May 28, 2025

I'm trying to unblock

which currently fail due to showing more downloads in uv python list and selecting non-native installs during uv python install. I don't really want to show non-native downloads without opt-in (it'll just be too noisy), and we should prefer native installs, so this pull request adds a change to apply some filtering. This should have no effect on the existing behavior, but will resolve the failing CI in those pull requests.

Note, the modes do not yet capture the semantics we'll need for arm64 Windows, but I'll try to figure that out afterwards.

This is a little forward-looking, in that it adds support for filtering based on architecture variants as needed for

That pull request is currently blocked on allowing the user to express they only want to use x86-64-v1 even if they have a v3 compatible machine. I expect the spelling of the options for "best" and "compatible" native architectures to change a little.

I don't make this user-facing here, but we probably will in a subsequent change.

@zanieb zanieb added the internal A refactor or improvement that is not user-facing label May 28, 2025
@zanieb zanieb force-pushed the zb/arch-mode branch 2 times, most recently from 6c775c9 to 710c515 Compare May 28, 2025 14:53
@zanieb zanieb requested a review from Gankra May 28, 2025 14:53
@zanieb zanieb force-pushed the zb/arch-mode branch 4 times, most recently from 05782d0 to b27ef41 Compare May 28, 2025 15:42
@zanieb zanieb marked this pull request as draft May 28, 2025 16:26
@zanieb
Copy link
Member Author

zanieb commented May 28, 2025

Eek, this is actually quite hard.

@zanieb zanieb force-pushed the zb/arch-mode branch 2 times, most recently from cb2dc54 to 149a812 Compare May 28, 2025 18:46
@zanieb
Copy link
Member Author

zanieb commented May 28, 2025

The ordering actually needs to change, per #13474 (comment), see #13709

@zanieb
Copy link
Member Author

zanieb commented May 29, 2025

Need to make sure this reconciles with #13719

@Gankra
Copy link
Contributor

Gankra commented May 29, 2025

Hmm in my heart we want to be internally producing a 2d list of pythons:

  • cpython-3.13.3
    • windows x64
    • windows arm64
  • cpython-3.13.2
    • windows x64
    • windows arm64

And then unless the user asks we only show the top entry in each one. I'm not sure if that would be too disruptive architecturally.

@Gankra
Copy link
Contributor

Gankra commented May 29, 2025

Another subtlety: if the user does have a copy of python installed that is compatible but for whatever reason not preferred, we should probably still show it in uv python list, even though we'd otherwise not want to?

@zanieb
Copy link
Member Author

zanieb commented May 29, 2025

if the user does have a copy of python installed that is compatible but for whatever reason not preferred, we should probably still show it in uv python list, even though we'd otherwise not want to?

We will! This is just for listing available downloads and selection of downloads for installation.

@zanieb
Copy link
Member Author

zanieb commented May 29, 2025

And then unless the user asks we only show the top entry in each one. I'm not sure if that would be too disruptive architecturally.

I think the arm Windows case is a bit of a separate concern. It's also plausible people will build wheels for older CPython versions on arm once it's commonplace, so it's not clear if we'll need that matrix yet.

@Gankra
Copy link
Contributor

Gankra commented May 29, 2025

Right I've been confused why the tests were failing in those other PRs given we already do a ton of special filtering, and I think I just realized you might just be working around a bug in the filtering at the end of list?

@Gankra
Copy link
Contributor

Gankra commented May 29, 2025

Put up an alternative here: #13721

Gankra added a commit that referenced this pull request May 29, 2025
@zanieb
Copy link
Member Author

zanieb commented May 29, 2025

The alternative was convincing for now.

@zanieb zanieb closed this May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants