diff options
| author | Bernát Gábor <bgabor8@bloomberg.net> | 2020-09-10 19:29:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-10 19:29:25 +0100 |
| commit | 13c0498a47acf8a0aad6db9ceb1033dfe5f119a9 (patch) | |
| tree | 969e92eadfa4a2c8c96f373e0897a05fdb917769 /src/virtualenv | |
| parent | dc5eb79cfa64270af5dfe7980488b6abddfa8fef (diff) | |
| download | virtualenv-13c0498a47acf8a0aad6db9ceb1033dfe5f119a9.tar.gz | |
Upgrade setuptools and pip (#1939)
Diffstat (limited to 'src/virtualenv')
19 files changed, 66 insertions, 31 deletions
diff --git a/src/virtualenv/app_data/via_disk_folder.py b/src/virtualenv/app_data/via_disk_folder.py index 6b12ef8..4b2cadf 100644 --- a/src/virtualenv/app_data/via_disk_folder.py +++ b/src/virtualenv/app_data/via_disk_folder.py @@ -168,5 +168,8 @@ class PyInfoStoreDisk(JSONStoreDisk): class EmbedDistributionUpdateStoreDisk(JSONStoreDisk): def __init__(self, in_folder, distribution): super(EmbedDistributionUpdateStoreDisk, self).__init__( - in_folder, distribution, "embed update of distribution %s", (distribution,), + in_folder, + distribution, + "embed update of distribution %s", + (distribution,), ) diff --git a/src/virtualenv/create/creator.py b/src/virtualenv/create/creator.py index 4d5b306..45075da 100644 --- a/src/virtualenv/create/creator.py +++ b/src/virtualenv/create/creator.py @@ -79,7 +79,9 @@ class Creator(object): :param meta: value as returned by :meth:`can_create` """ parser.add_argument( - "dest", help="directory to create virtualenv at", type=cls.validate_dest, + "dest", + help="directory to create virtualenv at", + type=cls.validate_dest, ) parser.add_argument( "--clear", @@ -120,7 +122,9 @@ class Creator(object): if refused: raise ArgumentTypeError( "the file system codec ({}) cannot handle characters {!r} within {!r}".format( - encoding, "".join(refused.keys()), raw_value, + encoding, + "".join(refused.keys()), + raw_value, ), ) if os.pathsep in raw_value: diff --git a/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py b/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py index 6dc3ba4..1b971f3 100644 --- a/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py +++ b/src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py @@ -241,7 +241,7 @@ def _builtin_change_mach_o(maxint): def mach_o_change(at_path, what, value): """Replace a given name (what) in any LC_LOAD_DYLIB command found in the given binary with a new name (value), - provided it's shorter.""" + provided it's shorter.""" def do_macho(file, bits, endian): # Read Mach-O header (the magic number is assumed read by the caller) diff --git a/src/virtualenv/create/via_global_ref/builtin/via_global_self_do.py b/src/virtualenv/create/via_global_ref/builtin/via_global_self_do.py index 338f5d1..7de4fe1 100644 --- a/src/virtualenv/create/via_global_ref/builtin/via_global_self_do.py +++ b/src/virtualenv/create/via_global_ref/builtin/via_global_self_do.py @@ -38,7 +38,8 @@ class ViaGlobalRefVirtualenvBuiltin(ViaGlobalRefApi, VirtualenvBuiltin): meta.symlink_error = "cannot symlink {}".format(src) if not meta.can_copy and not meta.can_symlink: meta.error = "neither copy or symlink supported, copy: {} symlink: {}".format( - meta.copy_error, meta.symlink_error, + meta.copy_error, + meta.symlink_error, ) else: meta.error = "missing required file {}".format(src) @@ -92,7 +93,7 @@ class ViaGlobalRefVirtualenvBuiltin(ViaGlobalRefApi, VirtualenvBuiltin): """ We directly inject the base prefix and base exec prefix to avoid site.py needing to discover these from home (which usually is done within the interpreter itself) - """ + """ super(ViaGlobalRefVirtualenvBuiltin, self).set_pyenv_cfg() self.pyenv_cfg["base-prefix"] = self.interpreter.system_prefix self.pyenv_cfg["base-exec-prefix"] = self.interpreter.system_exec_prefix diff --git a/src/virtualenv/create/via_global_ref/venv.py b/src/virtualenv/create/via_global_ref/venv.py index 4a4ed77..aaa6794 100644 --- a/src/virtualenv/create/via_global_ref/venv.py +++ b/src/virtualenv/create/via_global_ref/venv.py @@ -46,7 +46,10 @@ class Venv(ViaGlobalRefApi): from venv import EnvBuilder builder = EnvBuilder( - system_site_packages=self.enable_system_site_package, clear=False, symlinks=self.symlinks, with_pip=False, + system_site_packages=self.enable_system_site_package, + clear=False, + symlinks=self.symlinks, + with_pip=False, ) builder.create(str(self.dest)) diff --git a/src/virtualenv/discovery/cached_py_info.py b/src/virtualenv/discovery/cached_py_info.py index 13a213d..ce79ef1 100644 --- a/src/virtualenv/discovery/cached_py_info.py +++ b/src/virtualenv/discovery/cached_py_info.py @@ -104,7 +104,10 @@ def _run_subprocess(cls, exe, app_data): result.executable = exe # keep original executable as this may contain initialization code else: msg = "failed to query {} with code {}{}{}".format( - exe, code, " out: {!r}".format(out) if out else "", " err: {!r}".format(err) if err else "", + exe, + code, + " out: {!r}".format(out) if out else "", + " err: {!r}".format(err) if err else "", ) failure = RuntimeError(msg) return failure, result diff --git a/src/virtualenv/discovery/py_info.py b/src/virtualenv/discovery/py_info.py index 6f12128..b35213a 100644 --- a/src/virtualenv/discovery/py_info.py +++ b/src/virtualenv/discovery/py_info.py @@ -198,7 +198,8 @@ class PythonInfo(object): def __repr__(self): return "{}({!r})".format( - self.__class__.__name__, {k: v for k, v in self.__dict__.items() if not k.startswith("_")}, + self.__class__.__name__, + {k: v for k, v in self.__dict__.items() if not k.startswith("_")}, ) def __str__(self): diff --git a/src/virtualenv/run/__init__.py b/src/virtualenv/run/__init__.py index 5c1e1b0..916a2d2 100644 --- a/src/virtualenv/run/__init__.py +++ b/src/virtualenv/run/__init__.py @@ -134,7 +134,8 @@ def _do_report_setup(parser, args, setup_logging): level_map = ", ".join("{}={}".format(logging.getLevelName(l), c) for c, l in sorted(list(LEVELS.items()))) msg = "verbosity = verbose - quiet, default {}, mapping => {}" verbosity_group = parser.add_argument_group( - title="verbosity", description=msg.format(logging.getLevelName(LEVELS[3]), level_map), + title="verbosity", + description=msg.format(logging.getLevelName(LEVELS[3]), level_map), ) verbosity = verbosity_group.add_mutually_exclusive_group() verbosity.add_argument("-v", "--verbose", action="count", dest="verbose", help="increase verbosity", default=2) diff --git a/src/virtualenv/run/plugin/creators.py b/src/virtualenv/run/plugin/creators.py index d6d6216..31d03cf 100644 --- a/src/virtualenv/run/plugin/creators.py +++ b/src/virtualenv/run/plugin/creators.py @@ -45,7 +45,10 @@ class CreatorSelector(ComponentBuilder): else: raise RuntimeError("No virtualenv implementation for {}".format(interpreter)) return CreatorInfo( - key_to_class=key_to_class, key_to_meta=key_to_meta, describe=describe, builtin_key=builtin_key, + key_to_class=key_to_class, + key_to_meta=key_to_meta, + describe=describe, + builtin_key=builtin_key, ) def add_selector_arg_parse(self, name, choices): diff --git a/src/virtualenv/run/plugin/discovery.py b/src/virtualenv/run/plugin/discovery.py index e2cfe92..3b6fc60 100644 --- a/src/virtualenv/run/plugin/discovery.py +++ b/src/virtualenv/run/plugin/discovery.py @@ -10,7 +10,8 @@ class Discovery(PluginLoader): def get_discover(parser, args): discover_types = Discovery.entry_points_for("virtualenv.discovery") discovery_parser = parser.add_argument_group( - title="discovery", description="discover and provide a target interpreter", + title="discovery", + description="discover and provide a target interpreter", ) discovery_parser.add_argument( "--discovery", diff --git a/src/virtualenv/run/plugin/seeders.py b/src/virtualenv/run/plugin/seeders.py index 26a3385..d182c6f 100644 --- a/src/virtualenv/run/plugin/seeders.py +++ b/src/virtualenv/run/plugin/seeders.py @@ -17,7 +17,11 @@ class SeederSelector(ComponentBuilder): help="seed packages install method", ) self.parser.add_argument( - "--no-seed", "--without-pip", help="do not install seed packages", action="store_true", dest="no_seed", + "--no-seed", + "--without-pip", + help="do not install seed packages", + action="store_true", + dest="no_seed", ) @staticmethod diff --git a/src/virtualenv/run/session.py b/src/virtualenv/run/session.py index c936089..24836d2 100644 --- a/src/virtualenv/run/session.py +++ b/src/virtualenv/run/session.py @@ -62,7 +62,8 @@ class Session(object): def _activate(self): if self.activators: logging.info( - "add activators for %s", ", ".join(type(i).__name__.replace("Activator", "") for i in self.activators), + "add activators for %s", + ", ".join(type(i).__name__.replace("Activator", "") for i in self.activators), ) for activator in self.activators: activator.generate(self.creator) diff --git a/src/virtualenv/seed/embed/base_embed.py b/src/virtualenv/seed/embed/base_embed.py index f41b5fc..c794e83 100644 --- a/src/virtualenv/seed/embed/base_embed.py +++ b/src/virtualenv/seed/embed/base_embed.py @@ -109,7 +109,8 @@ class BaseEmbed(Seeder): if getattr(self, "no_{}".format(distribution)): continue result += " {}{},".format( - distribution, "={}".format(getattr(self, "{}_version".format(distribution), None) or "latest"), + distribution, + "={}".format(getattr(self, "{}_version".format(distribution), None) or "latest"), ) return result[:-1] + ")" diff --git a/src/virtualenv/seed/wheels/embed/__init__.py b/src/virtualenv/seed/wheels/embed/__init__.py index 3db6719..d52dbae 100644 --- a/src/virtualenv/seed/wheels/embed/__init__.py +++ b/src/virtualenv/seed/wheels/embed/__init__.py @@ -6,33 +6,33 @@ from virtualenv.util.path import Path BUNDLE_FOLDER = Path(__file__).absolute().parent BUNDLE_SUPPORT = { "3.10": { - "pip": "pip-20.2.2-py2.py3-none-any.whl", - "setuptools": "setuptools-49.6.0-py3-none-any.whl", + "pip": "pip-20.2.3-py2.py3-none-any.whl", + "setuptools": "setuptools-50.2.0-py3-none-any.whl", "wheel": "wheel-0.35.1-py2.py3-none-any.whl", }, "3.9": { - "pip": "pip-20.2.2-py2.py3-none-any.whl", - "setuptools": "setuptools-49.6.0-py3-none-any.whl", + "pip": "pip-20.2.3-py2.py3-none-any.whl", + "setuptools": "setuptools-50.2.0-py3-none-any.whl", "wheel": "wheel-0.35.1-py2.py3-none-any.whl", }, "3.8": { - "pip": "pip-20.2.2-py2.py3-none-any.whl", - "setuptools": "setuptools-49.6.0-py3-none-any.whl", + "pip": "pip-20.2.3-py2.py3-none-any.whl", + "setuptools": "setuptools-50.2.0-py3-none-any.whl", "wheel": "wheel-0.35.1-py2.py3-none-any.whl", }, "3.7": { - "pip": "pip-20.2.2-py2.py3-none-any.whl", - "setuptools": "setuptools-49.6.0-py3-none-any.whl", + "pip": "pip-20.2.3-py2.py3-none-any.whl", + "setuptools": "setuptools-50.2.0-py3-none-any.whl", "wheel": "wheel-0.35.1-py2.py3-none-any.whl", }, "3.6": { - "pip": "pip-20.2.2-py2.py3-none-any.whl", - "setuptools": "setuptools-49.6.0-py3-none-any.whl", + "pip": "pip-20.2.3-py2.py3-none-any.whl", + "setuptools": "setuptools-50.2.0-py3-none-any.whl", "wheel": "wheel-0.35.1-py2.py3-none-any.whl", }, "3.5": { - "pip": "pip-20.2.2-py2.py3-none-any.whl", - "setuptools": "setuptools-49.6.0-py3-none-any.whl", + "pip": "pip-20.2.3-py2.py3-none-any.whl", + "setuptools": "setuptools-50.2.0-py3-none-any.whl", "wheel": "wheel-0.35.1-py2.py3-none-any.whl", }, "3.4": { @@ -41,7 +41,7 @@ BUNDLE_SUPPORT = { "wheel": "wheel-0.33.6-py2.py3-none-any.whl", }, "2.7": { - "pip": "pip-20.2.2-py2.py3-none-any.whl", + "pip": "pip-20.2.3-py2.py3-none-any.whl", "setuptools": "setuptools-44.1.1-py2.py3-none-any.whl", "wheel": "wheel-0.35.1-py2.py3-none-any.whl", }, diff --git a/src/virtualenv/seed/wheels/embed/pip-20.2.2-py2.py3-none-any.whl b/src/virtualenv/seed/wheels/embed/pip-20.2.3-py2.py3-none-any.whl Binary files differindex 78bad7a..7ebdc0f 100644 --- a/src/virtualenv/seed/wheels/embed/pip-20.2.2-py2.py3-none-any.whl +++ b/src/virtualenv/seed/wheels/embed/pip-20.2.3-py2.py3-none-any.whl diff --git a/src/virtualenv/seed/wheels/embed/setuptools-49.6.0-py3-none-any.whl b/src/virtualenv/seed/wheels/embed/setuptools-50.2.0-py3-none-any.whl Binary files differindex a743b99..6870bc3 100644 --- a/src/virtualenv/seed/wheels/embed/setuptools-49.6.0-py3-none-any.whl +++ b/src/virtualenv/seed/wheels/embed/setuptools-50.2.0-py3-none-any.whl diff --git a/src/virtualenv/seed/wheels/periodic_update.py b/src/virtualenv/seed/wheels/periodic_update.py index b68248c..fd0ff4c 100644 --- a/src/virtualenv/seed/wheels/periodic_update.py +++ b/src/virtualenv/seed/wheels/periodic_update.py @@ -105,7 +105,10 @@ class NewVersion(object): def __repr__(self): return "{}(filename={}), found_date={}, release_date={})".format( - self.__class__.__name__, self.filename, self.found_date, self.release_date, + self.__class__.__name__, + self.filename, + self.found_date, + self.release_date, ) def __eq__(self, other): diff --git a/src/virtualenv/util/path/_sync.py b/src/virtualenv/util/path/_sync.py index 421eb46..bc62730 100644 --- a/src/virtualenv/util/path/_sync.py +++ b/src/virtualenv/util/path/_sync.py @@ -82,7 +82,9 @@ class _Debug(object): def __str__(self): return "{}{} to {}".format( - "directory " if self.src.is_dir() else "", ensure_text(str(self.src)), ensure_text(str(self.dest)), + "directory " if self.src.is_dir() else "", + ensure_text(str(self.src)), + ensure_text(str(self.dest)), ) diff --git a/src/virtualenv/util/subprocess/__init__.py b/src/virtualenv/util/subprocess/__init__.py index bbb12a9..f506626 100644 --- a/src/virtualenv/util/subprocess/__init__.py +++ b/src/virtualenv/util/subprocess/__init__.py @@ -19,7 +19,11 @@ CREATE_NO_WINDOW = 0x80000000 def run_cmd(cmd): try: process = Popen( - cmd, universal_newlines=True, stdin=subprocess.PIPE, stderr=subprocess.PIPE, stdout=subprocess.PIPE, + cmd, + universal_newlines=True, + stdin=subprocess.PIPE, + stderr=subprocess.PIPE, + stdout=subprocess.PIPE, ) out, err = process.communicate() # input disabled code = process.returncode |
