Commit 418962d
committed
Fix
By default, the check if an empty specifier contains a prerelease
version returns `false`. This made the `is_valid_version()` check for
prerelease versions fail, when there is also a requirement with a
non-empty specifier. In this case, the previous logic detected a
conflict of the prerelease version and the empty specifier.
Fix this by explicitly allowing prerelease versions when checking if a
specifier contains a version.
Note that the function that collects candidates for a dependency still
ignores prerelease versions if any release versions are available, as
required by the specs [1].
[1]: https://packaging.python.org/en/latest/specifications/version-specifiers/#handling-of-pre-releases
Signed-off-by: Martin Nonnenmacher <[email protected]>is_valid_version() for prerelease versions1 parent 3e8dfbe commit 418962d
2 files changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
199 | 207 | | |
200 | 208 | | |
201 | 209 | | |
| |||
0 commit comments