Skip to content

fork-strategy requires-python produces unexpected results with repeated dependencies #9998

@alex

Description

@alex

Hello!

I'm playing with using fork-strategy to replace our current tool.uv.environments, however it doesn't seem to be working due to some dependencies being repeated.

To reproduce:

$ echo -e "nox >=2024.04.15\nnox[uv] >=2024.03.02; python_version >= '3.8'" | uv pip compile --universal -p 3.7 -

If you look at the result, you'll see that there is a single version of argcomplete==3.1.2. However, what I'd expect to see is:

argcomplete==3.1.2 ; python_full_version < '3.8'
    # via nox
argcomplete==3.5.2 ; python_full_version >= '3.8'
    # via nox

When I do a more minimal test (echo 'nox' | uv pip compile --universal -p 3.7 -), I see the expected behavior.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions