Commit 73c9555
authored
Allow whitespace in
A bug was discovered recently when attempting to parse a `pip` lockfile.
That is, a `requirements*.txt` file containing exact versions
(i.e., `==`) in all of it's requirement specifiers. Such a file should
parse as a lockfile and not fall back to lockfile generation. However,
if whitespace is included around the `==`, the parsing fails.
Whitespace is allowed in requirement specifiers. This change accounts
for that. It also updates the test fixture to prevent regressions.
Ref: https://pip.pypa.io/en/stable/reference/requirement-specifiers/pip requirement specifiers (#1530)1 parent dacd07d commit 73c9555
File tree
3 files changed
+7
-2
lines changed- lockfile/src/parsers
- tests/fixtures
3 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
0 commit comments