Commit 393cbc6
committed
Accept all PEP 508 operators in python_version markers #5309
The list of operators accepted by get_python_version_os() contained '<'
twice and was missing '>', so a dependency marker such as
"python_version > '3.8'" never matched and was silently dropped from the
DependentPackage extra_data, while ">=" was reported correctly. The '!='
and '~=' operators were missing for the same reason.
Replace the duplicated '<' with the full set of comparison operators
allowed for a marker in PEP 508, and add a regression test covering each
of them.
Signed-off-by: Daksha1611 <mehtadaksha1611@gmail.com>1 parent 5ebebf2 commit 393cbc6
3 files changed
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2278 | 2278 | | |
2279 | 2279 | | |
2280 | 2280 | | |
2281 | | - | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
2282 | 2285 | | |
2283 | 2286 | | |
2284 | 2287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
0 commit comments