pip 25.3__py3-none-any.whl → 26.0__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 +1 -1
- pip/_internal/build_env.py +194 -5
- pip/_internal/cli/base_command.py +11 -0
- pip/_internal/cli/cmdoptions.py +157 -0
- pip/_internal/cli/index_command.py +20 -0
- pip/_internal/cli/main.py +11 -6
- pip/_internal/cli/main_parser.py +3 -1
- pip/_internal/cli/parser.py +93 -33
- pip/_internal/cli/progress_bars.py +4 -2
- pip/_internal/cli/req_command.py +99 -23
- pip/_internal/commands/cache.py +24 -0
- pip/_internal/commands/completion.py +2 -1
- pip/_internal/commands/download.py +8 -4
- pip/_internal/commands/index.py +13 -6
- pip/_internal/commands/install.py +36 -29
- pip/_internal/commands/list.py +14 -16
- pip/_internal/commands/lock.py +16 -8
- pip/_internal/commands/wheel.py +8 -13
- pip/_internal/exceptions.py +76 -3
- pip/_internal/index/collector.py +2 -3
- pip/_internal/index/package_finder.py +84 -18
- pip/_internal/locations/__init__.py +1 -2
- pip/_internal/locations/_sysconfig.py +4 -1
- pip/_internal/models/link.py +18 -14
- pip/_internal/models/release_control.py +92 -0
- pip/_internal/models/selection_prefs.py +6 -3
- pip/_internal/network/auth.py +6 -2
- pip/_internal/network/download.py +4 -5
- pip/_internal/network/session.py +14 -10
- pip/_internal/operations/install/wheel.py +1 -2
- pip/_internal/operations/prepare.py +2 -3
- pip/_internal/req/constructors.py +3 -1
- pip/_internal/req/pep723.py +41 -0
- pip/_internal/req/req_file.py +10 -1
- pip/_internal/resolution/resolvelib/factory.py +12 -1
- pip/_internal/resolution/resolvelib/requirements.py +7 -3
- pip/_internal/self_outdated_check.py +6 -13
- pip/_internal/utils/datetime.py +18 -0
- pip/_internal/utils/filesystem.py +40 -1
- pip/_internal/utils/logging.py +34 -2
- pip/_internal/utils/misc.py +18 -12
- pip/_internal/utils/pylock.py +116 -0
- pip/_internal/utils/unpacking.py +1 -1
- pip/_internal/vcs/versioncontrol.py +3 -1
- pip/_vendor/cachecontrol/__init__.py +6 -3
- pip/_vendor/cachecontrol/adapter.py +0 -1
- pip/_vendor/cachecontrol/controller.py +1 -1
- pip/_vendor/cachecontrol/filewrapper.py +3 -1
- pip/_vendor/certifi/__init__.py +1 -1
- pip/_vendor/certifi/cacert.pem +0 -332
- pip/_vendor/idna/LICENSE.md +1 -1
- pip/_vendor/idna/codec.py +1 -1
- pip/_vendor/idna/core.py +1 -1
- pip/_vendor/idna/idnadata.py +72 -6
- pip/_vendor/idna/package_data.py +1 -1
- pip/_vendor/idna/uts46data.py +891 -731
- pip/_vendor/packaging/__init__.py +1 -1
- pip/_vendor/packaging/_elffile.py +0 -1
- pip/_vendor/packaging/_manylinux.py +36 -36
- pip/_vendor/packaging/_musllinux.py +1 -1
- pip/_vendor/packaging/_parser.py +22 -10
- pip/_vendor/packaging/_structures.py +8 -0
- pip/_vendor/packaging/_tokenizer.py +23 -25
- pip/_vendor/packaging/licenses/__init__.py +13 -11
- pip/_vendor/packaging/licenses/_spdx.py +41 -1
- pip/_vendor/packaging/markers.py +64 -38
- pip/_vendor/packaging/metadata.py +143 -27
- pip/_vendor/packaging/pylock.py +635 -0
- pip/_vendor/packaging/requirements.py +5 -10
- pip/_vendor/packaging/specifiers.py +219 -170
- pip/_vendor/packaging/tags.py +15 -20
- pip/_vendor/packaging/utils.py +19 -24
- pip/_vendor/packaging/version.py +315 -105
- pip/_vendor/platformdirs/version.py +2 -2
- pip/_vendor/platformdirs/windows.py +7 -1
- pip/_vendor/vendor.txt +5 -5
- {pip-25.3.dist-info → pip-26.0.dist-info}/METADATA +2 -2
- {pip-25.3.dist-info → pip-26.0.dist-info}/RECORD +103 -100
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/AUTHORS.txt +18 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/idna/LICENSE.md +1 -1
- pip/_internal/models/pylock.py +0 -188
- {pip-25.3.dist-info → pip-26.0.dist-info}/WHEEL +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/entry_points.txt +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/LICENSE.txt +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/certifi/LICENSE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/distlib/LICENSE.txt +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/distro/LICENSE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/msgpack/COPYING +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.APACHE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.BSD +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/pkg_resources/LICENSE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/platformdirs/LICENSE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/pygments/LICENSE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/requests/LICENSE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/resolvelib/LICENSE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/rich/LICENSE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/tomli/LICENSE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/tomli_w/LICENSE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/truststore/LICENSE +0 -0
- {pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/urllib3/LICENSE.txt +0 -0
pip/_internal/models/pylock.py
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import dataclasses
|
|
4
|
-
import re
|
|
5
|
-
from collections.abc import Iterable
|
|
6
|
-
from dataclasses import dataclass
|
|
7
|
-
from pathlib import Path
|
|
8
|
-
from typing import TYPE_CHECKING, Any
|
|
9
|
-
|
|
10
|
-
from pip._vendor import tomli_w
|
|
11
|
-
|
|
12
|
-
from pip._internal.models.direct_url import ArchiveInfo, DirInfo, VcsInfo
|
|
13
|
-
from pip._internal.models.link import Link
|
|
14
|
-
from pip._internal.req.req_install import InstallRequirement
|
|
15
|
-
from pip._internal.utils.urls import url_to_path
|
|
16
|
-
|
|
17
|
-
if TYPE_CHECKING:
|
|
18
|
-
from typing_extensions import Self
|
|
19
|
-
|
|
20
|
-
PYLOCK_FILE_NAME_RE = re.compile(r"^pylock\.([^.]+)\.toml$")
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def is_valid_pylock_file_name(path: Path) -> bool:
|
|
24
|
-
return path.name == "pylock.toml" or bool(re.match(PYLOCK_FILE_NAME_RE, path.name))
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def _toml_dict_factory(data: list[tuple[str, Any]]) -> dict[str, Any]:
|
|
28
|
-
return {key.replace("_", "-"): value for key, value in data if value is not None}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@dataclass
|
|
32
|
-
class PackageVcs:
|
|
33
|
-
type: str
|
|
34
|
-
url: str | None
|
|
35
|
-
# (not supported) path: Optional[str]
|
|
36
|
-
requested_revision: str | None
|
|
37
|
-
commit_id: str
|
|
38
|
-
subdirectory: str | None
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@dataclass
|
|
42
|
-
class PackageDirectory:
|
|
43
|
-
path: str
|
|
44
|
-
editable: bool | None
|
|
45
|
-
subdirectory: str | None
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
@dataclass
|
|
49
|
-
class PackageArchive:
|
|
50
|
-
url: str | None
|
|
51
|
-
# (not supported) path: Optional[str]
|
|
52
|
-
# (not supported) size: Optional[int]
|
|
53
|
-
# (not supported) upload_time: Optional[datetime]
|
|
54
|
-
hashes: dict[str, str]
|
|
55
|
-
subdirectory: str | None
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
@dataclass
|
|
59
|
-
class PackageSdist:
|
|
60
|
-
name: str
|
|
61
|
-
# (not supported) upload_time: Optional[datetime]
|
|
62
|
-
url: str | None
|
|
63
|
-
# (not supported) path: Optional[str]
|
|
64
|
-
# (not supported) size: Optional[int]
|
|
65
|
-
hashes: dict[str, str]
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
@dataclass
|
|
69
|
-
class PackageWheel:
|
|
70
|
-
name: str
|
|
71
|
-
# (not supported) upload_time: Optional[datetime]
|
|
72
|
-
url: str | None
|
|
73
|
-
# (not supported) path: Optional[str]
|
|
74
|
-
# (not supported) size: Optional[int]
|
|
75
|
-
hashes: dict[str, str]
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
@dataclass
|
|
79
|
-
class Package:
|
|
80
|
-
name: str
|
|
81
|
-
version: str | None = None
|
|
82
|
-
# (not supported) marker: Optional[str]
|
|
83
|
-
# (not supported) requires_python: Optional[str]
|
|
84
|
-
# (not supported) dependencies
|
|
85
|
-
vcs: PackageVcs | None = None
|
|
86
|
-
directory: PackageDirectory | None = None
|
|
87
|
-
archive: PackageArchive | None = None
|
|
88
|
-
# (not supported) index: Optional[str]
|
|
89
|
-
sdist: PackageSdist | None = None
|
|
90
|
-
wheels: list[PackageWheel] | None = None
|
|
91
|
-
# (not supported) attestation_identities: Optional[List[Dict[str, Any]]]
|
|
92
|
-
# (not supported) tool: Optional[Dict[str, Any]]
|
|
93
|
-
|
|
94
|
-
@classmethod
|
|
95
|
-
def from_install_requirement(cls, ireq: InstallRequirement, base_dir: Path) -> Self:
|
|
96
|
-
base_dir = base_dir.resolve()
|
|
97
|
-
dist = ireq.get_dist()
|
|
98
|
-
download_info = ireq.download_info
|
|
99
|
-
assert download_info
|
|
100
|
-
package = cls(name=dist.canonical_name)
|
|
101
|
-
if ireq.is_direct:
|
|
102
|
-
if isinstance(download_info.info, VcsInfo):
|
|
103
|
-
package.vcs = PackageVcs(
|
|
104
|
-
type=download_info.info.vcs,
|
|
105
|
-
url=download_info.url,
|
|
106
|
-
requested_revision=download_info.info.requested_revision,
|
|
107
|
-
commit_id=download_info.info.commit_id,
|
|
108
|
-
subdirectory=download_info.subdirectory,
|
|
109
|
-
)
|
|
110
|
-
elif isinstance(download_info.info, DirInfo):
|
|
111
|
-
package.directory = PackageDirectory(
|
|
112
|
-
path=(
|
|
113
|
-
Path(url_to_path(download_info.url))
|
|
114
|
-
.resolve()
|
|
115
|
-
.relative_to(base_dir)
|
|
116
|
-
.as_posix()
|
|
117
|
-
),
|
|
118
|
-
editable=(
|
|
119
|
-
download_info.info.editable
|
|
120
|
-
if download_info.info.editable
|
|
121
|
-
else None
|
|
122
|
-
),
|
|
123
|
-
subdirectory=download_info.subdirectory,
|
|
124
|
-
)
|
|
125
|
-
elif isinstance(download_info.info, ArchiveInfo):
|
|
126
|
-
if not download_info.info.hashes:
|
|
127
|
-
raise NotImplementedError()
|
|
128
|
-
package.archive = PackageArchive(
|
|
129
|
-
url=download_info.url,
|
|
130
|
-
hashes=download_info.info.hashes,
|
|
131
|
-
subdirectory=download_info.subdirectory,
|
|
132
|
-
)
|
|
133
|
-
else:
|
|
134
|
-
# should never happen
|
|
135
|
-
raise NotImplementedError()
|
|
136
|
-
else:
|
|
137
|
-
package.version = str(dist.version)
|
|
138
|
-
if isinstance(download_info.info, ArchiveInfo):
|
|
139
|
-
if not download_info.info.hashes:
|
|
140
|
-
raise NotImplementedError()
|
|
141
|
-
link = Link(download_info.url)
|
|
142
|
-
if link.is_wheel:
|
|
143
|
-
package.wheels = [
|
|
144
|
-
PackageWheel(
|
|
145
|
-
name=link.filename,
|
|
146
|
-
url=download_info.url,
|
|
147
|
-
hashes=download_info.info.hashes,
|
|
148
|
-
)
|
|
149
|
-
]
|
|
150
|
-
else:
|
|
151
|
-
package.sdist = PackageSdist(
|
|
152
|
-
name=link.filename,
|
|
153
|
-
url=download_info.url,
|
|
154
|
-
hashes=download_info.info.hashes,
|
|
155
|
-
)
|
|
156
|
-
else:
|
|
157
|
-
# should never happen
|
|
158
|
-
raise NotImplementedError()
|
|
159
|
-
return package
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
@dataclass
|
|
163
|
-
class Pylock:
|
|
164
|
-
lock_version: str = "1.0"
|
|
165
|
-
# (not supported) environments: Optional[List[str]]
|
|
166
|
-
# (not supported) requires_python: Optional[str]
|
|
167
|
-
# (not supported) extras: List[str] = []
|
|
168
|
-
# (not supported) dependency_groups: List[str] = []
|
|
169
|
-
created_by: str = "pip"
|
|
170
|
-
packages: list[Package] = dataclasses.field(default_factory=list)
|
|
171
|
-
# (not supported) tool: Optional[Dict[str, Any]]
|
|
172
|
-
|
|
173
|
-
def as_toml(self) -> str:
|
|
174
|
-
return tomli_w.dumps(dataclasses.asdict(self, dict_factory=_toml_dict_factory))
|
|
175
|
-
|
|
176
|
-
@classmethod
|
|
177
|
-
def from_install_requirements(
|
|
178
|
-
cls, install_requirements: Iterable[InstallRequirement], base_dir: Path
|
|
179
|
-
) -> Self:
|
|
180
|
-
return cls(
|
|
181
|
-
packages=sorted(
|
|
182
|
-
(
|
|
183
|
-
Package.from_install_requirement(ireq, base_dir)
|
|
184
|
-
for ireq in install_requirements
|
|
185
|
-
),
|
|
186
|
-
key=lambda p: p.name,
|
|
187
|
-
)
|
|
188
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pip-25.3.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|