Vendor: bump versions of requirementslib and vistir

This commit is contained in:
Oz Tiram
2022-12-06 11:53:13 +01:00
parent 0a03b76602
commit 0ab4fff2a5
4 changed files with 49 additions and 88 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ from .models.lockfile import Lockfile
from .models.pipfile import Pipfile
from .models.requirements import Requirement
__version__ = "2.2.0"
__version__ = "2.2.1"
logger = logging.getLogger(__name__)
+9 -24
View File
@@ -4,6 +4,7 @@ import configparser
import contextlib
import os
import shutil
import subprocess as sp
import sys
from collections.abc import Iterable, Mapping
from contextlib import ExitStack
@@ -30,7 +31,6 @@ from pipenv.patched.pip._vendor.pkg_resources import (
)
from pipenv.patched.pip._vendor.platformdirs import user_cache_dir
from pipenv.vendor.vistir.contextmanagers import cd, temp_path
from pipenv.vendor.vistir.misc import run
from pipenv.vendor.vistir.path import create_tracked_tempdir, rmtree
from ..environment import MYPY_RUNNING
@@ -94,16 +94,8 @@ def pep517_subprocess_runner(cmd, cwd=None, extra_environ=None):
if extra_environ:
env.update(extra_environ)
run(
cmd,
cwd=cwd,
env=env,
block=True,
combine_stderr=True,
return_object=False,
write_to_stdout=False,
nospin=True,
)
cmd_as_str = " ".join(cmd)
sp.run(cmd_as_str, cwd=cwd, env=env, stdout=sp.PIPE, stderr=sp.STDOUT, shell=True)
class BuildEnv(envbuild.BuildEnvironment):
@@ -117,14 +109,8 @@ class BuildEnv(envbuild.BuildEnvironment):
"--prefix",
self.path,
] + list(reqs)
run(
cmd,
block=True,
combine_stderr=True,
return_object=False,
write_to_stdout=False,
nospin=True,
)
sp.run(cmd, shell=True, stderr=sp.PIPE, stdout=sp.PIPE)
class HookCaller(wrappers.Pep517HookCaller):
@@ -892,13 +878,12 @@ def run_setup(script_path, egg_base=None):
# We couldn't import everything needed to run setup
except Exception:
python = os.environ.get("PIP_PYTHON_PATH", sys.executable)
out, _ = run(
sp.run(
[python, "setup.py"] + args,
cwd=target_cwd,
block=True,
combine_stderr=False,
return_object=False,
nospin=True,
stdout=sp.PIPE,
stderr=sp.PIPE,
)
finally:
_setup_stop_after = None
+2 -2
View File
@@ -12,9 +12,9 @@ ptyprocess==0.7.0
pyparsing==3.0.9
python-dotenv==0.19.0
pythonfinder==1.3.1
requirementslib==2.2.0
requirementslib==2.2.1
ruamel.yaml==0.17.21
shellingham==1.5.0
toml==0.10.2
tomlkit==0.9.2
vistir==0.7.4
vistir==0.7.5
+37 -61
View File
@@ -1,66 +1,42 @@
# -*- coding=utf-8 -*-
import importlib
from .contextmanagers import (
atomic_open_for_write,
cd,
open_file,
replaced_stream,
replaced_streams,
spinner,
temp_environ,
temp_path,
)
from .cursor import hide_cursor, show_cursor
from .misc import (
StreamWrapper,
chunked,
decode_for_output,
divide,
get_wrapped_stream,
load_path,
partialclass,
run,
shell_escape,
take,
to_bytes,
to_text,
)
from .path import create_tracked_tempdir, create_tracked_tempfile, mkdir_p, rmtree
from .spin import create_spinner
__newpaths = {
'create_spinner': 'vistir.spin',
'cd': 'vistir.contextmanagers',
'atomic_open_for_write': 'vistir.contextmanagers',
'open_file': 'vistir.contextmanagers',
'replaced_stream': 'vistir.contextmanagers',
'replaced_streams': 'vistir.contextmanagers',
'spinner': 'vistir.contextmanagers',
'temp_environ': 'vistir.contextmanagers',
'temp_path': 'vistir.contextmanagers',
'hide_cursor': 'vistir.cursor',
'show_cursor': 'vistir.cursor',
'StreamWrapper': 'vistir.misc',
'chunked':'vistir.misc',
'decode_for_output': 'vistir.misc',
'divide': 'vistir.misc',
'get_wrapped_stream': 'vistir.misc',
'load_path': 'vistir.misc',
'partialclass': 'vistir.misc',
'run': 'vistir.misc',
'shell_escape': 'vistir.misc',
'take': 'vistir.misc',
'to_bytes': 'vistir.misc',
'to_text': 'vistir.misc',
'create_tracked_tempdir': 'vistir.path',
'create_tracked_tempfile': 'vistir.path',
'mkdir_p': 'vistir.path',
'rmtree': 'vistir.path',
}
__version__ = "0.7.4"
from warnings import warn
def __getattr__(name):
warn((f"Importing {name} directly from vistir is deprecated.\nUse 'from {__newpaths[name]} import {name}' instead.\n"
"This import path will be removed in vistir 0.8"),
DeprecationWarning)
return getattr(importlib.import_module(__newpaths[name]), name)
__all__ = [
"shell_escape",
"load_path",
"run",
"partialclass",
"temp_environ",
"temp_path",
"cd",
"atomic_open_for_write",
"open_file",
"rmtree",
"mkdir_p",
"TemporaryDirectory",
"NamedTemporaryFile",
"partialmethod",
"spinner",
"create_spinner",
"create_tracked_tempdir",
"create_tracked_tempfile",
"decode_for_output",
"to_text",
"to_bytes",
"take",
"chunked",
"divide",
"StringIO",
"get_wrapped_stream",
"StreamWrapper",
"replaced_stream",
"replaced_streams",
"show_cursor",
"hide_cursor",
]
__version__ = "0.7.5"