Skip to content

Universal resolution can generate un-installable requirements with environments #6836

@alex

Description

@alex
(tempenv-564a2572618) ~/.v/tempenv-564a2572618 ❯❯❯ uv version
uv 0.4.0 (Homebrew 2024-08-28)
(tempenv-564a2572618) ~/.v/tempenv-564a2572618 ❯❯❯ cat uv.toml
environments = ["python_version >= '3.10'", "python_version >= '3.8' and python_version < '3.10'", "python_version < '3.8'"]

(tempenv-564a2572618) ~/.v/tempenv-564a2572618 ❯❯❯ echo 'build' | uv pip compile - --universal -p 3.7
warning: The requested Python version 3.7 is not available; 3.12.5 will be used to build dependencies instead.
Resolved 12 packages in 5ms
# This file was autogenerated by uv via the following command:
#    uv pip compile - --universal -p 3.7
build==1.1.1 ; python_full_version < '3.8'
build==1.2.1 ; python_full_version >= '3.8'
colorama==0.4.6 ; os_name == 'nt'
    # via build
importlib-metadata==6.7.0 ; python_full_version < '3.8'
    # via build
importlib-metadata==8.4.0 ; python_full_version < '3.10.2'
    # via build
packaging==24.0 ; python_full_version < '3.8'
    # via build
packaging==24.1 ; python_full_version >= '3.8'
    # via build
pyproject-hooks==1.1.0
    # via build
tomli==2.0.1 ; python_full_version < '3.11'
    # via build
typing-extensions==4.7.1 ; python_full_version < '3.8'
    # via importlib-metadata
zipp==3.15.0 ; python_full_version < '3.8'
    # via importlib-metadata
zipp==3.20.1 ; python_full_version < '3.10.2'
    # via importlib-metadata

The resolutions for importlib-metadata are not usable on Python 3.7, because both of the following match the markers:

importlib-metadata==6.7.0 ; python_full_version < '3.8'
    # via build
importlib-metadata==8.4.0 ; python_full_version < '3.10.2'
    # via build

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions