From c5b2cf6c4f7edd3f01dd4d2f5548105e6eb71f27 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Fri, 29 Jun 2018 03:19:35 -0400 Subject: [PATCH] Fix pathlib fallback imports to use compat file Signed-off-by: Dan Ryan --- pipenv/shells.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pipenv/shells.py b/pipenv/shells.py index 570bcdec..23ef9508 100644 --- a/pipenv/shells.py +++ b/pipenv/shells.py @@ -5,10 +5,10 @@ import signal import subprocess import sys -from ._compat import get_terminal_size +from ._compat import get_terminal_size, Path from .environments import PIPENV_SHELL_EXPLICIT, PIPENV_SHELL, PIPENV_EMULATOR from .utils import temp_environ -from .vendor import pathlib2 as pathlib, shellingham +from .vendor import shellingham ShellDetectionFailure = shellingham.ShellDetectionFailure @@ -120,14 +120,14 @@ class Shell(object): POSSIBLE_ENV_PYTHON = [ - pathlib.Path('bin', 'python'), - pathlib.Path('Scripts', 'python.exe'), + Path('bin', 'python'), + Path('Scripts', 'python.exe'), ] def _iter_python(venv): for path in POSSIBLE_ENV_PYTHON: - full_path = pathlib.Path(venv, path) + full_path = Path(venv, path) if full_path.is_file(): yield full_path @@ -138,7 +138,7 @@ class Bash(Shell): @contextlib.contextmanager def inject_path(self, venv): from ._compat import NamedTemporaryFile - bashrc_path = pathlib.Path.home().joinpath('.bashrc') + bashrc_path = Path.home().joinpath('.bashrc') with NamedTemporaryFile('w+') as rcfile: if bashrc_path.is_file(): base_rc_src = 'source "{0}"\n'.format(bashrc_path.as_posix())