pip 25.1__py3-none-any.whl → 25.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pip/__init__.py +3 -3
- pip/_internal/__init__.py +2 -2
- pip/_internal/build_env.py +118 -94
- pip/_internal/cache.py +16 -14
- pip/_internal/cli/autocompletion.py +13 -4
- pip/_internal/cli/base_command.py +18 -7
- pip/_internal/cli/cmdoptions.py +14 -9
- pip/_internal/cli/command_context.py +4 -3
- pip/_internal/cli/index_command.py +11 -9
- pip/_internal/cli/main.py +3 -2
- pip/_internal/cli/main_parser.py +4 -3
- pip/_internal/cli/parser.py +26 -22
- pip/_internal/cli/progress_bars.py +19 -12
- pip/_internal/cli/req_command.py +16 -12
- pip/_internal/cli/spinners.py +81 -5
- pip/_internal/commands/__init__.py +5 -3
- pip/_internal/commands/cache.py +18 -15
- pip/_internal/commands/check.py +1 -2
- pip/_internal/commands/completion.py +1 -2
- pip/_internal/commands/configuration.py +26 -18
- pip/_internal/commands/debug.py +8 -6
- pip/_internal/commands/download.py +2 -3
- pip/_internal/commands/freeze.py +2 -3
- pip/_internal/commands/hash.py +1 -2
- pip/_internal/commands/help.py +1 -2
- pip/_internal/commands/index.py +15 -9
- pip/_internal/commands/inspect.py +4 -4
- pip/_internal/commands/install.py +45 -40
- pip/_internal/commands/list.py +35 -26
- pip/_internal/commands/lock.py +1 -2
- pip/_internal/commands/search.py +14 -12
- pip/_internal/commands/show.py +14 -11
- pip/_internal/commands/uninstall.py +1 -2
- pip/_internal/commands/wheel.py +2 -3
- pip/_internal/configuration.py +39 -25
- pip/_internal/distributions/base.py +6 -4
- pip/_internal/distributions/installed.py +8 -4
- pip/_internal/distributions/sdist.py +20 -13
- pip/_internal/distributions/wheel.py +6 -4
- pip/_internal/exceptions.py +58 -39
- pip/_internal/index/collector.py +24 -29
- pip/_internal/index/package_finder.py +70 -61
- pip/_internal/index/sources.py +17 -14
- pip/_internal/locations/__init__.py +18 -16
- pip/_internal/locations/_distutils.py +12 -11
- pip/_internal/locations/_sysconfig.py +5 -4
- pip/_internal/locations/base.py +4 -3
- pip/_internal/main.py +2 -2
- pip/_internal/metadata/__init__.py +8 -6
- pip/_internal/metadata/_json.py +5 -4
- pip/_internal/metadata/base.py +22 -27
- pip/_internal/metadata/importlib/_compat.py +6 -4
- pip/_internal/metadata/importlib/_dists.py +12 -17
- pip/_internal/metadata/importlib/_envs.py +9 -6
- pip/_internal/metadata/pkg_resources.py +11 -14
- pip/_internal/models/direct_url.py +24 -21
- pip/_internal/models/format_control.py +5 -5
- pip/_internal/models/installation_report.py +4 -3
- pip/_internal/models/link.py +39 -34
- pip/_internal/models/pylock.py +27 -22
- pip/_internal/models/search_scope.py +6 -7
- pip/_internal/models/selection_prefs.py +3 -3
- pip/_internal/models/target_python.py +10 -9
- pip/_internal/models/wheel.py +7 -5
- pip/_internal/network/auth.py +20 -22
- pip/_internal/network/cache.py +22 -6
- pip/_internal/network/download.py +169 -141
- pip/_internal/network/lazy_wheel.py +10 -7
- pip/_internal/network/session.py +32 -27
- pip/_internal/network/utils.py +2 -2
- pip/_internal/network/xmlrpc.py +2 -2
- pip/_internal/operations/build/build_tracker.py +10 -8
- pip/_internal/operations/build/wheel.py +3 -2
- pip/_internal/operations/build/wheel_editable.py +3 -2
- pip/_internal/operations/build/wheel_legacy.py +9 -8
- pip/_internal/operations/check.py +21 -26
- pip/_internal/operations/freeze.py +12 -9
- pip/_internal/operations/install/editable_legacy.py +5 -3
- pip/_internal/operations/install/wheel.py +53 -44
- pip/_internal/operations/prepare.py +35 -30
- pip/_internal/pyproject.py +7 -10
- pip/_internal/req/__init__.py +12 -10
- pip/_internal/req/constructors.py +33 -31
- pip/_internal/req/req_dependency_group.py +9 -8
- pip/_internal/req/req_file.py +32 -35
- pip/_internal/req/req_install.py +37 -34
- pip/_internal/req/req_set.py +4 -5
- pip/_internal/req/req_uninstall.py +20 -17
- pip/_internal/resolution/base.py +3 -3
- pip/_internal/resolution/legacy/resolver.py +21 -20
- pip/_internal/resolution/resolvelib/base.py +16 -13
- pip/_internal/resolution/resolvelib/candidates.py +29 -26
- pip/_internal/resolution/resolvelib/factory.py +41 -50
- pip/_internal/resolution/resolvelib/found_candidates.py +11 -9
- pip/_internal/resolution/resolvelib/provider.py +15 -20
- pip/_internal/resolution/resolvelib/reporter.py +5 -3
- pip/_internal/resolution/resolvelib/requirements.py +8 -6
- pip/_internal/resolution/resolvelib/resolver.py +39 -23
- pip/_internal/self_outdated_check.py +8 -6
- pip/_internal/utils/appdirs.py +1 -2
- pip/_internal/utils/compat.py +7 -1
- pip/_internal/utils/compatibility_tags.py +17 -16
- pip/_internal/utils/deprecation.py +11 -9
- pip/_internal/utils/direct_url_helpers.py +2 -2
- pip/_internal/utils/egg_link.py +6 -5
- pip/_internal/utils/entrypoints.py +3 -2
- pip/_internal/utils/filesystem.py +8 -5
- pip/_internal/utils/filetypes.py +4 -6
- pip/_internal/utils/glibc.py +6 -5
- pip/_internal/utils/hashes.py +9 -6
- pip/_internal/utils/logging.py +8 -5
- pip/_internal/utils/misc.py +54 -44
- pip/_internal/utils/packaging.py +3 -2
- pip/_internal/utils/retry.py +7 -4
- pip/_internal/utils/setuptools_build.py +12 -10
- pip/_internal/utils/subprocess.py +20 -17
- pip/_internal/utils/temp_dir.py +10 -12
- pip/_internal/utils/unpacking.py +6 -4
- pip/_internal/utils/urls.py +1 -1
- pip/_internal/utils/virtualenv.py +3 -2
- pip/_internal/utils/wheel.py +3 -4
- pip/_internal/vcs/bazaar.py +26 -8
- pip/_internal/vcs/git.py +59 -24
- pip/_internal/vcs/mercurial.py +34 -11
- pip/_internal/vcs/subversion.py +27 -16
- pip/_internal/vcs/versioncontrol.py +56 -51
- pip/_internal/wheel_builder.py +14 -12
- pip/_vendor/cachecontrol/__init__.py +1 -1
- pip/_vendor/certifi/__init__.py +1 -1
- pip/_vendor/certifi/cacert.pem +102 -221
- pip/_vendor/certifi/core.py +1 -32
- pip/_vendor/dependency_groups/_implementation.py +7 -11
- pip/_vendor/distlib/__init__.py +2 -2
- pip/_vendor/distlib/scripts.py +1 -1
- pip/_vendor/msgpack/__init__.py +2 -2
- pip/_vendor/pkg_resources/__init__.py +1 -1
- pip/_vendor/platformdirs/version.py +2 -2
- pip/_vendor/pygments/__init__.py +1 -1
- pip/_vendor/requests/__version__.py +2 -2
- pip/_vendor/requests/compat.py +12 -0
- pip/_vendor/requests/models.py +3 -1
- pip/_vendor/requests/utils.py +6 -16
- pip/_vendor/resolvelib/__init__.py +3 -3
- pip/_vendor/resolvelib/reporters.py +1 -1
- pip/_vendor/resolvelib/resolvers/__init__.py +4 -4
- pip/_vendor/resolvelib/resolvers/resolution.py +91 -10
- pip/_vendor/rich/__main__.py +12 -40
- pip/_vendor/rich/_inspect.py +1 -1
- pip/_vendor/rich/_ratio.py +1 -7
- pip/_vendor/rich/align.py +1 -7
- pip/_vendor/rich/box.py +1 -7
- pip/_vendor/rich/console.py +25 -20
- pip/_vendor/rich/control.py +1 -7
- pip/_vendor/rich/diagnose.py +1 -0
- pip/_vendor/rich/emoji.py +1 -6
- pip/_vendor/rich/live.py +32 -7
- pip/_vendor/rich/live_render.py +1 -7
- pip/_vendor/rich/logging.py +1 -1
- pip/_vendor/rich/panel.py +3 -4
- pip/_vendor/rich/progress.py +15 -15
- pip/_vendor/rich/spinner.py +7 -13
- pip/_vendor/rich/syntax.py +24 -5
- pip/_vendor/rich/traceback.py +32 -17
- pip/_vendor/truststore/_api.py +1 -1
- pip/_vendor/vendor.txt +10 -11
- {pip-25.1.dist-info → pip-25.2.dist-info}/METADATA +26 -4
- {pip-25.1.dist-info → pip-25.2.dist-info}/RECORD +194 -181
- {pip-25.1.dist-info → pip-25.2.dist-info}/WHEEL +1 -1
- {pip-25.1.dist-info → pip-25.2.dist-info}/licenses/AUTHORS.txt +12 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt +13 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/certifi/LICENSE +20 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt +9 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/distlib/LICENSE.txt +284 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/distro/LICENSE +202 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/idna/LICENSE.md +31 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/msgpack/COPYING +14 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/packaging/LICENSE +3 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.APACHE +177 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.BSD +23 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/pkg_resources/LICENSE +17 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/platformdirs/LICENSE +21 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/pygments/LICENSE +25 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +21 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/requests/LICENSE +175 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/resolvelib/LICENSE +13 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/rich/LICENSE +19 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/tomli/LICENSE +21 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/tomli/LICENSE-HEADER +3 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/tomli_w/LICENSE +21 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/truststore/LICENSE +21 -0
- pip-25.2.dist-info/licenses/src/pip/_vendor/urllib3/LICENSE.txt +21 -0
- pip/_vendor/distlib/database.py +0 -1329
- pip/_vendor/distlib/index.py +0 -508
- pip/_vendor/distlib/locators.py +0 -1295
- pip/_vendor/distlib/manifest.py +0 -384
- pip/_vendor/distlib/markers.py +0 -162
- pip/_vendor/distlib/metadata.py +0 -1031
- pip/_vendor/distlib/version.py +0 -750
- pip/_vendor/distlib/wheel.py +0 -1100
- pip/_vendor/typing_extensions.py +0 -4584
- {pip-25.1.dist-info → pip-25.2.dist-info}/entry_points.txt +0 -0
- {pip-25.1.dist-info → pip-25.2.dist-info}/licenses/LICENSE.txt +0 -0
- {pip-25.1.dist-info → pip-25.2.dist-info}/top_level.txt +0 -0
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
"""Handles all VCS (version control) support"""
|
|
2
2
|
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
3
5
|
import logging
|
|
4
6
|
import os
|
|
5
7
|
import shutil
|
|
6
8
|
import sys
|
|
7
9
|
import urllib.parse
|
|
10
|
+
from collections.abc import Iterable, Iterator, Mapping
|
|
8
11
|
from dataclasses import dataclass, field
|
|
9
12
|
from typing import (
|
|
10
13
|
Any,
|
|
11
|
-
Dict,
|
|
12
|
-
Iterable,
|
|
13
|
-
Iterator,
|
|
14
|
-
List,
|
|
15
14
|
Literal,
|
|
16
|
-
Mapping,
|
|
17
15
|
Optional,
|
|
18
|
-
Tuple,
|
|
19
|
-
Type,
|
|
20
|
-
Union,
|
|
21
16
|
)
|
|
22
17
|
|
|
23
18
|
from pip._internal.cli.spinners import SpinnerInterface
|
|
@@ -44,7 +39,7 @@ __all__ = ["vcs"]
|
|
|
44
39
|
|
|
45
40
|
logger = logging.getLogger(__name__)
|
|
46
41
|
|
|
47
|
-
AuthInfo =
|
|
42
|
+
AuthInfo = tuple[Optional[str], Optional[str]]
|
|
48
43
|
|
|
49
44
|
|
|
50
45
|
def is_url(name: str) -> bool:
|
|
@@ -58,7 +53,7 @@ def is_url(name: str) -> bool:
|
|
|
58
53
|
|
|
59
54
|
|
|
60
55
|
def make_vcs_requirement_url(
|
|
61
|
-
repo_url: str, rev: str, project_name: str, subdir:
|
|
56
|
+
repo_url: str, rev: str, project_name: str, subdir: str | None = None
|
|
62
57
|
) -> str:
|
|
63
58
|
"""
|
|
64
59
|
Return the URL for a VCS requirement.
|
|
@@ -77,7 +72,7 @@ def make_vcs_requirement_url(
|
|
|
77
72
|
|
|
78
73
|
def find_path_to_project_root_from_repo_root(
|
|
79
74
|
location: str, repo_root: str
|
|
80
|
-
) ->
|
|
75
|
+
) -> str | None:
|
|
81
76
|
"""
|
|
82
77
|
Find the the Python project's root by searching up the filesystem from
|
|
83
78
|
`location`. Return the path to project root relative to `repo_root`.
|
|
@@ -126,16 +121,16 @@ class RevOptions:
|
|
|
126
121
|
extra_args: a list of extra options.
|
|
127
122
|
"""
|
|
128
123
|
|
|
129
|
-
vc_class:
|
|
130
|
-
rev:
|
|
124
|
+
vc_class: type[VersionControl]
|
|
125
|
+
rev: str | None = None
|
|
131
126
|
extra_args: CommandArgs = field(default_factory=list)
|
|
132
|
-
branch_name:
|
|
127
|
+
branch_name: str | None = None
|
|
133
128
|
|
|
134
129
|
def __repr__(self) -> str:
|
|
135
130
|
return f"<RevOptions {self.vc_class.name}: rev={self.rev!r}>"
|
|
136
131
|
|
|
137
132
|
@property
|
|
138
|
-
def arg_rev(self) ->
|
|
133
|
+
def arg_rev(self) -> str | None:
|
|
139
134
|
if self.rev is None:
|
|
140
135
|
return self.vc_class.default_arg_rev
|
|
141
136
|
|
|
@@ -159,7 +154,7 @@ class RevOptions:
|
|
|
159
154
|
|
|
160
155
|
return f" (to revision {self.rev})"
|
|
161
156
|
|
|
162
|
-
def make_new(self, rev: str) ->
|
|
157
|
+
def make_new(self, rev: str) -> RevOptions:
|
|
163
158
|
"""
|
|
164
159
|
Make a copy of the current instance, but with a new rev.
|
|
165
160
|
|
|
@@ -170,7 +165,7 @@ class RevOptions:
|
|
|
170
165
|
|
|
171
166
|
|
|
172
167
|
class VcsSupport:
|
|
173
|
-
_registry:
|
|
168
|
+
_registry: dict[str, VersionControl] = {}
|
|
174
169
|
schemes = ["ssh", "git", "hg", "bzr", "sftp", "svn"]
|
|
175
170
|
|
|
176
171
|
def __init__(self) -> None:
|
|
@@ -183,21 +178,21 @@ class VcsSupport:
|
|
|
183
178
|
return self._registry.__iter__()
|
|
184
179
|
|
|
185
180
|
@property
|
|
186
|
-
def backends(self) ->
|
|
181
|
+
def backends(self) -> list[VersionControl]:
|
|
187
182
|
return list(self._registry.values())
|
|
188
183
|
|
|
189
184
|
@property
|
|
190
|
-
def dirnames(self) ->
|
|
185
|
+
def dirnames(self) -> list[str]:
|
|
191
186
|
return [backend.dirname for backend in self.backends]
|
|
192
187
|
|
|
193
188
|
@property
|
|
194
|
-
def all_schemes(self) ->
|
|
195
|
-
schemes:
|
|
189
|
+
def all_schemes(self) -> list[str]:
|
|
190
|
+
schemes: list[str] = []
|
|
196
191
|
for backend in self.backends:
|
|
197
192
|
schemes.extend(backend.schemes)
|
|
198
193
|
return schemes
|
|
199
194
|
|
|
200
|
-
def register(self, cls:
|
|
195
|
+
def register(self, cls: type[VersionControl]) -> None:
|
|
201
196
|
if not hasattr(cls, "name"):
|
|
202
197
|
logger.warning("Cannot register VCS %s", cls.__name__)
|
|
203
198
|
return
|
|
@@ -209,7 +204,7 @@ class VcsSupport:
|
|
|
209
204
|
if name in self._registry:
|
|
210
205
|
del self._registry[name]
|
|
211
206
|
|
|
212
|
-
def get_backend_for_dir(self, location: str) ->
|
|
207
|
+
def get_backend_for_dir(self, location: str) -> VersionControl | None:
|
|
213
208
|
"""
|
|
214
209
|
Return a VersionControl object if a repository of that type is found
|
|
215
210
|
at the given directory.
|
|
@@ -232,7 +227,7 @@ class VcsSupport:
|
|
|
232
227
|
inner_most_repo_path = max(vcs_backends, key=len)
|
|
233
228
|
return vcs_backends[inner_most_repo_path]
|
|
234
229
|
|
|
235
|
-
def get_backend_for_scheme(self, scheme: str) ->
|
|
230
|
+
def get_backend_for_scheme(self, scheme: str) -> VersionControl | None:
|
|
236
231
|
"""
|
|
237
232
|
Return a VersionControl object or None.
|
|
238
233
|
"""
|
|
@@ -241,7 +236,7 @@ class VcsSupport:
|
|
|
241
236
|
return vcs_backend
|
|
242
237
|
return None
|
|
243
238
|
|
|
244
|
-
def get_backend(self, name: str) ->
|
|
239
|
+
def get_backend(self, name: str) -> VersionControl | None:
|
|
245
240
|
"""
|
|
246
241
|
Return a VersionControl object or None.
|
|
247
242
|
"""
|
|
@@ -257,10 +252,10 @@ class VersionControl:
|
|
|
257
252
|
dirname = ""
|
|
258
253
|
repo_name = ""
|
|
259
254
|
# List of supported schemes for this Version Control
|
|
260
|
-
schemes:
|
|
255
|
+
schemes: tuple[str, ...] = ()
|
|
261
256
|
# Iterable of environment variable names to pass to call_subprocess().
|
|
262
|
-
unset_environ:
|
|
263
|
-
default_arg_rev:
|
|
257
|
+
unset_environ: tuple[str, ...] = ()
|
|
258
|
+
default_arg_rev: str | None = None
|
|
264
259
|
|
|
265
260
|
@classmethod
|
|
266
261
|
def should_add_vcs_url_prefix(cls, remote_url: str) -> bool:
|
|
@@ -271,7 +266,7 @@ class VersionControl:
|
|
|
271
266
|
return not remote_url.lower().startswith(f"{cls.name}:")
|
|
272
267
|
|
|
273
268
|
@classmethod
|
|
274
|
-
def get_subdirectory(cls, location: str) ->
|
|
269
|
+
def get_subdirectory(cls, location: str) -> str | None:
|
|
275
270
|
"""
|
|
276
271
|
Return the path to Python project root, relative to the repo root.
|
|
277
272
|
Return None if the project root is in the repo root.
|
|
@@ -310,7 +305,7 @@ class VersionControl:
|
|
|
310
305
|
return req
|
|
311
306
|
|
|
312
307
|
@staticmethod
|
|
313
|
-
def get_base_rev_args(rev: str) ->
|
|
308
|
+
def get_base_rev_args(rev: str) -> list[str]:
|
|
314
309
|
"""
|
|
315
310
|
Return the base revision arguments for a vcs command.
|
|
316
311
|
|
|
@@ -334,7 +329,7 @@ class VersionControl:
|
|
|
334
329
|
|
|
335
330
|
@classmethod
|
|
336
331
|
def make_rev_options(
|
|
337
|
-
cls, rev:
|
|
332
|
+
cls, rev: str | None = None, extra_args: CommandArgs | None = None
|
|
338
333
|
) -> RevOptions:
|
|
339
334
|
"""
|
|
340
335
|
Return a RevOptions object.
|
|
@@ -357,7 +352,7 @@ class VersionControl:
|
|
|
357
352
|
@classmethod
|
|
358
353
|
def get_netloc_and_auth(
|
|
359
354
|
cls, netloc: str, scheme: str
|
|
360
|
-
) ->
|
|
355
|
+
) -> tuple[str, tuple[str | None, str | None]]:
|
|
361
356
|
"""
|
|
362
357
|
Parse the repository URL's netloc, and return the new netloc to use
|
|
363
358
|
along with auth information.
|
|
@@ -376,7 +371,7 @@ class VersionControl:
|
|
|
376
371
|
return netloc, (None, None)
|
|
377
372
|
|
|
378
373
|
@classmethod
|
|
379
|
-
def get_url_rev_and_auth(cls, url: str) ->
|
|
374
|
+
def get_url_rev_and_auth(cls, url: str) -> tuple[str, str | None, AuthInfo]:
|
|
380
375
|
"""
|
|
381
376
|
Parse the repository URL to use, and return the URL, revision,
|
|
382
377
|
and auth info to use.
|
|
@@ -406,22 +401,20 @@ class VersionControl:
|
|
|
406
401
|
return url, rev, user_pass
|
|
407
402
|
|
|
408
403
|
@staticmethod
|
|
409
|
-
def make_rev_args(
|
|
410
|
-
username: Optional[str], password: Optional[HiddenText]
|
|
411
|
-
) -> CommandArgs:
|
|
404
|
+
def make_rev_args(username: str | None, password: HiddenText | None) -> CommandArgs:
|
|
412
405
|
"""
|
|
413
406
|
Return the RevOptions "extra arguments" to use in obtain().
|
|
414
407
|
"""
|
|
415
408
|
return []
|
|
416
409
|
|
|
417
|
-
def get_url_rev_options(self, url: HiddenText) ->
|
|
410
|
+
def get_url_rev_options(self, url: HiddenText) -> tuple[HiddenText, RevOptions]:
|
|
418
411
|
"""
|
|
419
412
|
Return the URL and RevOptions object to use in obtain(),
|
|
420
413
|
as a tuple (url, rev_options).
|
|
421
414
|
"""
|
|
422
415
|
secret_url, rev, user_pass = self.get_url_rev_and_auth(url.secret)
|
|
423
416
|
username, secret_password = user_pass
|
|
424
|
-
password:
|
|
417
|
+
password: HiddenText | None = None
|
|
425
418
|
if secret_password is not None:
|
|
426
419
|
password = hide_value(secret_password)
|
|
427
420
|
extra_args = self.make_rev_args(username, password)
|
|
@@ -458,7 +451,13 @@ class VersionControl:
|
|
|
458
451
|
"""
|
|
459
452
|
raise NotImplementedError
|
|
460
453
|
|
|
461
|
-
def switch(
|
|
454
|
+
def switch(
|
|
455
|
+
self,
|
|
456
|
+
dest: str,
|
|
457
|
+
url: HiddenText,
|
|
458
|
+
rev_options: RevOptions,
|
|
459
|
+
verbosity: int = 0,
|
|
460
|
+
) -> None:
|
|
462
461
|
"""
|
|
463
462
|
Switch the repo at ``dest`` to point to ``URL``.
|
|
464
463
|
|
|
@@ -467,7 +466,13 @@ class VersionControl:
|
|
|
467
466
|
"""
|
|
468
467
|
raise NotImplementedError
|
|
469
468
|
|
|
470
|
-
def update(
|
|
469
|
+
def update(
|
|
470
|
+
self,
|
|
471
|
+
dest: str,
|
|
472
|
+
url: HiddenText,
|
|
473
|
+
rev_options: RevOptions,
|
|
474
|
+
verbosity: int = 0,
|
|
475
|
+
) -> None:
|
|
471
476
|
"""
|
|
472
477
|
Update an already-existing repo to the given ``rev_options``.
|
|
473
478
|
|
|
@@ -477,7 +482,7 @@ class VersionControl:
|
|
|
477
482
|
raise NotImplementedError
|
|
478
483
|
|
|
479
484
|
@classmethod
|
|
480
|
-
def is_commit_id_equal(cls, dest: str, name:
|
|
485
|
+
def is_commit_id_equal(cls, dest: str, name: str | None) -> bool:
|
|
481
486
|
"""
|
|
482
487
|
Return whether the id of the current commit equals the given name.
|
|
483
488
|
|
|
@@ -519,7 +524,7 @@ class VersionControl:
|
|
|
519
524
|
self.repo_name,
|
|
520
525
|
rev_display,
|
|
521
526
|
)
|
|
522
|
-
self.update(dest, url, rev_options)
|
|
527
|
+
self.update(dest, url, rev_options, verbosity=verbosity)
|
|
523
528
|
else:
|
|
524
529
|
logger.info("Skipping because already up-to-date.")
|
|
525
530
|
return
|
|
@@ -574,7 +579,7 @@ class VersionControl:
|
|
|
574
579
|
url,
|
|
575
580
|
rev_display,
|
|
576
581
|
)
|
|
577
|
-
self.switch(dest, url, rev_options)
|
|
582
|
+
self.switch(dest, url, rev_options, verbosity=verbosity)
|
|
578
583
|
|
|
579
584
|
def unpack(self, location: str, url: HiddenText, verbosity: int) -> None:
|
|
580
585
|
"""
|
|
@@ -608,14 +613,14 @@ class VersionControl:
|
|
|
608
613
|
@classmethod
|
|
609
614
|
def run_command(
|
|
610
615
|
cls,
|
|
611
|
-
cmd:
|
|
616
|
+
cmd: list[str] | CommandArgs,
|
|
612
617
|
show_stdout: bool = True,
|
|
613
|
-
cwd:
|
|
614
|
-
on_returncode:
|
|
615
|
-
extra_ok_returncodes:
|
|
616
|
-
command_desc:
|
|
617
|
-
extra_environ:
|
|
618
|
-
spinner:
|
|
618
|
+
cwd: str | None = None,
|
|
619
|
+
on_returncode: Literal["raise", "warn", "ignore"] = "raise",
|
|
620
|
+
extra_ok_returncodes: Iterable[int] | None = None,
|
|
621
|
+
command_desc: str | None = None,
|
|
622
|
+
extra_environ: Mapping[str, Any] | None = None,
|
|
623
|
+
spinner: SpinnerInterface | None = None,
|
|
619
624
|
log_failed_cmd: bool = True,
|
|
620
625
|
stdout_only: bool = False,
|
|
621
626
|
) -> str:
|
|
@@ -672,7 +677,7 @@ class VersionControl:
|
|
|
672
677
|
return os.path.exists(os.path.join(path, cls.dirname))
|
|
673
678
|
|
|
674
679
|
@classmethod
|
|
675
|
-
def get_repository_root(cls, location: str) ->
|
|
680
|
+
def get_repository_root(cls, location: str) -> str | None:
|
|
676
681
|
"""
|
|
677
682
|
Return the "root" (top-level) directory controlled by the vcs,
|
|
678
683
|
or `None` if the directory is not in any.
|
pip/_internal/wheel_builder.py
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"""Orchestrator for building wheels from InstallRequirements."""
|
|
2
2
|
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
3
5
|
import logging
|
|
4
6
|
import os.path
|
|
5
7
|
import re
|
|
6
8
|
import shutil
|
|
7
|
-
from
|
|
9
|
+
from collections.abc import Iterable
|
|
8
10
|
|
|
9
11
|
from pip._vendor.packaging.utils import canonicalize_name, canonicalize_version
|
|
10
12
|
from pip._vendor.packaging.version import InvalidVersion, Version
|
|
@@ -30,7 +32,7 @@ logger = logging.getLogger(__name__)
|
|
|
30
32
|
|
|
31
33
|
_egg_info_re = re.compile(r"([a-z0-9_.]+)-([a-z0-9_.!+-]+)", re.IGNORECASE)
|
|
32
34
|
|
|
33
|
-
BuildResult =
|
|
35
|
+
BuildResult = tuple[list[InstallRequirement], list[InstallRequirement]]
|
|
34
36
|
|
|
35
37
|
|
|
36
38
|
def _contains_egg_info(s: str) -> bool:
|
|
@@ -67,7 +69,7 @@ def should_build_for_install_command(
|
|
|
67
69
|
|
|
68
70
|
def _should_cache(
|
|
69
71
|
req: InstallRequirement,
|
|
70
|
-
) ->
|
|
72
|
+
) -> bool | None:
|
|
71
73
|
"""
|
|
72
74
|
Return whether a built InstallRequirement can be stored in the persistent
|
|
73
75
|
wheel cache, assuming the wheel cache is available, and _should_build()
|
|
@@ -146,10 +148,10 @@ def _build_one(
|
|
|
146
148
|
req: InstallRequirement,
|
|
147
149
|
output_dir: str,
|
|
148
150
|
verify: bool,
|
|
149
|
-
build_options:
|
|
150
|
-
global_options:
|
|
151
|
+
build_options: list[str],
|
|
152
|
+
global_options: list[str],
|
|
151
153
|
editable: bool,
|
|
152
|
-
) ->
|
|
154
|
+
) -> str | None:
|
|
153
155
|
"""Build one wheel.
|
|
154
156
|
|
|
155
157
|
:return: The filename of the built wheel, or None if the build failed.
|
|
@@ -183,10 +185,10 @@ def _build_one(
|
|
|
183
185
|
def _build_one_inside_env(
|
|
184
186
|
req: InstallRequirement,
|
|
185
187
|
output_dir: str,
|
|
186
|
-
build_options:
|
|
187
|
-
global_options:
|
|
188
|
+
build_options: list[str],
|
|
189
|
+
global_options: list[str],
|
|
188
190
|
editable: bool,
|
|
189
|
-
) ->
|
|
191
|
+
) -> str | None:
|
|
190
192
|
with TempDirectory(kind="wheel") as temp_dir:
|
|
191
193
|
assert req.name
|
|
192
194
|
if req.use_pep517:
|
|
@@ -251,7 +253,7 @@ def _build_one_inside_env(
|
|
|
251
253
|
return None
|
|
252
254
|
|
|
253
255
|
|
|
254
|
-
def _clean_one_legacy(req: InstallRequirement, global_options:
|
|
256
|
+
def _clean_one_legacy(req: InstallRequirement, global_options: list[str]) -> bool:
|
|
255
257
|
clean_args = make_setuptools_clean_args(
|
|
256
258
|
req.setup_py_path,
|
|
257
259
|
global_options=global_options,
|
|
@@ -272,8 +274,8 @@ def build(
|
|
|
272
274
|
requirements: Iterable[InstallRequirement],
|
|
273
275
|
wheel_cache: WheelCache,
|
|
274
276
|
verify: bool,
|
|
275
|
-
build_options:
|
|
276
|
-
global_options:
|
|
277
|
+
build_options: list[str],
|
|
278
|
+
global_options: list[str],
|
|
277
279
|
) -> BuildResult:
|
|
278
280
|
"""Build wheels.
|
|
279
281
|
|
|
@@ -9,7 +9,7 @@ Make it easy to import from cachecontrol without long namespaces.
|
|
|
9
9
|
|
|
10
10
|
__author__ = "Eric Larson"
|
|
11
11
|
__email__ = "eric@ionrock.org"
|
|
12
|
-
__version__ = "0.14.
|
|
12
|
+
__version__ = "0.14.3"
|
|
13
13
|
|
|
14
14
|
from pip._vendor.cachecontrol.adapter import CacheControlAdapter
|
|
15
15
|
from pip._vendor.cachecontrol.controller import CacheController
|
pip/_vendor/certifi/__init__.py
CHANGED