mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Merge pull request #8974 from NoahGorny/fix-new-resolver-upgrades-when-not-needed-to
This commit is contained in:
commit
063f2ae74e
2 changed files with 10 additions and 2 deletions
2
news/8963.bugfix.rst
Normal file
2
news/8963.bugfix.rst
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Correctly search for installed distributions in new resolver logic in order
|
||||||
|
to not miss packages (virtualenv packages from system-wide-packages for example)
|
|
@ -98,9 +98,15 @@ class Factory(object):
|
||||||
self._editable_candidate_cache = {} # type: Cache[EditableCandidate]
|
self._editable_candidate_cache = {} # type: Cache[EditableCandidate]
|
||||||
|
|
||||||
if not ignore_installed:
|
if not ignore_installed:
|
||||||
|
packages = get_installed_distributions(
|
||||||
|
local_only=False,
|
||||||
|
include_editables=True,
|
||||||
|
editables_only=False,
|
||||||
|
user_only=False,
|
||||||
|
paths=None,
|
||||||
|
)
|
||||||
self._installed_dists = {
|
self._installed_dists = {
|
||||||
canonicalize_name(dist.project_name): dist
|
canonicalize_name(p.key): p for p in packages
|
||||||
for dist in get_installed_distributions()
|
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
self._installed_dists = {}
|
self._installed_dists = {}
|
||||||
|
|
Loading…
Reference in a new issue