Remove redundant expanduser for download_dir in preparer

Since
- download_dir is only set by the download command
- download_dir is
normalized at the beginning of the download command
- path normalization includes expanduser
Therefore expanduser in the preparer is redundant
This commit is contained in:
Stéphane Bidoul (ACSONE) 2019-12-31 05:40:51 +01:00 committed by Xavier Fernandez
parent ab7e4769db
commit 68e49b9613
1 changed files with 0 additions and 3 deletions

View File

@ -25,7 +25,6 @@ from pip._internal.exceptions import (
PreviousBuildDirError,
VcsHashUnsupported,
)
from pip._internal.utils.compat import expanduser
from pip._internal.utils.filesystem import copy2_fixed
from pip._internal.utils.hashes import MissingHashes
from pip._internal.utils.logging import indent_log
@ -364,8 +363,6 @@ class RequirementPreparer(object):
# Where still-packed archives should be written to. If None, they are
# not saved, and are deleted immediately after unpacking.
if download_dir:
download_dir = expanduser(download_dir)
self.download_dir = download_dir
# Where still-packed .whl files should be written to. If None, they are