Commit Graph

62 Commits

Author SHA1 Message Date
Pradyun Gedam 25ab172b55
Update linter: isort 2020-09-23 19:52:28 +05:30
Nguyễn Gia Phong cca500f053 Remove unused definitions 2020-09-04 17:37:43 +07:00
Oliver Mannion 95dfd8b5a7 Ignore require-virtualenv in `pip list` 2020-07-20 16:45:52 +10:00
Christopher Hunt 4ba51d2e9c
Merge pull request #8501 from uranusjr/refactor-create-link-collector
Tidy up link collector constructor imports
2020-07-05 21:44:31 -04:00
Nguyễn Gia Phong dd3a3b5eb7 Parallelize network operations in pip list 2020-06-29 15:48:41 +07:00
Tzu-ping Chung ec7324fba0 Tidy up link collector constructor imports
make_link_collector() was in self_outdated_check, a module responsible
for checking whether the currently-running pip is outdated, but is
imported by things that has nothing to do with this outdated check. Move
the function to be a class method in LinkCollector so the module
hierarchy makes more sense.
2020-06-26 17:31:28 +08:00
gutsytechster b82516c9ca fix(_internal/commands): Define a default add_option to child commands 2020-05-23 14:55:37 +05:30
gutsytechster 72a42197a4 refactor(commands): Add method add_options and remove __init__
This removes the __init__ method of child classes and defines
explicit method for adding command options.
2020-05-23 14:50:57 +05:30
Pradyun Gedam 301f65fad8
Merge pull request #8016 from deveshks/add-mypy-annotations-commands 2020-05-17 23:14:46 +05:30
Pradyun Gedam d18ebcfe41
Drop parallelization in `pip list` 2020-05-07 21:54:56 +05:30
Devesh Kumar Singh 2b6113797d Remove Any type from run function 2020-04-20 03:29:47 +05:30
Devesh Kumar Singh 52f30a1c46 Add type for latest_info and fix type for iter_packages_latest_infos 2020-04-20 03:28:49 +05:30
Devesh Kumar Singh 02b3c68c76 Merge branch 'master' into add-mypy-annotations-commands 2020-04-14 16:35:49 +05:30
Devesh Kumar Singh 0470a82248 Type annotations for help, list and uninstall in commands 2020-04-14 16:07:13 +05:30
Nikolay Korolev 3acf8b7e4b
Merge branch 'master' into patch-1 2020-04-09 15:48:56 +03:00
Nguyễn Gia Phong 26b76f6f11 Move tabulate to utils.misc and test it 2020-04-07 17:35:47 +07:00
Nguyễn Gia Phong c2aa573107 Fix tabulate col size in case of empty cell
Previously, the size is no less than len(str(None)) == 4.
This commit also add type hint and docstring to the function.
2020-04-06 17:56:49 +07:00
Nikolay Korolev 5cccd4ef6b Change ThreadPool to Pool 2020-04-03 09:07:09 +03:00
Nikolay Korolev 9b9e137d1d Update comment 2020-04-02 22:01:22 +03:00
Nikolay Korolev 6b8c191ee2 Update comment 2020-04-02 21:57:10 +03:00
Nikolay Korolev f695354bf8 Add commentary 2020-04-02 21:55:34 +03:00
Nikolay Korolev 03bfdbcc58 Refactoring. Rename inner function 2020-04-02 17:15:47 +03:00
Nikolay Korolev ccb0b5cc08 Lazier calculations 2020-04-02 16:38:54 +03:00
Nikolay Korolev 1d4fc03fe2 Change Pool to ThreadPool and fix minor closing 2020-04-02 16:20:09 +03:00
Nikolay Korolev 829a3b20c4 Fix Python 2 compatibility 2020-04-02 15:58:28 +03:00
Nikolay Korolev 957c093a10 Speed up pip list --outdated 2020-04-02 15:58:27 +03:00
Pradyun Gedam 2db6f428bf
Update imports to {index -> index.package_finder} 2019-10-19 22:24:01 +05:30
John Paton 6b57c1f5df Move outdated outside utils and rename (pypa/pip#6532) 2019-09-30 09:56:44 +02:00
Maxim Kurnikov 3692097cca add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
Chris Jerdonek 6d94944efd Change PackageFinder.create() to accept a LinkCollector. 2019-09-18 00:59:04 -07:00
Chris Jerdonek 6a55f0788b Move make_search_scope() to outdated.py. 2019-09-18 00:48:48 -07:00
A_Rog 70027b2f50 Address #6876: Make command output go through a single function (#6881) 2019-08-22 17:29:22 -07:00
Chris Jerdonek 1ab37d31f1
Merge pull request #6903 from cjerdonek/move-trusted-hosts
Move PackageFinder's --trusted-host logic to PipSession
2019-08-22 03:56:13 -07:00
Chris Jerdonek a6cdb490b0 Move trusted_hosts logic to PipSession. 2019-08-21 03:03:17 -07:00
Chris Jerdonek e8eda16ed8 Rename some PackageFinder "best candidate" classes and methods:
* Rename FoundCandidates to BestCandidateResult.

* Rename CandidateEvaluator's make_found_candidates() to
  compute_best_candidate().

* Rename CandidateEvaluator's get_best_candidate() to
  sort_best_candidate().

* Rename PackageFinder's find_candidates() to find_best_candidate().
2019-08-20 22:49:30 -07:00
Chris Jerdonek e74fd24c71 Eliminate base_command.py's import dependency on PipSession. 2019-08-07 14:12:42 -07:00
Chris Jerdonek 1f09e67f34 Only import a Command class when it is actually needed.
This resulted in an approximate 24% speed-up of a vanilla `pip`
invocation on one system (0.477 secs before, 0.363 secs after).
2019-07-26 23:30:26 -04:00
Pradyun Gedam 537b0fca12
Change isort multi_line_output to 3 2019-07-22 10:15:27 +05:30
Pradyun Gedam f669719c96
Rename InstallationCandidate.{location -> link} 2019-07-20 12:41:22 +05:30
Chris Jerdonek 0d96a49cf7 Add project_name to CandidateEvaluator. 2019-07-14 10:56:00 -07:00
Chris Jerdonek b2389bf8c7 Add CandidatePreferences and PackageFinder.make_candidate_evaluator(). 2019-07-07 14:35:50 -07:00
Chris Jerdonek ae79b5bf5c Add a SelectionPreferences class. 2019-06-28 11:14:55 -07:00
Chris Jerdonek 8af3f21a57 Filter out yanked links earlier when allow_yanked=False. 2019-06-27 19:50:25 -07:00
Chris Jerdonek a447be4785 Update PackageFinder to support "yanked" files (PEP 592). 2019-06-26 02:32:40 -07:00
Chris Jerdonek cab7316e2b Change PackageFinder.create() to accept a SearchScope object. 2019-06-21 14:41:49 -07:00
Laszlo Kiss-Kollar 246130c48f Consolidate `--path` parsing into `cmdoptions.py`
This option is used both in the `freeze` and `list` commands. The code
to parse the option and validate that it's not used with incompatible
arguments should be done in one place.
2019-06-13 09:37:16 +01:00
Laszlo Kiss-Kollar a240a98701 Add `--path` option to `pip list`
This makes `pip list` consistent with `pip freeze` which also supports
listing packages in arbitrary file paths.
2019-06-12 16:10:06 +02:00
Chris Jerdonek cad71a7117 Add PackageFinder.create(), and simplify PackageFinder(). 2019-05-17 11:55:21 -07:00
Chris Jerdonek dddd28b8de
Add CandidateEvaluator class to encapsulate sorting. (#6424) 2019-04-22 03:40:35 -07:00
Xavier Fernandez 477147091e
Merge pull request #6116 from peterlisak/bug-fix-outdated-not-required
pip list --not-required --outdated should list only outdated packages…
2019-01-09 22:15:53 +01:00