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

uv pip compile --universal outputs requirements with python_version < '0' marker #8676

Closed
notatallshaw-gts opened this issue Oct 29, 2024 · 3 comments · Fixed by #8759
Closed
Assignees
Labels
bug Something isn't working lock Related to universal resolution and locking

Comments

@notatallshaw-gts
Copy link

notatallshaw-gts commented Oct 29, 2024

uv 0.4.28

requirements.in:

apache-airflow[microsoft.azure]==2.3.4
scikit-learn==1.2.2
ipython>=8.4.0
mypy
black

constraints.txt:

apache-airflow-providers-microsoft-azure==4.2.0
attrs==22.1.0
azure-identity==1.10.0
click==8.1.3
colorama==0.4.5
markdown-it-py==2.1.0
msal-extensions==1.0.0
msrestazure==0.6.4
numpy==1.22.4
packaging==21.3
portalocker==2.5.1
typing_extensions==4.3.0

Command:

$ uv pip compile requirements.in -c constraints.txt  --annotation-style line --python 3.10 --universal | grep "'0'"
Resolved 190 packages in 740ms
apache-airflow-providers-ftp==3.11.1 ; python_version < '0'  # via apache-airflow
apache-airflow-providers-http==4.13.1 ; python_version < '0'  # via apache-airflow
apache-airflow-providers-imap==3.7.0 ; python_version < '0'  # via apache-airflow
apache-airflow-providers-sqlite==3.9.0 ; python_version < '0'  # via apache-airflow
azure-core==1.31.0 ; python_version < '0'  # via azure-identity
azure-cosmos==4.7.0 ; python_version < '0'  # via apache-airflow-providers-microsoft-azure
azure-keyvault-secrets==4.9.0 ; python_version < '0'  # via apache-airflow-providers-microsoft-azure
azure-mgmt-resource==23.2.0 ; python_version < '0'  # via apache-airflow-providers-microsoft-azure
azure-servicebus==7.12.3 ; python_version < '0'  # via apache-airflow-providers-microsoft-azure
black==24.10.0 ; python_version < '0'  # via -r requirements.in
cattrs==24.1.2 ; python_version < '0'  # via apache-airflow
connexion==3.1.0 ; python_version < '0'  # via apache-airflow
jsonschema==4.23.0 ; python_version < '0'  # via apache-airflow, flask-appbuilder
mypy==1.13.0 ; python_version < '0'  # via -r requirements.in
rich==13.9.3 ; python_version < '0'  # via apache-airflow
scipy==1.14.1 ; python_version < '0'  # via scikit-learn
@BurntSushi
Copy link
Member

I'll take a closer look at this tomorrow. Do you have an expected result? Or just stumbled across the strange output?

@BurntSushi BurntSushi self-assigned this Oct 29, 2024
@BurntSushi BurntSushi added the resolver Related to the package resolver label Oct 29, 2024
@notatallshaw-gts
Copy link
Author

notatallshaw-gts commented Oct 29, 2024

This is an MRE derived from a real requirements set. I think the output file still works, for every python_version < '0' marker there is a requirement above it (on a different version) without a marker, e.g.

rich==13.3.1              # via apache-airflow
rich==13.9.3 ; python_version < '0'  # via apache-airflow

I would expect the lines with the python_version < '0' to not be in the output, appears to be some internal resolver state?

@charliermarsh charliermarsh added the bug Something isn't working label Oct 29, 2024
BurntSushi added a commit that referenced this issue Nov 1, 2024
This is a regression test with undesirable output from #8676.
Specifically, it includes dependencies with marker expressions that
always evaluate to false (`python_version < '0'`).
@BurntSushi BurntSushi added lock Related to universal resolution and locking and removed resolver Related to the package resolver labels Nov 1, 2024
@BurntSushi
Copy link
Member

@notatallshaw-gts Thanks for the excellent repro! This should be fixed by #8759.

BurntSushi added a commit that referenced this issue Nov 1, 2024
This is a regression test with undesirable output from #8676.
Specifically, it includes dependencies with marker expressions that
always evaluate to false (`python_version < '0'`).
BurntSushi added a commit that referenced this issue Nov 1, 2024
This is a regression test with undesirable output from #8676.
Specifically, it includes dependencies with marker expressions that
always evaluate to false (`python_version < '0'`).
BurntSushi added a commit that referenced this issue Nov 1, 2024
This is a regression test with undesirable output from #8676.
Specifically, it includes dependencies with marker expressions that
always evaluate to false (`python_version < '0'`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lock Related to universal resolution and locking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants