Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork943
Commit31e1c03
committed
Use static notation for
The `VirtualEnvironment` test helper is used in multiple places,but it is only told to install/upgrade `pip` when used from`test_installation`. It implements the functionality it wouldideally obtain by `upgrade_deps`, since the `upgrade_deps`parameter is only avaiilable in `venv` when using Python 3.9 andlater.When `pip` is installed, `upgrade_deps` would install `setuptools`when using Python 3.11 or lower, but not when using Python 3.12 orhigher. `VirtualEnvironment` does the same. (The reason for this isnot just to avoid needlessly departing from what `upgrade_deps`would do. Rather, it should not generally be necessary to have`setuptools` installed for package management since Python 3.12,and if it were necessary then this would a bug we would want todetect while running tests.)Previously this conditional specification of `setuptools` was doneby building different lists of package arguments to pass to `pip`,by checking `sys.version_info` to decide whether to append thestring `setuptools`.This commit changes how it is done, to use a static list of packagearguments instead. (The Python intepreter path continues to beobtained dynamically, but all its positional arguments, includingthose specifying packages, are now string literals.) Theconditional `setuptools` requirement is now expressed staticallyusing notation recognized by `pip`, as the string`setuptools; python_version<"3.12"`.setuptools
in installation test1 parente337e99 commit31e1c03
1 file changed
+9
-3
lines changedLines changed: 9 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
415 | 415 |
| |
416 | 416 |
| |
417 | 417 |
| |
418 |
| - | |
419 |
| - | |
420 |
| - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
421 | 427 |
| |
422 | 428 |
| |
423 | 429 |
| |
|
0 commit comments
Comments
(0)