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

PackageInfo: Invalid constraint (click (>=7.*)) found in uvicorn-0.14.0 dependencies, skipping #1098

Closed
2 tasks done
gygabyte017 opened this issue Jun 28, 2021 · 6 comments · Fixed by #1099
Closed
2 tasks done

Comments

@gygabyte017
Copy link

Checklist

  • The bug is reproducible against the latest release and/or master.
  • There are no similar issues or pull requests to fix it yet.

Describe the bug

When adding uvicorn package with poetry the following warning is raised:

PackageInfo: Invalid constraint (click (>=7.*)) found in uvicorn-0.14.0 dependencies, skipping

because the constraint >=7.* violates PEP440 syntax. It should either be >=7.0 or =7.*.

Because of this, the click dependency is not installed and uvicorn may not work.

To reproduce

Just execute poetry add uvicorn in any environment.

Expected behavior

To install uvicorn correctly together with all its dependencies.

Actual behavior

The click dependency is not installed and uvicorn may not work.

@euri10
Copy link
Member

euri10 commented Jun 28, 2021

cant reproduce, if you can come up with a reproducible example it would help

❯ asdf local python 3.9.5
❯ poetry --version
Poetry version 1.1.6
❯ poetry new toto
Created package toto in toto
❯ cd toto
❯ ls
pyproject.toml  README.rst  tests  toto
❯ asdf local python 3.9.5
❯ poetry add uvicorn
Creating virtualenv toto-gyCwdyZX-py3.9 in /home/lotso/.cache/pypoetry/virtualenvs
Using version ^0.14.0 for uvicorn

Updating dependencies
Resolving dependencies... (5.8s)

Writing lock file

Package operations: 12 installs, 0 updates, 0 removals

  • Installing pyparsing (2.4.7)
  • Installing asgiref (3.4.0)
  • Installing attrs (21.2.0)
  • Installing click (8.0.1)
  • Installing h11 (0.12.0)
  • Installing more-itertools (8.8.0)
  • Installing packaging (20.9)
  • Installing pluggy (0.13.1)
  • Installing py (1.10.0)
  • Installing wcwidth (0.2.5)
  • Installing pytest (5.4.3)
  • Installing uvicorn (0.14.0)
  ~/toto ❯      

@Kludex
Copy link
Member

Kludex commented Jun 28, 2021

@gygabyte017 I can't reproduce either, what's your poetry and python versions?

But it does look like a violation. 🤔

@gygabyte017
Copy link
Author

Sorry about that, my apologies, I'm using alpha release of poetry 1.2.0a1 on python 3.8, I thought it wouldn't matter since looking at PEP440 it looked like a violation to me as well, but I guess poetry 1.1.6 is not enforcing that rule yet and will enforce it starting from the next release.

Here's a reproducible example:

(.venv) C:\test>poetry --version
Poetry (version 1.2.0a1)

(.venv) C:\test>python --version
Python 3.8.8

(.venv) C:\test>poetry add uvicorn
Using version ^0.14.0 for uvicorn

Updating dependencies
Resolving dependencies...
PackageInfo: Invalid constraint (click (>=7.*)) found in uvicorn-0.14.0 dependencies, skipping

Writing lock file

Package operations: 3 installs, 0 updates, 0 removals

  • Installing asgiref (3.4.0)
  • Installing h11 (0.12.0)
  • Installing uvicorn (0.14.0)

I don't know if it makes sense to fix it now to match PEP440, or to wait until poetry 1.2 will be released. What do you think?

@Kludex
Copy link
Member

Kludex commented Jun 28, 2021

Sorry about that, my apologies, I'm using alpha release of poetry 1.2.0a1 on python 3.8, I thought it wouldn't matter since looking at PEP440 it looked like a violation to me as well, but I guess poetry 1.1.6 is not enforcing that rule yet and will enforce it starting from the next release.

We just wanted context :) Thanks! 🎉
#1099 should fix this.

@euri10
Copy link
Member

euri10 commented Jun 29, 2021

Thanks @gygabyte017 this should be fixed now !

@Kludex
Copy link
Member

Kludex commented Jun 29, 2021

(it will be available on the uvicorn 0.15)

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

Successfully merging a pull request may close this issue.

3 participants