Skip to content

implementation_name filter doesn't work in environment #23270

Open

Description

@Andrej730

Summary

Apparently implementation_name filter in tool.uv.environment is either doesn't work or it still allows filtered out wheels to be written to lockfile.

Steps to reproduce:

  1. uv init --python 3.11 . (3.11 is important since it has pypy wheels).
  2. uv add numpy
  3. git add . && git commit -m "update"
  4. In pyproject.toml add this to limit environments to 3 platforms and use cpython only.
[tool.uv]
environments = [
    # macOS on Apple Silicon (ARM)
    "implementation_name == 'cpython' and sys_platform == 'darwin' and platform_machine == 'arm64'",
    # Linux on x86_64 (Intel/AMD)
    "implementation_name == 'cpython' and sys_platform == 'linux' and platform_machine == 'x86_64'",
    # Windows on x86_64 (Intel/AMD)
    "implementation_name == 'cpython' and sys_platform == 'win32' and platform_machine == 'AMD64'",
]
  1. uv lock
  2. git diff -- uv.lock
  3. Expected: platform and implementation filters to work - intel macos and pypy wheels to get removed from lockfile.
  4. Result: only intel macos wheels are filtered, pypy wheels stay (e.g. numpy-2.4.6-pp311-pypy311_pp73-macosx_11_0_arm64.whl).

Platform

Ubuntu 26.04

Version

uv 0.13.8

Activity

  1. added
    bug
    on Nov 17, 2026
  2. ZYZ666-RGB commented on Nov 18, 2026

    @ZYZ666-RGB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions