mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Don't use conflicts_with in logging
InstallRequirement.uninstall doesn't actually use conflicts_with, so don't log it. Instead we output the requirement name so we still have something that looks like a heading before indenting the log, and log what we actually uninstall inside the function. This will also enable us to get rid of conflicts_with.
This commit is contained in:
parent
128a8b3b5a
commit
331716a439
|
@ -58,10 +58,7 @@ def install_given_reqs(
|
|||
with indent_log():
|
||||
for requirement in to_install:
|
||||
if requirement.conflicts_with:
|
||||
logger.info(
|
||||
'Found existing installation: %s',
|
||||
requirement.conflicts_with,
|
||||
)
|
||||
logger.info('Attempting uninstall: %s', requirement.name)
|
||||
with indent_log():
|
||||
uninstalled_pathset = requirement.uninstall(
|
||||
auto_confirm=True
|
||||
|
|
|
@ -695,6 +695,8 @@ class InstallRequirement(object):
|
|||
except pkg_resources.DistributionNotFound:
|
||||
logger.warning("Skipping %s as it is not installed.", self.name)
|
||||
return None
|
||||
else:
|
||||
logger.info('Found existing installation: %s', dist)
|
||||
|
||||
uninstalled_pathset = UninstallPathSet.from_dist(dist)
|
||||
uninstalled_pathset.remove(auto_confirm, verbose)
|
||||
|
|
Loading…
Reference in a new issue