From acedb849ff7ce67b17481a2a8495bfa8318983e1 Mon Sep 17 00:00:00 2001 From: Oz N Tiram Date: Mon, 17 Oct 2022 22:59:12 +0200 Subject: [PATCH] Remove usage of vistir.cmdparse Following #5390 I realized this code is duplicated into pipenv, and we can use that instead of the one in vistir. --- pipenv/environment.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pipenv/environment.py b/pipenv/environment.py index 66c53545..95c1235f 100644 --- a/pipenv/environment.py +++ b/pipenv/environment.py @@ -13,6 +13,7 @@ from pathlib import Path from sysconfig import get_paths, get_python_version, get_scheme_names import pipenv +from pipenv import cmdparse from pipenv.patched.pip._internal.commands.install import InstallCommand from pipenv.patched.pip._internal.index.package_finder import PackageFinder from pipenv.patched.pip._internal.req.req_uninstall import UninstallPathSet @@ -815,7 +816,7 @@ class Environment: c = None with self.activated(): - script = vistir.cmdparse.Script.parse(cmd) + script = cmdparse.Script.parse(cmd) c = vistir.misc.run( script._parts, return_object=True, @@ -837,9 +838,9 @@ class Environment: c = None if isinstance(cmd, str): - script = vistir.cmdparse.Script.parse(f"{self.python} -c {cmd}") + script = cmdparse.Script.parse(f"{self.python} -c {cmd}") else: - script = vistir.cmdparse.Script.parse([self.python, "-c"] + list(cmd)) + script = cmdparse.Script.parse([self.python, "-c"] + list(cmd)) with self.activated(): c = vistir.misc.run( script._parts,