Skip to content

Commit 13c0498

Browse files
authored
Upgrade setuptools and pip (#1939)
1 parent dc5eb79 commit 13c0498

38 files changed

+159
-77
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,16 @@ repos:
1111
- id: debug-statements
1212
- id: end-of-file-fixer
1313
- id: trailing-whitespace
14-
- repo: https://github.com/asottile/add-trailing-comma
15-
rev: v2.0.1
16-
hooks:
17-
- id: add-trailing-comma
1814
- repo: https://github.com/asottile/pyupgrade
1915
rev: v2.7.2
2016
hooks:
2117
- id: pyupgrade
22-
- repo: https://github.com/asottile/seed-isort-config
23-
rev: v2.2.0
24-
hooks:
25-
- id: seed-isort-config
26-
args: [--application-directories, '.:src']
27-
- repo: https://github.com/pre-commit/mirrors-isort
28-
rev: v5.4.2
18+
- repo: https://github.com/PyCQA/isort
19+
rev: 5.5.2
2920
hooks:
3021
- id: isort
3122
- repo: https://github.com/ambv/black
32-
rev: 19.10b0
23+
rev: 20.8b1
3324
hooks:
3425
- id: black
3526
args: [--safe]
@@ -38,7 +29,7 @@ repos:
3829
rev: v1.8.0
3930
hooks:
4031
- id: blacken-docs
41-
additional_dependencies: [black==19.10b0]
32+
additional_dependencies: [black==20.8b1]
4233
language_version: python3.8
4334
- repo: https://github.com/pre-commit/pygrep-hooks
4435
rev: v1.6.0
@@ -49,7 +40,7 @@ repos:
4940
hooks:
5041
- id: setup-cfg-fmt
5142
args: [--min-py3-version, "3.4"]
52-
- repo: https://gitlab.com/pycqa/flake8
43+
- repo: https://github.com/PyCQA/flake8
5344
rev: "3.8.3"
5445
hooks:
5546
- id: flake8

docs/changelog/1939.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade embedded setuptools to ``50.2.0`` and pip to ``20.2.3`` - by :user:`gaborbernat`.

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@
6060
def generate_draft_news():
6161
root = Path(__file__).parents[1]
6262
new = subprocess.check_output(
63-
[sys.executable, "-m", "towncrier", "--draft", "--version", "NEXT"], cwd=root, universal_newlines=True,
63+
[sys.executable, "-m", "towncrier", "--draft", "--version", "NEXT"],
64+
cwd=root,
65+
universal_newlines=True,
6466
)
6567
(root / "docs" / "_draft.rst").write_text("" if "No significant changes" in new else new)
6668

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ universal = true
123123
markers =
124124
slow
125125
junit_family = xunit2
126-
addopts = --tb=auto -ra --showlocals
126+
addopts = --tb=auto -ra --showlocals --no-success-flaky-report
127127
env =
128128
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
129129
PYTHONIOENCODING=utf-8

src/virtualenv/app_data/via_disk_folder.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,8 @@ def __init__(self, in_folder, path):
168168
class EmbedDistributionUpdateStoreDisk(JSONStoreDisk):
169169
def __init__(self, in_folder, distribution):
170170
super(EmbedDistributionUpdateStoreDisk, self).__init__(
171-
in_folder, distribution, "embed update of distribution %s", (distribution,),
171+
in_folder,
172+
distribution,
173+
"embed update of distribution %s",
174+
(distribution,),
172175
)

src/virtualenv/create/creator.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ def add_parser_arguments(cls, parser, interpreter, meta, app_data):
7979
:param meta: value as returned by :meth:`can_create`
8080
"""
8181
parser.add_argument(
82-
"dest", help="directory to create virtualenv at", type=cls.validate_dest,
82+
"dest",
83+
help="directory to create virtualenv at",
84+
type=cls.validate_dest,
8385
)
8486
parser.add_argument(
8587
"--clear",
@@ -120,7 +122,9 @@ def non_write_able(dest, value):
120122
if refused:
121123
raise ArgumentTypeError(
122124
"the file system codec ({}) cannot handle characters {!r} within {!r}".format(
123-
encoding, "".join(refused.keys()), raw_value,
125+
encoding,
126+
"".join(refused.keys()),
127+
raw_value,
124128
),
125129
)
126130
if os.pathsep in raw_value:

src/virtualenv/create/via_global_ref/builtin/cpython/mac_os.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def read_data(file, endian, num=1):
241241

242242
def mach_o_change(at_path, what, value):
243243
"""Replace a given name (what) in any LC_LOAD_DYLIB command found in the given binary with a new name (value),
244-
provided it's shorter."""
244+
provided it's shorter."""
245245

246246
def do_macho(file, bits, endian):
247247
# Read Mach-O header (the magic number is assumed read by the caller)

src/virtualenv/create/via_global_ref/builtin/via_global_self_do.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def can_create(cls, interpreter):
3838
meta.symlink_error = "cannot symlink {}".format(src)
3939
if not meta.can_copy and not meta.can_symlink:
4040
meta.error = "neither copy or symlink supported, copy: {} symlink: {}".format(
41-
meta.copy_error, meta.symlink_error,
41+
meta.copy_error,
42+
meta.symlink_error,
4243
)
4344
else:
4445
meta.error = "missing required file {}".format(src)
@@ -92,7 +93,7 @@ def set_pyenv_cfg(self):
9293
"""
9394
We directly inject the base prefix and base exec prefix to avoid site.py needing to discover these
9495
from home (which usually is done within the interpreter itself)
95-
"""
96+
"""
9697
super(ViaGlobalRefVirtualenvBuiltin, self).set_pyenv_cfg()
9798
self.pyenv_cfg["base-prefix"] = self.interpreter.system_prefix
9899
self.pyenv_cfg["base-exec-prefix"] = self.interpreter.system_exec_prefix

src/virtualenv/create/via_global_ref/venv.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ def create_inline(self):
4646
from venv import EnvBuilder
4747

4848
builder = EnvBuilder(
49-
system_site_packages=self.enable_system_site_package, clear=False, symlinks=self.symlinks, with_pip=False,
49+
system_site_packages=self.enable_system_site_package,
50+
clear=False,
51+
symlinks=self.symlinks,
52+
with_pip=False,
5053
)
5154
builder.create(str(self.dest))
5255

src/virtualenv/discovery/cached_py_info.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ def _run_subprocess(cls, exe, app_data):
104104
result.executable = exe # keep original executable as this may contain initialization code
105105
else:
106106
msg = "failed to query {} with code {}{}{}".format(
107-
exe, code, " out: {!r}".format(out) if out else "", " err: {!r}".format(err) if err else "",
107+
exe,
108+
code,
109+
" out: {!r}".format(out) if out else "",
110+
" err: {!r}".format(err) if err else "",
108111
)
109112
failure = RuntimeError(msg)
110113
return failure, result

0 commit comments

Comments
 (0)