pip 25.2__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/__init__.py +0 -0
- pip/_internal/build_env.py +265 -8
- pip/_internal/cache.py +1 -1
- pip/_internal/cli/base_command.py +11 -0
- pip/_internal/cli/cmdoptions.py +200 -71
- 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 +96 -36
- pip/_internal/cli/progress_bars.py +4 -2
- pip/_internal/cli/req_command.py +126 -30
- pip/_internal/commands/cache.py +24 -0
- pip/_internal/commands/completion.py +2 -1
- pip/_internal/commands/download.py +12 -11
- pip/_internal/commands/index.py +13 -6
- pip/_internal/commands/install.py +55 -43
- pip/_internal/commands/list.py +14 -16
- pip/_internal/commands/lock.py +19 -14
- pip/_internal/commands/wheel.py +13 -23
- pip/_internal/configuration.py +1 -2
- pip/_internal/distributions/sdist.py +13 -14
- pip/_internal/exceptions.py +96 -6
- pip/_internal/index/collector.py +2 -3
- pip/_internal/index/package_finder.py +87 -21
- pip/_internal/locations/__init__.py +1 -2
- pip/_internal/locations/_sysconfig.py +4 -1
- pip/_internal/metadata/__init__.py +7 -2
- pip/_internal/metadata/importlib/_dists.py +8 -2
- 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/models/wheel.py +5 -66
- pip/_internal/network/auth.py +6 -2
- pip/_internal/network/cache.py +6 -11
- pip/_internal/network/download.py +4 -5
- pip/_internal/network/lazy_wheel.py +5 -3
- pip/_internal/network/session.py +14 -10
- pip/_internal/operations/build/wheel.py +4 -4
- pip/_internal/operations/build/wheel_editable.py +4 -4
- pip/_internal/operations/install/wheel.py +1 -2
- pip/_internal/operations/prepare.py +9 -4
- pip/_internal/pyproject.py +2 -61
- pip/_internal/req/__init__.py +1 -3
- pip/_internal/req/constructors.py +45 -39
- pip/_internal/req/pep723.py +41 -0
- pip/_internal/req/req_file.py +10 -2
- pip/_internal/req/req_install.py +32 -141
- pip/_internal/resolution/resolvelib/candidates.py +20 -11
- pip/_internal/resolution/resolvelib/factory.py +43 -1
- pip/_internal/resolution/resolvelib/provider.py +9 -0
- pip/_internal/resolution/resolvelib/reporter.py +21 -8
- pip/_internal/resolution/resolvelib/requirements.py +7 -3
- pip/_internal/resolution/resolvelib/resolver.py +2 -6
- pip/_internal/self_outdated_check.py +17 -16
- pip/_internal/utils/datetime.py +18 -0
- pip/_internal/utils/filesystem.py +52 -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 +26 -1
- pip/_internal/vcs/versioncontrol.py +3 -1
- pip/_internal/wheel_builder.py +23 -96
- pip/_vendor/README.rst +180 -0
- pip/_vendor/cachecontrol/LICENSE.txt +13 -0
- 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/LICENSE +20 -0
- pip/_vendor/certifi/__init__.py +1 -1
- pip/_vendor/certifi/cacert.pem +62 -372
- pip/_vendor/dependency_groups/LICENSE.txt +9 -0
- pip/_vendor/distlib/LICENSE.txt +284 -0
- pip/_vendor/distro/LICENSE +202 -0
- pip/_vendor/idna/LICENSE.md +31 -0
- 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/msgpack/COPYING +14 -0
- pip/_vendor/msgpack/__init__.py +2 -2
- pip/_vendor/packaging/LICENSE +3 -0
- pip/_vendor/packaging/LICENSE.APACHE +177 -0
- pip/_vendor/packaging/LICENSE.BSD +23 -0
- 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/pkg_resources/LICENSE +17 -0
- pip/_vendor/platformdirs/LICENSE +21 -0
- pip/_vendor/platformdirs/api.py +1 -1
- pip/_vendor/platformdirs/macos.py +10 -8
- pip/_vendor/platformdirs/version.py +16 -3
- pip/_vendor/platformdirs/windows.py +7 -1
- pip/_vendor/pygments/LICENSE +25 -0
- pip/_vendor/pyproject_hooks/LICENSE +21 -0
- pip/_vendor/requests/LICENSE +175 -0
- pip/_vendor/requests/__version__.py +2 -2
- pip/_vendor/requests/adapters.py +17 -40
- pip/_vendor/requests/sessions.py +1 -1
- pip/_vendor/resolvelib/LICENSE +13 -0
- pip/_vendor/resolvelib/__init__.py +1 -1
- pip/_vendor/resolvelib/resolvers/abstract.py +3 -3
- pip/_vendor/resolvelib/resolvers/resolution.py +5 -0
- pip/_vendor/rich/LICENSE +19 -0
- pip/_vendor/rich/style.py +7 -11
- pip/_vendor/tomli/LICENSE +21 -0
- pip/_vendor/tomli/__init__.py +1 -1
- pip/_vendor/tomli/_parser.py +28 -21
- pip/_vendor/tomli/_re.py +8 -5
- pip/_vendor/tomli_w/LICENSE +21 -0
- pip/_vendor/truststore/LICENSE +21 -0
- pip/_vendor/truststore/__init__.py +1 -1
- pip/_vendor/truststore/_api.py +14 -6
- pip/_vendor/truststore/_openssl.py +3 -1
- pip/_vendor/urllib3/LICENSE.txt +21 -0
- pip/_vendor/vendor.txt +11 -11
- {pip-25.2.dist-info → pip-26.0.dist-info}/METADATA +10 -11
- {pip-25.2.dist-info → pip-26.0.dist-info}/RECORD +158 -139
- {pip-25.2.dist-info → pip-26.0.dist-info}/WHEEL +1 -2
- pip-26.0.dist-info/entry_points.txt +4 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/AUTHORS.txt +27 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/idna/LICENSE.md +1 -1
- pip/_internal/models/pylock.py +0 -188
- pip/_internal/operations/build/metadata_legacy.py +0 -73
- pip/_internal/operations/build/wheel_legacy.py +0 -119
- pip/_internal/operations/install/editable_legacy.py +0 -48
- pip/_internal/utils/setuptools_build.py +0 -149
- pip-25.2.dist-info/entry_points.txt +0 -3
- pip-25.2.dist-info/licenses/src/pip/_vendor/tomli/LICENSE-HEADER +0 -3
- pip-25.2.dist-info/top_level.txt +0 -1
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/LICENSE.txt +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/certifi/LICENSE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/distlib/LICENSE.txt +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/distro/LICENSE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/msgpack/COPYING +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.APACHE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.BSD +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/pkg_resources/LICENSE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/platformdirs/LICENSE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/pygments/LICENSE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/requests/LICENSE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/resolvelib/LICENSE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/rich/LICENSE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/tomli/LICENSE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/tomli_w/LICENSE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/truststore/LICENSE +0 -0
- {pip-25.2.dist-info → pip-26.0.dist-info}/licenses/src/pip/_vendor/urllib3/LICENSE.txt +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Copyright (C) 2008-2011 INADA Naoki <songofacandy@gmail.com>
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
14
|
+
|
pip/_vendor/msgpack/__init__.py
CHANGED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Copyright (c) Donald Stufft and individual contributors.
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
|
6
|
+
|
|
7
|
+
1. Redistributions of source code must retain the above copyright notice,
|
|
8
|
+
this list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
11
|
+
notice, this list of conditions and the following disclaimer in the
|
|
12
|
+
documentation and/or other materials provided with the distribution.
|
|
13
|
+
|
|
14
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
15
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
16
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
17
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
18
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
19
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
20
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
21
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
22
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
23
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -6,7 +6,7 @@ __title__ = "packaging"
|
|
|
6
6
|
__summary__ = "Core utilities for Python packages"
|
|
7
7
|
__uri__ = "https://github.com/pypa/packaging"
|
|
8
8
|
|
|
9
|
-
__version__ = "
|
|
9
|
+
__version__ = "26.0"
|
|
10
10
|
|
|
11
11
|
__author__ = "Donald Stufft and individual contributors"
|
|
12
12
|
__email__ = "donald@stufft.io"
|
|
@@ -4,7 +4,6 @@ ELF file parser.
|
|
|
4
4
|
This provides a class ``ELFFile`` that parses an ELF executable in a similar
|
|
5
5
|
interface to ``ZipFile``. Only the read interface is implemented.
|
|
6
6
|
|
|
7
|
-
Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
|
|
8
7
|
ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
|
|
9
8
|
"""
|
|
10
9
|
|
|
@@ -15,6 +15,16 @@ EF_ARM_ABIMASK = 0xFF000000
|
|
|
15
15
|
EF_ARM_ABI_VER5 = 0x05000000
|
|
16
16
|
EF_ARM_ABI_FLOAT_HARD = 0x00000400
|
|
17
17
|
|
|
18
|
+
_ALLOWED_ARCHS = {
|
|
19
|
+
"x86_64",
|
|
20
|
+
"aarch64",
|
|
21
|
+
"ppc64",
|
|
22
|
+
"ppc64le",
|
|
23
|
+
"s390x",
|
|
24
|
+
"loongarch64",
|
|
25
|
+
"riscv64",
|
|
26
|
+
}
|
|
27
|
+
|
|
18
28
|
|
|
19
29
|
# `os.PathLike` not a generic type until Python 3.9, so sticking with `str`
|
|
20
30
|
# as the type for `path` until then.
|
|
@@ -57,16 +67,7 @@ def _have_compatible_abi(executable: str, archs: Sequence[str]) -> bool:
|
|
|
57
67
|
return _is_linux_armhf(executable)
|
|
58
68
|
if "i686" in archs:
|
|
59
69
|
return _is_linux_i686(executable)
|
|
60
|
-
|
|
61
|
-
"x86_64",
|
|
62
|
-
"aarch64",
|
|
63
|
-
"ppc64",
|
|
64
|
-
"ppc64le",
|
|
65
|
-
"s390x",
|
|
66
|
-
"loongarch64",
|
|
67
|
-
"riscv64",
|
|
68
|
-
}
|
|
69
|
-
return any(arch in allowed_archs for arch in archs)
|
|
70
|
+
return any(arch in _ALLOWED_ARCHS for arch in archs)
|
|
70
71
|
|
|
71
72
|
|
|
72
73
|
# If glibc ever changes its major version, we need to know what the last
|
|
@@ -106,7 +107,7 @@ def _glibc_version_string_ctypes() -> str | None:
|
|
|
106
107
|
Fallback implementation of glibc_version_string using ctypes.
|
|
107
108
|
"""
|
|
108
109
|
try:
|
|
109
|
-
import ctypes
|
|
110
|
+
import ctypes # noqa: PLC0415
|
|
110
111
|
except ImportError:
|
|
111
112
|
return None
|
|
112
113
|
|
|
@@ -150,7 +151,7 @@ def _glibc_version_string() -> str | None:
|
|
|
150
151
|
return _glibc_version_string_confstr() or _glibc_version_string_ctypes()
|
|
151
152
|
|
|
152
153
|
|
|
153
|
-
def _parse_glibc_version(version_str: str) ->
|
|
154
|
+
def _parse_glibc_version(version_str: str) -> _GLibCVersion:
|
|
154
155
|
"""Parse glibc version.
|
|
155
156
|
|
|
156
157
|
We use a regexp instead of str.split because we want to discard any
|
|
@@ -165,15 +166,15 @@ def _parse_glibc_version(version_str: str) -> tuple[int, int]:
|
|
|
165
166
|
RuntimeWarning,
|
|
166
167
|
stacklevel=2,
|
|
167
168
|
)
|
|
168
|
-
return -1, -1
|
|
169
|
-
return int(m.group("major")), int(m.group("minor"))
|
|
169
|
+
return _GLibCVersion(-1, -1)
|
|
170
|
+
return _GLibCVersion(int(m.group("major")), int(m.group("minor")))
|
|
170
171
|
|
|
171
172
|
|
|
172
173
|
@functools.lru_cache
|
|
173
|
-
def _get_glibc_version() ->
|
|
174
|
+
def _get_glibc_version() -> _GLibCVersion:
|
|
174
175
|
version_str = _glibc_version_string()
|
|
175
176
|
if version_str is None:
|
|
176
|
-
return (-1, -1)
|
|
177
|
+
return _GLibCVersion(-1, -1)
|
|
177
178
|
return _parse_glibc_version(version_str)
|
|
178
179
|
|
|
179
180
|
|
|
@@ -184,7 +185,7 @@ def _is_compatible(arch: str, version: _GLibCVersion) -> bool:
|
|
|
184
185
|
return False
|
|
185
186
|
# Check for presence of _manylinux module.
|
|
186
187
|
try:
|
|
187
|
-
import _manylinux
|
|
188
|
+
import _manylinux # noqa: PLC0415
|
|
188
189
|
except ImportError:
|
|
189
190
|
return True
|
|
190
191
|
if hasattr(_manylinux, "manylinux_compatible"):
|
|
@@ -192,25 +193,26 @@ def _is_compatible(arch: str, version: _GLibCVersion) -> bool:
|
|
|
192
193
|
if result is not None:
|
|
193
194
|
return bool(result)
|
|
194
195
|
return True
|
|
195
|
-
if version == _GLibCVersion(2, 5):
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
if version == _GLibCVersion(2, 17)
|
|
202
|
-
|
|
203
|
-
|
|
196
|
+
if version == _GLibCVersion(2, 5) and hasattr(_manylinux, "manylinux1_compatible"):
|
|
197
|
+
return bool(_manylinux.manylinux1_compatible)
|
|
198
|
+
if version == _GLibCVersion(2, 12) and hasattr(
|
|
199
|
+
_manylinux, "manylinux2010_compatible"
|
|
200
|
+
):
|
|
201
|
+
return bool(_manylinux.manylinux2010_compatible)
|
|
202
|
+
if version == _GLibCVersion(2, 17) and hasattr(
|
|
203
|
+
_manylinux, "manylinux2014_compatible"
|
|
204
|
+
):
|
|
205
|
+
return bool(_manylinux.manylinux2014_compatible)
|
|
204
206
|
return True
|
|
205
207
|
|
|
206
208
|
|
|
207
|
-
_LEGACY_MANYLINUX_MAP = {
|
|
209
|
+
_LEGACY_MANYLINUX_MAP: dict[_GLibCVersion, str] = {
|
|
208
210
|
# CentOS 7 w/ glibc 2.17 (PEP 599)
|
|
209
|
-
(2, 17): "manylinux2014",
|
|
211
|
+
_GLibCVersion(2, 17): "manylinux2014",
|
|
210
212
|
# CentOS 6 w/ glibc 2.12 (PEP 571)
|
|
211
|
-
(2, 12): "manylinux2010",
|
|
213
|
+
_GLibCVersion(2, 12): "manylinux2010",
|
|
212
214
|
# CentOS 5 w/ glibc 2.5 (PEP 513)
|
|
213
|
-
(2, 5): "manylinux1",
|
|
215
|
+
_GLibCVersion(2, 5): "manylinux1",
|
|
214
216
|
}
|
|
215
217
|
|
|
216
218
|
|
|
@@ -252,11 +254,9 @@ def platform_tags(archs: Sequence[str]) -> Iterator[str]:
|
|
|
252
254
|
min_minor = -1
|
|
253
255
|
for glibc_minor in range(glibc_max.minor, min_minor, -1):
|
|
254
256
|
glibc_version = _GLibCVersion(glibc_max.major, glibc_minor)
|
|
255
|
-
tag = "manylinux_{}_{}".format(*glibc_version)
|
|
256
257
|
if _is_compatible(arch, glibc_version):
|
|
257
|
-
yield
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
legacy_tag
|
|
261
|
-
if _is_compatible(arch, glibc_version):
|
|
258
|
+
yield "manylinux_{}_{}_{}".format(*glibc_version, arch)
|
|
259
|
+
|
|
260
|
+
# Handle the legacy manylinux1, manylinux2010, manylinux2014 tags.
|
|
261
|
+
if legacy_tag := _LEGACY_MANYLINUX_MAP.get(glibc_version):
|
|
262
262
|
yield f"{legacy_tag}_{arch}"
|
|
@@ -49,7 +49,7 @@ def _get_musl_version(executable: str) -> _MuslVersion | None:
|
|
|
49
49
|
return None
|
|
50
50
|
if ld is None or "musl" not in ld:
|
|
51
51
|
return None
|
|
52
|
-
proc = subprocess.run([ld], stderr=subprocess.PIPE, text=True)
|
|
52
|
+
proc = subprocess.run([ld], check=False, stderr=subprocess.PIPE, text=True)
|
|
53
53
|
return _parse_musl_version(proc.stderr)
|
|
54
54
|
|
|
55
55
|
|
pip/_vendor/packaging/_parser.py
CHANGED
|
@@ -7,12 +7,14 @@ the implementation.
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
9
|
import ast
|
|
10
|
-
from typing import NamedTuple, Sequence, Tuple, Union
|
|
10
|
+
from typing import List, Literal, NamedTuple, Sequence, Tuple, Union
|
|
11
11
|
|
|
12
12
|
from ._tokenizer import DEFAULT_RULES, Tokenizer
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class Node:
|
|
16
|
+
__slots__ = ("value",)
|
|
17
|
+
|
|
16
18
|
def __init__(self, value: str) -> None:
|
|
17
19
|
self.value = value
|
|
18
20
|
|
|
@@ -20,31 +22,38 @@ class Node:
|
|
|
20
22
|
return self.value
|
|
21
23
|
|
|
22
24
|
def __repr__(self) -> str:
|
|
23
|
-
return f"<{self.__class__.__name__}(
|
|
25
|
+
return f"<{self.__class__.__name__}({self.value!r})>"
|
|
24
26
|
|
|
25
27
|
def serialize(self) -> str:
|
|
26
28
|
raise NotImplementedError
|
|
27
29
|
|
|
28
30
|
|
|
29
31
|
class Variable(Node):
|
|
32
|
+
__slots__ = ()
|
|
33
|
+
|
|
30
34
|
def serialize(self) -> str:
|
|
31
35
|
return str(self)
|
|
32
36
|
|
|
33
37
|
|
|
34
38
|
class Value(Node):
|
|
39
|
+
__slots__ = ()
|
|
40
|
+
|
|
35
41
|
def serialize(self) -> str:
|
|
36
42
|
return f'"{self}"'
|
|
37
43
|
|
|
38
44
|
|
|
39
45
|
class Op(Node):
|
|
46
|
+
__slots__ = ()
|
|
47
|
+
|
|
40
48
|
def serialize(self) -> str:
|
|
41
49
|
return str(self)
|
|
42
50
|
|
|
43
51
|
|
|
52
|
+
MarkerLogical = Literal["and", "or"]
|
|
44
53
|
MarkerVar = Union[Variable, Value]
|
|
45
54
|
MarkerItem = Tuple[MarkerVar, Op, MarkerVar]
|
|
46
55
|
MarkerAtom = Union[MarkerItem, Sequence["MarkerAtom"]]
|
|
47
|
-
MarkerList =
|
|
56
|
+
MarkerList = List[Union["MarkerList", MarkerAtom, MarkerLogical]]
|
|
48
57
|
|
|
49
58
|
|
|
50
59
|
class ParsedRequirement(NamedTuple):
|
|
@@ -111,7 +120,9 @@ def _parse_requirement_details(
|
|
|
111
120
|
return (url, specifier, marker)
|
|
112
121
|
|
|
113
122
|
marker = _parse_requirement_marker(
|
|
114
|
-
tokenizer,
|
|
123
|
+
tokenizer,
|
|
124
|
+
span_start=url_start,
|
|
125
|
+
expected="semicolon (after URL and whitespace)",
|
|
115
126
|
)
|
|
116
127
|
else:
|
|
117
128
|
specifier_start = tokenizer.position
|
|
@@ -124,10 +135,10 @@ def _parse_requirement_details(
|
|
|
124
135
|
marker = _parse_requirement_marker(
|
|
125
136
|
tokenizer,
|
|
126
137
|
span_start=specifier_start,
|
|
127
|
-
|
|
128
|
-
"version specifier"
|
|
138
|
+
expected=(
|
|
139
|
+
"comma (within version specifier), semicolon (after version specifier)"
|
|
129
140
|
if specifier
|
|
130
|
-
else "name
|
|
141
|
+
else "semicolon (after name with no version specifier)"
|
|
131
142
|
),
|
|
132
143
|
)
|
|
133
144
|
|
|
@@ -135,7 +146,7 @@ def _parse_requirement_details(
|
|
|
135
146
|
|
|
136
147
|
|
|
137
148
|
def _parse_requirement_marker(
|
|
138
|
-
tokenizer: Tokenizer, *, span_start: int,
|
|
149
|
+
tokenizer: Tokenizer, *, span_start: int, expected: str
|
|
139
150
|
) -> MarkerList:
|
|
140
151
|
"""
|
|
141
152
|
requirement_marker = SEMICOLON marker WS?
|
|
@@ -143,8 +154,9 @@ def _parse_requirement_marker(
|
|
|
143
154
|
|
|
144
155
|
if not tokenizer.check("SEMICOLON"):
|
|
145
156
|
tokenizer.raise_syntax_error(
|
|
146
|
-
f"Expected
|
|
157
|
+
f"Expected {expected} or end",
|
|
147
158
|
span_start=span_start,
|
|
159
|
+
span_end=None,
|
|
148
160
|
)
|
|
149
161
|
tokenizer.read()
|
|
150
162
|
|
|
@@ -307,7 +319,7 @@ def _parse_marker_item(tokenizer: Tokenizer) -> MarkerItem:
|
|
|
307
319
|
return (marker_var_left, marker_op, marker_var_right)
|
|
308
320
|
|
|
309
321
|
|
|
310
|
-
def _parse_marker_var(tokenizer: Tokenizer) -> MarkerVar:
|
|
322
|
+
def _parse_marker_var(tokenizer: Tokenizer) -> MarkerVar: # noqa: RET503
|
|
311
323
|
"""
|
|
312
324
|
marker_var = VARIABLE | QUOTED_STRING
|
|
313
325
|
"""
|
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
|
|
3
3
|
# for complete details.
|
|
4
4
|
|
|
5
|
+
import typing
|
|
5
6
|
|
|
7
|
+
|
|
8
|
+
@typing.final
|
|
6
9
|
class InfinityType:
|
|
10
|
+
__slots__ = ()
|
|
11
|
+
|
|
7
12
|
def __repr__(self) -> str:
|
|
8
13
|
return "Infinity"
|
|
9
14
|
|
|
@@ -32,7 +37,10 @@ class InfinityType:
|
|
|
32
37
|
Infinity = InfinityType()
|
|
33
38
|
|
|
34
39
|
|
|
40
|
+
@typing.final
|
|
35
41
|
class NegativeInfinityType:
|
|
42
|
+
__slots__ = ()
|
|
43
|
+
|
|
36
44
|
def __repr__(self) -> str:
|
|
37
45
|
return "-Infinity"
|
|
38
46
|
|
|
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import contextlib
|
|
4
4
|
import re
|
|
5
5
|
from dataclasses import dataclass
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import Generator, Mapping, NoReturn
|
|
7
7
|
|
|
8
8
|
from .specifiers import Specifier
|
|
9
9
|
|
|
@@ -33,16 +33,16 @@ class ParserSyntaxError(Exception):
|
|
|
33
33
|
|
|
34
34
|
def __str__(self) -> str:
|
|
35
35
|
marker = " " * self.span[0] + "~" * (self.span[1] - self.span[0]) + "^"
|
|
36
|
-
return "\n
|
|
36
|
+
return f"{self.message}\n {self.source}\n {marker}"
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
DEFAULT_RULES: dict[str,
|
|
40
|
-
"LEFT_PARENTHESIS": r"\(",
|
|
41
|
-
"RIGHT_PARENTHESIS": r"\)",
|
|
42
|
-
"LEFT_BRACKET": r"\[",
|
|
43
|
-
"RIGHT_BRACKET": r"\]",
|
|
44
|
-
"SEMICOLON": r";",
|
|
45
|
-
"COMMA": r",",
|
|
39
|
+
DEFAULT_RULES: dict[str, re.Pattern[str]] = {
|
|
40
|
+
"LEFT_PARENTHESIS": re.compile(r"\("),
|
|
41
|
+
"RIGHT_PARENTHESIS": re.compile(r"\)"),
|
|
42
|
+
"LEFT_BRACKET": re.compile(r"\["),
|
|
43
|
+
"RIGHT_BRACKET": re.compile(r"\]"),
|
|
44
|
+
"SEMICOLON": re.compile(r";"),
|
|
45
|
+
"COMMA": re.compile(r","),
|
|
46
46
|
"QUOTED_STRING": re.compile(
|
|
47
47
|
r"""
|
|
48
48
|
(
|
|
@@ -53,10 +53,10 @@ DEFAULT_RULES: dict[str, str | re.Pattern[str]] = {
|
|
|
53
53
|
""",
|
|
54
54
|
re.VERBOSE,
|
|
55
55
|
),
|
|
56
|
-
"OP": r"(===|==|~=|!=|<=|>=|<|>)",
|
|
57
|
-
"BOOLOP": r"\b(or|and)\b",
|
|
58
|
-
"IN": r"\bin\b",
|
|
59
|
-
"NOT": r"\bnot\b",
|
|
56
|
+
"OP": re.compile(r"(===|==|~=|!=|<=|>=|<|>)"),
|
|
57
|
+
"BOOLOP": re.compile(r"\b(or|and)\b"),
|
|
58
|
+
"IN": re.compile(r"\bin\b"),
|
|
59
|
+
"NOT": re.compile(r"\bnot\b"),
|
|
60
60
|
"VARIABLE": re.compile(
|
|
61
61
|
r"""
|
|
62
62
|
\b(
|
|
@@ -78,13 +78,13 @@ DEFAULT_RULES: dict[str, str | re.Pattern[str]] = {
|
|
|
78
78
|
Specifier._operator_regex_str + Specifier._version_regex_str,
|
|
79
79
|
re.VERBOSE | re.IGNORECASE,
|
|
80
80
|
),
|
|
81
|
-
"AT": r"\@",
|
|
82
|
-
"URL": r"[^ \t]+",
|
|
83
|
-
"IDENTIFIER": r"\b[a-zA-Z0-9][a-zA-Z0-9._-]*\b",
|
|
84
|
-
"VERSION_PREFIX_TRAIL": r"\.\*",
|
|
85
|
-
"VERSION_LOCAL_LABEL_TRAIL": r"\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*",
|
|
86
|
-
"WS": r"[ \t]+",
|
|
87
|
-
"END": r"$",
|
|
81
|
+
"AT": re.compile(r"\@"),
|
|
82
|
+
"URL": re.compile(r"[^ \t]+"),
|
|
83
|
+
"IDENTIFIER": re.compile(r"\b[a-zA-Z0-9][a-zA-Z0-9._-]*\b"),
|
|
84
|
+
"VERSION_PREFIX_TRAIL": re.compile(r"\.\*"),
|
|
85
|
+
"VERSION_LOCAL_LABEL_TRAIL": re.compile(r"\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*"),
|
|
86
|
+
"WS": re.compile(r"[ \t]+"),
|
|
87
|
+
"END": re.compile(r"$"),
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
|
|
@@ -99,12 +99,10 @@ class Tokenizer:
|
|
|
99
99
|
self,
|
|
100
100
|
source: str,
|
|
101
101
|
*,
|
|
102
|
-
rules:
|
|
102
|
+
rules: Mapping[str, re.Pattern[str]],
|
|
103
103
|
) -> None:
|
|
104
104
|
self.source = source
|
|
105
|
-
self.rules
|
|
106
|
-
name: re.compile(pattern) for name, pattern in rules.items()
|
|
107
|
-
}
|
|
105
|
+
self.rules = rules
|
|
108
106
|
self.next_token: Token | None = None
|
|
109
107
|
self.position = 0
|
|
110
108
|
|
|
@@ -174,7 +172,7 @@ class Tokenizer:
|
|
|
174
172
|
@contextlib.contextmanager
|
|
175
173
|
def enclosing_tokens(
|
|
176
174
|
self, open_token: str, close_token: str, *, around: str
|
|
177
|
-
) ->
|
|
175
|
+
) -> Generator[None, None, None]:
|
|
178
176
|
if self.check(open_token):
|
|
179
177
|
open_position = self.position
|
|
180
178
|
self.read()
|