Skip to content

Commit

Permalink
Remove redundant expanduser for download_dir in preparer
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sbidoul authored and xavfernandez committed Jan 1, 2020
1 parent ab7e476 commit 68e49b9
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/pip/_internal/operations/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
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
Expand Down Expand Up @@ -364,8 +363,6 @@ def __init__(

# 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
Expand Down

0 comments on commit 68e49b9

Please sign in to comment.