Commit 0642390
authored
revert(bzlmod)!: allow bzlmod pip.parse to implicitly use default python version (#1341)
Reverts #1303
The main issue is that `pip.parse()` accepts a locked requirements file
-- this means
the requirements are specific to a particular Python version[1]. Because
the default Python
version can arbitrarily change, the lock file may not be valid for the
Python version
that is used at runtime. The net result is a module will use
dependencies for e.g. Python
3.8, but will use 3.9 at runtime. Additionally, the dependencies
resolved for 3.8 will
be created under names such as `@foo_39` (because that's the
python_version pip.parse sees),
which is just more confusing.
BREAKING CHANGE:
* pip.parse() must have `python_version` explicitly set. Set it to the
Python version
used to resolve the requirements file.
[1] Lock files aren't necessarily version specific, but we don't
currently support the
environment markers in lock files to make them cross-python-version
compatible.1 parent 23354a9 commit 0642390
2 files changed
+3
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 14 | | |
19 | 15 | | |
20 | 16 | | |
| |||
91 | 87 | | |
92 | 88 | | |
93 | 89 | | |
94 | | - | |
95 | | - | |
96 | 90 | | |
97 | 91 | | |
| 92 | + | |
98 | 93 | | |
99 | 94 | | |
100 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
| 351 | + | |
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
359 | | - | |
360 | | - | |
| 358 | + | |
361 | 359 | | |
362 | 360 | | |
363 | 361 | | |
| |||
0 commit comments