Repository navigation
Filter locked wheels by Python implementation - #23285
Closed
ZYZ666-RGB wants to merge 2 commits into
Closed
ZYZ666-RGB wants to merge 2 commits into
ZYZ666-RGB wants to merge 2 commits into
Conversation
Environment markers already drop wheels whose platform tags cannot be installed. Language tags were ignored, so an environment limited to CPython still recorded PyPy wheels. A wheel stays in the lockfile only when some environment split can install that interpreter on that platform. `implementation_name` and `platform_python_implementation` are applied together with the existing platform tags.
httpx's brotli extra depends on brotlicffi only when platform_python_implementation is not CPython, and cffi is only pulled in by that edge. CPython wheels for those packages cannot be installed in the environments that need them, so the lock keeps brotlicffi's PyPy wheels and cffi's source distribution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tool.uv.environmentsmarkers such asimplementation_name == 'cpython'were applied while solving, but lockfile wheel selection only compared platform tags. PyPy wheels (for examplenumpy-…-pp311-pypy311_pp73-macosx_11_0_arm64.whl) stayed inuv.lockafteruv lock, while Intel macOS wheels were dropped.Language tags are now part of that same reachability check. A wheel remains in the lockfile only when at least one environment split can install that interpreter on that platform.
platform_python_implementationis included, since it names the same interpreter (CPython,PyPy, or GraalPy'sGraalVM). Genericpy*andnonewheels are unchanged, and the Windows ARM exception still keepswin_amd64wheels for a compatible interpreter.Fixes #23270
Test plan
cp/pptags, environment splits, and the Windows ARMwin_amd64exception.cpandppwheels:uv syncon CPython installs the CPython wheel.platform_python_implementation == 'CPython'drops PyPy wheels.