Use packaging to parse versions (#8314)

packaging is the standard tool for dealing with versions and
requirements. This allows us to easily support all PEP 508 specs.
packaging also has good error messages, so I don't create our own here.
This lets us get rid of our handrolled half parser and sanity checks.
I kept the whitespace consistency check, since that's just a formatting
lint and isn't testing the correctness of parsing (which we now
definitely do correctly).
This commit is contained in:
Shantanu
2022-07-17 12:35:32 -07:00
committed by GitHub
parent 9df28aac13
commit 5ef20e8021
5 changed files with 17 additions and 49 deletions

View File

@@ -9,3 +9,5 @@ flake8-pyi==22.5.1
# must match .pre-commit-config.yaml
isort==5.10.1
tomli==1.2.2
packaging==21.3
termcolor