Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct dependency is incorrectly treated as indirect dependency #7863

Open
konstin opened this issue Oct 2, 2024 · 2 comments
Open

Direct dependency is incorrectly treated as indirect dependency #7863

konstin opened this issue Oct 2, 2024 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@konstin
Copy link
Member

konstin commented Oct 2, 2024

We incorrectly treat numpy as a transitive instead of a direct dependency, which means we don't emit the correct diagnostic about a missing lower bound:

[project]
name = "dummy"
version = "0.1.0"
description = "Add your description here"
requires-python = ">=3.9"
dependencies = [
  "numpy",
]

Relevant log line:

DEBUG Adding transitive dependency for dummy==0.1.0: numpy*

We need to change this check to consider workspace packages:

if let Some(for_package) = for_package {

@konstin konstin added bug Something isn't working good first issue Good for newcomers labels Oct 2, 2024
@mstepan
Copy link

mstepan commented Oct 3, 2024

I was trying to reproduce this issue using posted pyproject.toml file but seems it's working as expected:

uv/target/debug/uv pip compile example/pyproject.toml -o example/requirements.txt
...

DEBUG Adding direct dependency: numpy*
INFO add_decision: example @ 0a0.dev0 

@charliermarsh
Copy link
Member

Try using uv lock instead of uv pip compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants