File tree 2 files changed +9
-1
lines changed
src/pip/_internal/resolution/resolvelib
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change
1
+ New resolver: The "Requirement already satisfied" log is not printed only once
2
+ for each package during resolution.
Original file line number Diff line number Diff line change @@ -96,6 +96,8 @@ def __init__(
96
96
97
97
self ._link_candidate_cache = {} # type: Cache[LinkCandidate]
98
98
self ._editable_candidate_cache = {} # type: Cache[EditableCandidate]
99
+ self ._installed_candidate_cache = {
100
+ } # type: Dict[str, AlreadyInstalledCandidate]
99
101
100
102
if not ignore_installed :
101
103
self ._installed_dists = {
@@ -117,7 +119,11 @@ def _make_candidate_from_dist(
117
119
template , # type: InstallRequirement
118
120
):
119
121
# type: (...) -> Candidate
120
- base = AlreadyInstalledCandidate (dist , template , factory = self )
122
+ try :
123
+ base = self ._installed_candidate_cache [dist .key ]
124
+ except KeyError :
125
+ base = AlreadyInstalledCandidate (dist , template , factory = self )
126
+ self ._installed_candidate_cache [dist .key ] = base
121
127
if extras :
122
128
return ExtrasCandidate (base , extras )
123
129
return base
You can’t perform that action at this time.
0 commit comments