Commit a31e507
authored
fix: Gracefully handle invalid python_requires when finding minversion (#37317)
python_requires must follow the specification defined in:
https://packaging.python.org/en/latest/specifications/version-specifiers/#id5
In the event that a package version specifies a `python_requires`
that does not match that spec, execution terminates with
an InvalidSpecifier exception.
This commit makes it so that we catch and log the exception,
ignoring the version that has the invalid python version specifier.
An alternative solution could have been to attempt to correct
the version specifier (e.g. '>= 3.5.*' is invalid, but it'd be
trivial to correct it to '>=3.5'). But that would potentially invite
a complexity that costs more than it's worth.1 parent 0b71075 commit a31e507
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
0 commit comments