Repository: encode/uvicorn

Issue:
PackageInfo: Invalid constraint (click (>=7.*)) found in uvicorn-0.14.0 dependencies, skipping
### Checklist

<!-- Please make sure you check all these items before submitting your bug report. -->

- [X] The bug is reproducible against the latest release and/or `master`.
- [X] 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.


Discussion:
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 ❯      
```
@gygabyte017 I can't reproduce either, what's your poetry and python versions?

But it does look like a violation. :thinking: 
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?

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -45,7 +45,7 @@ def get_packages(package):
 
 minimal_requirements = [
     "asgiref>=3.4.0",
-    "click>=7.*",
+    "click>=7.0",
     "h11>=0.8",
     "typing-extensions;" + env_marker_below_38,
 ]


Test patch: