From db42a03ee2fa664d275321b7cb2e86f2220508e2 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Thu, 26 Dec 2019 14:46:05 -0500 Subject: [PATCH] Remove unnecessary InstallRequirement cleanup in install_given_reqs install_given_reqs is only called from InstallCommand.run, which calls RequirementSet.cleanup_files, which calls InstallRequirement.remove_temporary_source for each InstallRequirement, so the call here was not necessary. We have test coverage affirming this still works as expected in tests/functional/test_install_cleanup.py. --- src/pip/_internal/req/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pip/_internal/req/__init__.py b/src/pip/_internal/req/__init__.py index 827b6cbc2..d2d027ade 100644 --- a/src/pip/_internal/req/__init__.py +++ b/src/pip/_internal/req/__init__.py @@ -86,7 +86,6 @@ def install_given_reqs( ) if should_commit: uninstalled_pathset.commit() - requirement.remove_temporary_source() installed.append(InstallationResult(requirement.name))