-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid heavy index imports for pip uninstall & list
pip uninstall and list currently depend on req_install.py which always imports the expensive network and index machinery. However, it's only in rare situations that these commands actually hit the network: - `pip list --outdated` - `pip list --uptodate` - `pip uninstall --requirement <url>` This commit builds on the previous two refactoring commits and modifies these commands to avoid the expensive imports unless truly necessary.
- Loading branch information
Showing
5 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
pip uninstall and list currently depend on req_install.py which always imports | ||
the expensive network and index machinery. However, it's only in rare situations | ||
that these commands actually hit the network: | ||
|
||
- ``pip list --outdated`` | ||
- ``pip list --uptodate`` | ||
- ``pip uninstall --requirement <url>`` | ||
|
||
This patch refactors req_install.py so these commands can avoid the expensive | ||
imports unless truly necessary. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters