Skip to content

Commit

Permalink
Vendor: bump versions of requirementslib and vistir
Browse files Browse the repository at this point in the history
  • Loading branch information
oz123 committed Dec 6, 2022
1 parent 0a03b76 commit 0ab4fff
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 88 deletions.
2 changes: 1 addition & 1 deletion pipenv/vendor/requirementslib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from .models.pipfile import Pipfile
from .models.requirements import Requirement

__version__ = "2.2.0"
__version__ = "2.2.1"


logger = logging.getLogger(__name__)
Expand Down
33 changes: 9 additions & 24 deletions pipenv/vendor/requirementslib/models/setup_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import contextlib
import os
import shutil
import subprocess as sp
import sys
from collections.abc import Iterable, Mapping
from contextlib import ExitStack
Expand All @@ -30,7 +31,6 @@
)
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
Expand Down Expand Up @@ -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):
Expand All @@ -117,14 +109,8 @@ def pip_install(self, reqs):
"--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):
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pipenv/vendor/vendor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
98 changes: 37 additions & 61 deletions pipenv/vendor/vistir/__init__.py
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 0ab4fff

Please sign in to comment.