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 lock requires python dev versions #4094

Closed
blueraft opened this issue Jun 6, 2024 · 7 comments
Closed

uv lock requires python dev versions #4094

blueraft opened this issue Jun 6, 2024 · 7 comments

Comments

@blueraft
Copy link
Contributor

blueraft commented Jun 6, 2024

I encountered an issue with the elasticsearch 7.17.1 while trying to use python>=3.9. The relevant requirement for elasticsearch is:

Requires: Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4.

When attempting to lock dependencies, the following error is displayed:

  ╰─▶ Because the requested Python version (>=3.9) does not satisfy any of:
          Python>=2.7,<3.0.dev0
          Python>=3.4.dev0,<4
      and elasticsearch==7.17.1 depends on one of:
          Python>=2.7,<3.0.dev0
          Python>=3.4.dev0,<4
      we can conclude that elasticsearch==7.17.1 cannot be used.

Relatedly, this also results in the following error message, but uv lock doesn't accept prerelease as an argument.

      hint: Python was requested with a pre-release marker (e.g., any of:
          Python>=2.7,<3.0.dev0
          Python>=3.4.dev0,<4
      ), but pre-releases weren't enabled (try: `--prerelease=allow`)
@charliermarsh
Copy link
Member

You need to do Requires-Python = ">=3.9,<4" to satisfy that constraint.

@charliermarsh
Copy link
Member

We changed this in #4086. But as-is, there are Python versions that you claim to support (>4) that your dependencies do not.

@charliermarsh
Copy link
Member

As of #4086, we're going to treat Requires-Python as a lower bound, which will resolve this for you.

@blueraft
Copy link
Contributor Author

blueraft commented Jun 6, 2024

Cool thanks! I'll just close this then.

@charliermarsh
Copy link
Member

The hint is wrong though :) I created #4096.

@blueraft
Copy link
Contributor Author

blueraft commented Jun 6, 2024

I can create a new issue if this is a bug.

Is there a reason why uv lock traverses down to urllib3==1.2.1 when I have 'urllib3>=1.22.0 listed in my dependencies?

dependencies = [
  'urllib3>=1.22.0',
  'elasticsearch==7.17.1',
  'dockerspawner==13.0.0',
]

urllib3==1.2.1 fails to build on my machine but there are many versions of urrlib3 that'd build fine and would satisfy the requirements.

@charliermarsh
Copy link
Member

Feel free to create a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants