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 ignores python_version marker when conjoined with platform markers #6169

Closed
edgarrmondragon opened this issue Aug 17, 2024 · 7 comments · Fixed by #6171
Closed

uv ignores python_version marker when conjoined with platform markers #6169

edgarrmondragon opened this issue Aug 17, 2024 · 7 comments · Fixed by #6171
Assignees
Labels
bug Something isn't working

Comments

@edgarrmondragon
Copy link
Contributor

edgarrmondragon commented Aug 17, 2024

For example, SQLAlchemy 2.0.32 has a dependency on greenlet, marked for certain platforms and only for Python < 3.131:

greenlet != 0.4.17;(python_version<"3.13" and (platform_machine=='aarch64' or (platform_machine=='ppc64le' or (platform_machine=='x86_64' or (platform_machine=='amd64' or (platform_machine=='AMD64' or (platform_machine=='win32' or platform_machine=='WIN32')))))))

Now, something changed in uv 0.2.37 that the python_version marker is ignored. For example:

# requirements.txt
sqlalchemy==2.0.32

With uv 0.2.36

$ UV_NO_CACHE=1 [email protected] pip compile --python python3.13 --python-platform x86_64-manylinux_2_31 requirements.txt
Resolved 2 packages in 1.16s
# This file was autogenerated by uv via the following command:
#    uv pip compile --python python3.13 --python-platform x86_64-manylinux_2_31 requirements.txt
sqlalchemy==2.0.32
    # via -r requirements.txt
typing-extensions==4.12.2
    # via sqlalchemy

but with uv 0.2.37

$ UV_NO_CACHE=1 [email protected] pip compile --python python3.13 --python-platform x86_64-manylinux_2_31 requirements.txt
Resolved 3 packages in 1.16s
# This file was autogenerated by uv via the following command:
#    uv pip compile --python python3.13 --python-platform x86_64-manylinux_2_31 requirements.txt
greenlet==3.0.3
    # via sqlalchemy
sqlalchemy==2.0.32
    # via -r requirements.txt
typing-extensions==4.12.2
    # via sqlalchemy

When the platform is not one of those in the markers, the dependency is correctly excluded:

$ UV_NO_CACHE=1 [email protected] pip compile --python python3.13 --python-platform aarch64-apple-darwin requirements.txt
Resolved 2 packages in 1.17s
# This file was autogenerated by uv via the following command:
#    uv pip compile --python python3.13 --python-platform aarch64-apple-darwin requirements.txt
sqlalchemy==2.0.32
    # via -r requirements.txt
typing-extensions==4.12.2
    # via sqlalchemy

Maybe related:

Footnotes

  1. https://github.com/sqlalchemy/sqlalchemy/blob/62c242b78dee306738a2cd22f548679e9818a1ac/setup.cfg#L41

@charliermarsh
Copy link
Member

Interesting, thanks.

@charliermarsh charliermarsh added the bug Something isn't working label Aug 17, 2024
@charliermarsh
Copy link
Member

I’ll try to take a look at this today.

@charliermarsh
Copy link
Member

I have at least one idea of what’s going on here.

@charliermarsh charliermarsh self-assigned this Aug 17, 2024
@charliermarsh
Copy link
Member

Ah ok I see the issue.

@charliermarsh
Copy link
Member

(It's unique to 3.13, since only pre-releases are available, and it relates to a mishandling of pre-releases there. Will fix.)

@edgarrmondragon
Copy link
Contributor Author

Thanks @charliermarsh!

@charliermarsh
Copy link
Member

Thanks for reporting!

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

Successfully merging a pull request may close this issue.

2 participants