pip 25.1.1__py3-none-any.whl → 25.3__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.
Files changed (236) hide show
  1. pip/__init__.py +3 -3
  2. pip/_internal/__init__.py +2 -2
  3. pip/_internal/build_env.py +186 -94
  4. pip/_internal/cache.py +17 -15
  5. pip/_internal/cli/autocompletion.py +13 -4
  6. pip/_internal/cli/base_command.py +18 -7
  7. pip/_internal/cli/cmdoptions.py +57 -80
  8. pip/_internal/cli/command_context.py +4 -3
  9. pip/_internal/cli/index_command.py +11 -9
  10. pip/_internal/cli/main.py +3 -2
  11. pip/_internal/cli/main_parser.py +4 -3
  12. pip/_internal/cli/parser.py +24 -20
  13. pip/_internal/cli/progress_bars.py +19 -12
  14. pip/_internal/cli/req_command.py +57 -33
  15. pip/_internal/cli/spinners.py +81 -5
  16. pip/_internal/commands/__init__.py +5 -3
  17. pip/_internal/commands/cache.py +18 -15
  18. pip/_internal/commands/check.py +1 -2
  19. pip/_internal/commands/completion.py +1 -2
  20. pip/_internal/commands/configuration.py +26 -18
  21. pip/_internal/commands/debug.py +8 -6
  22. pip/_internal/commands/download.py +6 -10
  23. pip/_internal/commands/freeze.py +2 -3
  24. pip/_internal/commands/hash.py +1 -2
  25. pip/_internal/commands/help.py +1 -2
  26. pip/_internal/commands/index.py +15 -9
  27. pip/_internal/commands/inspect.py +4 -4
  28. pip/_internal/commands/install.py +63 -53
  29. pip/_internal/commands/list.py +35 -26
  30. pip/_internal/commands/lock.py +4 -8
  31. pip/_internal/commands/search.py +14 -12
  32. pip/_internal/commands/show.py +14 -11
  33. pip/_internal/commands/uninstall.py +1 -2
  34. pip/_internal/commands/wheel.py +7 -13
  35. pip/_internal/configuration.py +40 -27
  36. pip/_internal/distributions/base.py +6 -4
  37. pip/_internal/distributions/installed.py +8 -4
  38. pip/_internal/distributions/sdist.py +33 -27
  39. pip/_internal/distributions/wheel.py +6 -4
  40. pip/_internal/exceptions.py +78 -42
  41. pip/_internal/index/collector.py +24 -29
  42. pip/_internal/index/package_finder.py +73 -64
  43. pip/_internal/index/sources.py +17 -14
  44. pip/_internal/locations/__init__.py +18 -16
  45. pip/_internal/locations/_distutils.py +12 -11
  46. pip/_internal/locations/_sysconfig.py +5 -4
  47. pip/_internal/locations/base.py +4 -3
  48. pip/_internal/main.py +2 -2
  49. pip/_internal/metadata/__init__.py +14 -7
  50. pip/_internal/metadata/_json.py +5 -4
  51. pip/_internal/metadata/base.py +22 -27
  52. pip/_internal/metadata/importlib/_compat.py +6 -4
  53. pip/_internal/metadata/importlib/_dists.py +20 -19
  54. pip/_internal/metadata/importlib/_envs.py +9 -6
  55. pip/_internal/metadata/pkg_resources.py +11 -14
  56. pip/_internal/models/direct_url.py +24 -21
  57. pip/_internal/models/format_control.py +5 -5
  58. pip/_internal/models/installation_report.py +4 -3
  59. pip/_internal/models/link.py +39 -34
  60. pip/_internal/models/pylock.py +27 -22
  61. pip/_internal/models/search_scope.py +6 -7
  62. pip/_internal/models/selection_prefs.py +3 -3
  63. pip/_internal/models/target_python.py +10 -9
  64. pip/_internal/models/wheel.py +12 -71
  65. pip/_internal/network/auth.py +20 -22
  66. pip/_internal/network/cache.py +28 -17
  67. pip/_internal/network/download.py +169 -141
  68. pip/_internal/network/lazy_wheel.py +15 -10
  69. pip/_internal/network/session.py +32 -27
  70. pip/_internal/network/utils.py +2 -2
  71. pip/_internal/network/xmlrpc.py +2 -2
  72. pip/_internal/operations/build/build_tracker.py +10 -8
  73. pip/_internal/operations/build/wheel.py +7 -6
  74. pip/_internal/operations/build/wheel_editable.py +7 -6
  75. pip/_internal/operations/check.py +21 -26
  76. pip/_internal/operations/freeze.py +12 -9
  77. pip/_internal/operations/install/wheel.py +49 -41
  78. pip/_internal/operations/prepare.py +42 -31
  79. pip/_internal/pyproject.py +7 -69
  80. pip/_internal/req/__init__.py +12 -12
  81. pip/_internal/req/constructors.py +68 -62
  82. pip/_internal/req/req_dependency_group.py +7 -11
  83. pip/_internal/req/req_file.py +32 -36
  84. pip/_internal/req/req_install.py +64 -170
  85. pip/_internal/req/req_set.py +4 -5
  86. pip/_internal/req/req_uninstall.py +20 -17
  87. pip/_internal/resolution/base.py +3 -3
  88. pip/_internal/resolution/legacy/resolver.py +21 -20
  89. pip/_internal/resolution/resolvelib/base.py +16 -13
  90. pip/_internal/resolution/resolvelib/candidates.py +49 -37
  91. pip/_internal/resolution/resolvelib/factory.py +72 -50
  92. pip/_internal/resolution/resolvelib/found_candidates.py +11 -9
  93. pip/_internal/resolution/resolvelib/provider.py +24 -20
  94. pip/_internal/resolution/resolvelib/reporter.py +26 -11
  95. pip/_internal/resolution/resolvelib/requirements.py +8 -6
  96. pip/_internal/resolution/resolvelib/resolver.py +41 -29
  97. pip/_internal/self_outdated_check.py +19 -9
  98. pip/_internal/utils/appdirs.py +1 -2
  99. pip/_internal/utils/compat.py +7 -1
  100. pip/_internal/utils/compatibility_tags.py +17 -16
  101. pip/_internal/utils/deprecation.py +11 -9
  102. pip/_internal/utils/direct_url_helpers.py +2 -2
  103. pip/_internal/utils/egg_link.py +6 -5
  104. pip/_internal/utils/entrypoints.py +3 -2
  105. pip/_internal/utils/filesystem.py +20 -5
  106. pip/_internal/utils/filetypes.py +4 -6
  107. pip/_internal/utils/glibc.py +6 -5
  108. pip/_internal/utils/hashes.py +9 -6
  109. pip/_internal/utils/logging.py +8 -5
  110. pip/_internal/utils/misc.py +37 -45
  111. pip/_internal/utils/packaging.py +3 -2
  112. pip/_internal/utils/retry.py +7 -4
  113. pip/_internal/utils/subprocess.py +20 -17
  114. pip/_internal/utils/temp_dir.py +10 -12
  115. pip/_internal/utils/unpacking.py +31 -4
  116. pip/_internal/utils/urls.py +1 -1
  117. pip/_internal/utils/virtualenv.py +3 -2
  118. pip/_internal/utils/wheel.py +3 -4
  119. pip/_internal/vcs/bazaar.py +26 -8
  120. pip/_internal/vcs/git.py +59 -24
  121. pip/_internal/vcs/mercurial.py +34 -11
  122. pip/_internal/vcs/subversion.py +27 -16
  123. pip/_internal/vcs/versioncontrol.py +56 -51
  124. pip/_internal/wheel_builder.py +30 -101
  125. pip/_vendor/README.rst +180 -0
  126. pip/_vendor/cachecontrol/LICENSE.txt +13 -0
  127. pip/_vendor/cachecontrol/__init__.py +1 -1
  128. pip/_vendor/certifi/LICENSE +20 -0
  129. pip/_vendor/certifi/__init__.py +1 -1
  130. pip/_vendor/certifi/cacert.pem +164 -261
  131. pip/_vendor/certifi/core.py +1 -32
  132. pip/_vendor/dependency_groups/LICENSE.txt +9 -0
  133. pip/_vendor/distlib/LICENSE.txt +284 -0
  134. pip/_vendor/distlib/__init__.py +2 -2
  135. pip/_vendor/distlib/scripts.py +1 -1
  136. pip/_vendor/distro/LICENSE +202 -0
  137. pip/_vendor/idna/LICENSE.md +31 -0
  138. pip/_vendor/msgpack/COPYING +14 -0
  139. pip/_vendor/msgpack/__init__.py +2 -2
  140. pip/_vendor/packaging/LICENSE +3 -0
  141. pip/_vendor/packaging/LICENSE.APACHE +177 -0
  142. pip/_vendor/packaging/LICENSE.BSD +23 -0
  143. pip/_vendor/pkg_resources/LICENSE +17 -0
  144. pip/_vendor/pkg_resources/__init__.py +1 -1
  145. pip/_vendor/platformdirs/LICENSE +21 -0
  146. pip/_vendor/platformdirs/api.py +1 -1
  147. pip/_vendor/platformdirs/macos.py +10 -8
  148. pip/_vendor/platformdirs/version.py +16 -3
  149. pip/_vendor/pygments/LICENSE +25 -0
  150. pip/_vendor/pygments/__init__.py +1 -1
  151. pip/_vendor/pyproject_hooks/LICENSE +21 -0
  152. pip/_vendor/requests/LICENSE +175 -0
  153. pip/_vendor/requests/__version__.py +2 -2
  154. pip/_vendor/requests/adapters.py +17 -40
  155. pip/_vendor/requests/compat.py +12 -0
  156. pip/_vendor/requests/models.py +3 -1
  157. pip/_vendor/requests/sessions.py +1 -1
  158. pip/_vendor/requests/utils.py +6 -16
  159. pip/_vendor/resolvelib/LICENSE +13 -0
  160. pip/_vendor/resolvelib/__init__.py +3 -3
  161. pip/_vendor/resolvelib/reporters.py +1 -1
  162. pip/_vendor/resolvelib/resolvers/__init__.py +4 -4
  163. pip/_vendor/resolvelib/resolvers/abstract.py +3 -3
  164. pip/_vendor/resolvelib/resolvers/resolution.py +96 -10
  165. pip/_vendor/rich/LICENSE +19 -0
  166. pip/_vendor/rich/__main__.py +12 -40
  167. pip/_vendor/rich/_inspect.py +1 -1
  168. pip/_vendor/rich/_ratio.py +1 -7
  169. pip/_vendor/rich/align.py +1 -7
  170. pip/_vendor/rich/box.py +1 -7
  171. pip/_vendor/rich/console.py +25 -20
  172. pip/_vendor/rich/control.py +1 -7
  173. pip/_vendor/rich/diagnose.py +1 -0
  174. pip/_vendor/rich/emoji.py +1 -6
  175. pip/_vendor/rich/live.py +32 -7
  176. pip/_vendor/rich/live_render.py +1 -7
  177. pip/_vendor/rich/logging.py +1 -1
  178. pip/_vendor/rich/panel.py +3 -4
  179. pip/_vendor/rich/progress.py +15 -15
  180. pip/_vendor/rich/spinner.py +7 -13
  181. pip/_vendor/rich/style.py +7 -11
  182. pip/_vendor/rich/syntax.py +24 -5
  183. pip/_vendor/rich/traceback.py +32 -17
  184. pip/_vendor/tomli/LICENSE +21 -0
  185. pip/_vendor/tomli/__init__.py +1 -1
  186. pip/_vendor/tomli/_parser.py +28 -21
  187. pip/_vendor/tomli/_re.py +8 -5
  188. pip/_vendor/tomli_w/LICENSE +21 -0
  189. pip/_vendor/truststore/LICENSE +21 -0
  190. pip/_vendor/truststore/__init__.py +1 -1
  191. pip/_vendor/truststore/_api.py +15 -7
  192. pip/_vendor/truststore/_openssl.py +3 -1
  193. pip/_vendor/urllib3/LICENSE.txt +21 -0
  194. pip/_vendor/vendor.txt +11 -12
  195. {pip-25.1.1.dist-info → pip-25.3.dist-info}/METADATA +32 -11
  196. {pip-25.1.1.dist-info → pip-25.3.dist-info}/RECORD +221 -192
  197. {pip-25.1.1.dist-info → pip-25.3.dist-info}/WHEEL +1 -2
  198. pip-25.3.dist-info/entry_points.txt +4 -0
  199. {pip-25.1.1.dist-info → pip-25.3.dist-info}/licenses/AUTHORS.txt +21 -0
  200. pip-25.3.dist-info/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt +13 -0
  201. pip-25.3.dist-info/licenses/src/pip/_vendor/certifi/LICENSE +20 -0
  202. pip-25.3.dist-info/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt +9 -0
  203. pip-25.3.dist-info/licenses/src/pip/_vendor/distlib/LICENSE.txt +284 -0
  204. pip-25.3.dist-info/licenses/src/pip/_vendor/distro/LICENSE +202 -0
  205. pip-25.3.dist-info/licenses/src/pip/_vendor/idna/LICENSE.md +31 -0
  206. pip-25.3.dist-info/licenses/src/pip/_vendor/msgpack/COPYING +14 -0
  207. pip-25.3.dist-info/licenses/src/pip/_vendor/packaging/LICENSE +3 -0
  208. pip-25.3.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.APACHE +177 -0
  209. pip-25.3.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.BSD +23 -0
  210. pip-25.3.dist-info/licenses/src/pip/_vendor/pkg_resources/LICENSE +17 -0
  211. pip-25.3.dist-info/licenses/src/pip/_vendor/platformdirs/LICENSE +21 -0
  212. pip-25.3.dist-info/licenses/src/pip/_vendor/pygments/LICENSE +25 -0
  213. pip-25.3.dist-info/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +21 -0
  214. pip-25.3.dist-info/licenses/src/pip/_vendor/requests/LICENSE +175 -0
  215. pip-25.3.dist-info/licenses/src/pip/_vendor/resolvelib/LICENSE +13 -0
  216. pip-25.3.dist-info/licenses/src/pip/_vendor/rich/LICENSE +19 -0
  217. pip-25.3.dist-info/licenses/src/pip/_vendor/tomli/LICENSE +21 -0
  218. pip-25.3.dist-info/licenses/src/pip/_vendor/tomli_w/LICENSE +21 -0
  219. pip-25.3.dist-info/licenses/src/pip/_vendor/truststore/LICENSE +21 -0
  220. pip-25.3.dist-info/licenses/src/pip/_vendor/urllib3/LICENSE.txt +21 -0
  221. pip/_internal/operations/build/metadata_legacy.py +0 -73
  222. pip/_internal/operations/build/wheel_legacy.py +0 -118
  223. pip/_internal/operations/install/editable_legacy.py +0 -46
  224. pip/_internal/utils/setuptools_build.py +0 -147
  225. pip/_vendor/distlib/database.py +0 -1329
  226. pip/_vendor/distlib/index.py +0 -508
  227. pip/_vendor/distlib/locators.py +0 -1295
  228. pip/_vendor/distlib/manifest.py +0 -384
  229. pip/_vendor/distlib/markers.py +0 -162
  230. pip/_vendor/distlib/metadata.py +0 -1031
  231. pip/_vendor/distlib/version.py +0 -750
  232. pip/_vendor/distlib/wheel.py +0 -1100
  233. pip/_vendor/typing_extensions.py +0 -4584
  234. pip-25.1.1.dist-info/entry_points.txt +0 -3
  235. pip-25.1.1.dist-info/top_level.txt +0 -1
  236. {pip-25.1.1.dist-info → pip-25.3.dist-info}/licenses/LICENSE.txt +0 -0
@@ -3,6 +3,6 @@
3
3
  # Licensed to PSF under a Contributor Agreement.
4
4
 
5
5
  __all__ = ("loads", "load", "TOMLDecodeError")
6
- __version__ = "2.2.1" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
6
+ __version__ = "2.3.0" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
7
7
 
8
8
  from ._parser import TOMLDecodeError, load, loads
@@ -4,12 +4,8 @@
4
4
 
5
5
  from __future__ import annotations
6
6
 
7
- from collections.abc import Iterable
8
- import string
9
7
  import sys
10
8
  from types import MappingProxyType
11
- from typing import IO, Any, Final, NamedTuple
12
- import warnings
13
9
 
14
10
  from ._re import (
15
11
  RE_DATETIME,
@@ -19,7 +15,13 @@ from ._re import (
19
15
  match_to_localtime,
20
16
  match_to_number,
21
17
  )
22
- from ._types import Key, ParseFloat, Pos
18
+
19
+ TYPE_CHECKING = False
20
+ if TYPE_CHECKING:
21
+ from collections.abc import Iterable
22
+ from typing import IO, Any, Final
23
+
24
+ from ._types import Key, ParseFloat, Pos
23
25
 
24
26
  # Inline tables/arrays are implemented using recursion. Pathologically
25
27
  # nested documents cause pure Python to raise RecursionError (which is OK),
@@ -46,19 +48,21 @@ ILLEGAL_COMMENT_CHARS: Final = ILLEGAL_BASIC_STR_CHARS
46
48
 
47
49
  TOML_WS: Final = frozenset(" \t")
48
50
  TOML_WS_AND_NEWLINE: Final = TOML_WS | frozenset("\n")
49
- BARE_KEY_CHARS: Final = frozenset(string.ascii_letters + string.digits + "-_")
51
+ BARE_KEY_CHARS: Final = frozenset(
52
+ "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789" "-_"
53
+ )
50
54
  KEY_INITIAL_CHARS: Final = BARE_KEY_CHARS | frozenset("\"'")
51
- HEXDIGIT_CHARS: Final = frozenset(string.hexdigits)
55
+ HEXDIGIT_CHARS: Final = frozenset("abcdef" "ABCDEF" "0123456789")
52
56
 
53
57
  BASIC_STR_ESCAPE_REPLACEMENTS: Final = MappingProxyType(
54
58
  {
55
59
  "\\b": "\u0008", # backspace
56
60
  "\\t": "\u0009", # tab
57
- "\\n": "\u000A", # linefeed
58
- "\\f": "\u000C", # form feed
59
- "\\r": "\u000D", # carriage return
61
+ "\\n": "\u000a", # linefeed
62
+ "\\f": "\u000c", # form feed
63
+ "\\r": "\u000d", # carriage return
60
64
  '\\"': "\u0022", # quote
61
- "\\\\": "\u005C", # backslash
65
+ "\\\\": "\u005c", # backslash
62
66
  }
63
67
  )
64
68
 
@@ -92,6 +96,8 @@ class TOMLDecodeError(ValueError):
92
96
  or not isinstance(doc, str)
93
97
  or not isinstance(pos, int)
94
98
  ):
99
+ import warnings
100
+
95
101
  warnings.warn(
96
102
  "Free-form arguments for TOMLDecodeError are deprecated. "
97
103
  "Please set 'msg' (str), 'doc' (str) and 'pos' (int) arguments only.",
@@ -151,7 +157,7 @@ def loads(__s: str, *, parse_float: ParseFloat = float) -> dict[str, Any]: # no
151
157
  f"Expected str object, not '{type(__s).__qualname__}'"
152
158
  ) from None
153
159
  pos = 0
154
- out = Output(NestedDict(), Flags())
160
+ out = Output()
155
161
  header: Key = ()
156
162
  parse_float = make_safe_parse_float(parse_float)
157
163
 
@@ -220,7 +226,7 @@ class Flags:
220
226
  EXPLICIT_NEST: Final = 1
221
227
 
222
228
  def __init__(self) -> None:
223
- self._flags: dict[str, dict] = {}
229
+ self._flags: dict[str, dict[Any, Any]] = {}
224
230
  self._pending_flags: set[tuple[Key, int]] = set()
225
231
 
226
232
  def add_pending(self, key: Key, flag: int) -> None:
@@ -278,7 +284,7 @@ class NestedDict:
278
284
  key: Key,
279
285
  *,
280
286
  access_lists: bool = True,
281
- ) -> dict:
287
+ ) -> dict[str, Any]:
282
288
  cont: Any = self.dict
283
289
  for k in key:
284
290
  if k not in cont:
@@ -288,7 +294,7 @@ class NestedDict:
288
294
  cont = cont[-1]
289
295
  if not isinstance(cont, dict):
290
296
  raise KeyError("There is no nest behind this key")
291
- return cont
297
+ return cont # type: ignore[no-any-return]
292
298
 
293
299
  def append_nest_to_list(self, key: Key) -> None:
294
300
  cont = self.get_or_create_nest(key[:-1])
@@ -302,9 +308,10 @@ class NestedDict:
302
308
  cont[last_key] = [{}]
303
309
 
304
310
 
305
- class Output(NamedTuple):
306
- data: NestedDict
307
- flags: Flags
311
+ class Output:
312
+ def __init__(self) -> None:
313
+ self.data = NestedDict()
314
+ self.flags = Flags()
308
315
 
309
316
 
310
317
  def skip_chars(src: str, pos: Pos, chars: Iterable[str]) -> Pos:
@@ -493,9 +500,9 @@ def parse_one_line_basic_str(src: str, pos: Pos) -> tuple[Pos, str]:
493
500
 
494
501
  def parse_array(
495
502
  src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
496
- ) -> tuple[Pos, list]:
503
+ ) -> tuple[Pos, list[Any]]:
497
504
  pos += 1
498
- array: list = []
505
+ array: list[Any] = []
499
506
 
500
507
  pos = skip_comments_and_array_ws(src, pos)
501
508
  if src.startswith("]", pos):
@@ -519,7 +526,7 @@ def parse_array(
519
526
 
520
527
  def parse_inline_table(
521
528
  src: str, pos: Pos, parse_float: ParseFloat, nest_lvl: int
522
- ) -> tuple[Pos, dict]:
529
+ ) -> tuple[Pos, dict[str, Any]]:
523
530
  pos += 1
524
531
  nested_dict = NestedDict()
525
532
  flags = Flags()
pip/_vendor/tomli/_re.py CHANGED
@@ -7,9 +7,12 @@ from __future__ import annotations
7
7
  from datetime import date, datetime, time, timedelta, timezone, tzinfo
8
8
  from functools import lru_cache
9
9
  import re
10
- from typing import Any, Final
11
10
 
12
- from ._types import ParseFloat
11
+ TYPE_CHECKING = False
12
+ if TYPE_CHECKING:
13
+ from typing import Any, Final
14
+
15
+ from ._types import ParseFloat
13
16
 
14
17
  # E.g.
15
18
  # - 00:32:00.999999
@@ -51,7 +54,7 @@ RE_DATETIME: Final = re.compile(
51
54
  )
52
55
 
53
56
 
54
- def match_to_datetime(match: re.Match) -> datetime | date:
57
+ def match_to_datetime(match: re.Match[str]) -> datetime | date:
55
58
  """Convert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`.
56
59
 
57
60
  Raises ValueError if the match does not correspond to a valid date
@@ -100,13 +103,13 @@ def cached_tz(hour_str: str, minute_str: str, sign_str: str) -> timezone:
100
103
  )
101
104
 
102
105
 
103
- def match_to_localtime(match: re.Match) -> time:
106
+ def match_to_localtime(match: re.Match[str]) -> time:
104
107
  hour_str, minute_str, sec_str, micros_str = match.groups()
105
108
  micros = int(micros_str.ljust(6, "0")) if micros_str else 0
106
109
  return time(int(hour_str), int(minute_str), int(sec_str), micros)
107
110
 
108
111
 
109
- def match_to_number(match: re.Match, parse_float: ParseFloat) -> Any:
112
+ def match_to_number(match: re.Match[str], parse_float: ParseFloat) -> Any:
110
113
  if match.group("floatpart"):
111
114
  return parse_float(match.group())
112
115
  return int(match.group(), 0)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Taneli Hukkinen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Seth Michael Larson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -33,4 +33,4 @@ from ._api import SSLContext, extract_from_ssl, inject_into_ssl # noqa: E402
33
33
  del _api, _sys # type: ignore[name-defined] # noqa: F821
34
34
 
35
35
  __all__ = ["SSLContext", "inject_into_ssl", "extract_from_ssl"]
36
- __version__ = "0.10.1"
36
+ __version__ = "0.10.4"
@@ -1,8 +1,10 @@
1
+ import contextlib
1
2
  import os
2
3
  import platform
3
4
  import socket
4
5
  import ssl
5
6
  import sys
7
+ import threading
6
8
  import typing
7
9
 
8
10
  import _ssl
@@ -22,7 +24,7 @@ else:
22
24
  from ._openssl import _configure_context, _verify_peercerts_impl
23
25
 
24
26
  if typing.TYPE_CHECKING:
25
- from pip._vendor.typing_extensions import Buffer
27
+ from typing_extensions import Buffer
26
28
 
27
29
  # From typeshed/stdlib/ssl.pyi
28
30
  _StrOrBytesPath: typing.TypeAlias = str | bytes | os.PathLike[str] | os.PathLike[bytes]
@@ -67,7 +69,7 @@ def extract_from_ssl() -> None:
67
69
  try:
68
70
  import pip._vendor.urllib3.util.ssl_ as urllib3_ssl
69
71
 
70
- urllib3_ssl.SSLContext = _original_SSLContext # type: ignore[assignment]
72
+ urllib3_ssl.SSLContext = _original_SSLContext
71
73
  except ImportError:
72
74
  pass
73
75
 
@@ -84,6 +86,7 @@ class SSLContext(_truststore_SSLContext_super_class): # type: ignore[misc]
84
86
 
85
87
  def __init__(self, protocol: int = None) -> None: # type: ignore[assignment]
86
88
  self._ctx = _original_SSLContext(protocol)
89
+ self._ctx_lock = threading.Lock()
87
90
 
88
91
  class TruststoreSSLObject(ssl.SSLObject):
89
92
  # This object exists because wrap_bio() doesn't
@@ -106,10 +109,15 @@ class SSLContext(_truststore_SSLContext_super_class): # type: ignore[misc]
106
109
  server_hostname: str | None = None,
107
110
  session: ssl.SSLSession | None = None,
108
111
  ) -> ssl.SSLSocket:
109
- # Use a context manager here because the
110
- # inner SSLContext holds on to our state
111
- # but also does the actual handshake.
112
- with _configure_context(self._ctx):
112
+
113
+ # We need to lock around the .__enter__()
114
+ # but we don't need to lock within the
115
+ # context manager, so we need to expand the
116
+ # syntactic sugar of the `with` statement.
117
+ with contextlib.ExitStack() as stack:
118
+ with self._ctx_lock:
119
+ stack.enter_context(_configure_context(self._ctx))
120
+
113
121
  ssl_sock = self._ctx.wrap_socket(
114
122
  sock,
115
123
  server_side=server_side,
@@ -300,7 +308,7 @@ class SSLContext(_truststore_SSLContext_super_class): # type: ignore[misc]
300
308
  if sys.version_info >= (3, 13):
301
309
 
302
310
  def _get_unverified_chain_bytes(sslobj: ssl.SSLObject) -> list[bytes]:
303
- unverified_chain = sslobj.get_unverified_chain() or () # type: ignore[attr-defined]
311
+ unverified_chain = sslobj.get_unverified_chain() or ()
304
312
  return [
305
313
  cert if isinstance(cert, bytes) else cert.public_bytes(_ssl.ENCODING_DER)
306
314
  for cert in unverified_chain
@@ -6,8 +6,10 @@ import typing
6
6
 
7
7
  # candidates based on https://github.com/tiran/certifi-system-store by Christian Heimes
8
8
  _CA_FILE_CANDIDATES = [
9
- # Alpine, Arch, Fedora 34+, OpenWRT, RHEL 9+, BSD
9
+ # Alpine, Arch, Fedora 34-42, OpenWRT, RHEL 9-10, BSD
10
10
  "/etc/ssl/cert.pem",
11
+ # Fedora 43+, RHEL 11+
12
+ "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem",
11
13
  # Fedora <= 34, RHEL <= 9, CentOS <= 9
12
14
  "/etc/pki/tls/cert.pem",
13
15
  # Debian, Ubuntu (requires ca-certificates)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2008-2020 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
pip/_vendor/vendor.txt CHANGED
@@ -1,20 +1,19 @@
1
- CacheControl==0.14.2
2
- distlib==0.3.9
1
+ CacheControl==0.14.3
2
+ distlib==0.4.0
3
3
  distro==1.9.0
4
- msgpack==1.1.0
4
+ msgpack==1.1.2
5
5
  packaging==25.0
6
- platformdirs==4.3.7
6
+ platformdirs==4.5.0
7
7
  pyproject-hooks==1.2.0
8
- requests==2.32.3
9
- certifi==2025.1.31
8
+ requests==2.32.5
9
+ certifi==2025.10.5
10
10
  idna==3.10
11
11
  urllib3==1.26.20
12
- rich==14.0.0
13
- pygments==2.19.1
14
- typing_extensions==4.13.2
15
- resolvelib==1.1.0
12
+ rich==14.2.0
13
+ pygments==2.19.2
14
+ resolvelib==1.2.1
16
15
  setuptools==70.3.0
17
- tomli==2.2.1
16
+ tomli==2.3.0
18
17
  tomli-w==1.2.0
19
- truststore==0.10.1
18
+ truststore==0.10.4
20
19
  dependency-groups==1.3.1
@@ -1,16 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pip
3
- Version: 25.1.1
3
+ Version: 25.3
4
4
  Summary: The PyPA recommended tool for installing Python packages.
5
5
  Author-email: The pip developers <distutils-sig@python.org>
6
- License: MIT
7
- Project-URL: Homepage, https://pip.pypa.io/
8
- Project-URL: Documentation, https://pip.pypa.io
9
- Project-URL: Source, https://github.com/pypa/pip
10
- Project-URL: Changelog, https://pip.pypa.io/en/stable/news/
6
+ Requires-Python: >=3.9
7
+ Description-Content-Type: text/x-rst
8
+ License-Expression: MIT
11
9
  Classifier: Development Status :: 5 - Production/Stable
12
10
  Classifier: Intended Audience :: Developers
13
- Classifier: License :: OSI Approved :: MIT License
14
11
  Classifier: Topic :: Software Development :: Build Tools
15
12
  Classifier: Programming Language :: Python
16
13
  Classifier: Programming Language :: Python :: 3
@@ -20,13 +17,36 @@ Classifier: Programming Language :: Python :: 3.10
20
17
  Classifier: Programming Language :: Python :: 3.11
21
18
  Classifier: Programming Language :: Python :: 3.12
22
19
  Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
23
21
  Classifier: Programming Language :: Python :: Implementation :: CPython
24
22
  Classifier: Programming Language :: Python :: Implementation :: PyPy
25
- Requires-Python: >=3.9
26
- Description-Content-Type: text/x-rst
27
- License-File: LICENSE.txt
28
23
  License-File: AUTHORS.txt
29
- Dynamic: license-file
24
+ License-File: LICENSE.txt
25
+ License-File: src/pip/_vendor/cachecontrol/LICENSE.txt
26
+ License-File: src/pip/_vendor/certifi/LICENSE
27
+ License-File: src/pip/_vendor/dependency_groups/LICENSE.txt
28
+ License-File: src/pip/_vendor/distlib/LICENSE.txt
29
+ License-File: src/pip/_vendor/distro/LICENSE
30
+ License-File: src/pip/_vendor/idna/LICENSE.md
31
+ License-File: src/pip/_vendor/msgpack/COPYING
32
+ License-File: src/pip/_vendor/packaging/LICENSE
33
+ License-File: src/pip/_vendor/packaging/LICENSE.APACHE
34
+ License-File: src/pip/_vendor/packaging/LICENSE.BSD
35
+ License-File: src/pip/_vendor/pkg_resources/LICENSE
36
+ License-File: src/pip/_vendor/platformdirs/LICENSE
37
+ License-File: src/pip/_vendor/pygments/LICENSE
38
+ License-File: src/pip/_vendor/pyproject_hooks/LICENSE
39
+ License-File: src/pip/_vendor/requests/LICENSE
40
+ License-File: src/pip/_vendor/resolvelib/LICENSE
41
+ License-File: src/pip/_vendor/rich/LICENSE
42
+ License-File: src/pip/_vendor/tomli/LICENSE
43
+ License-File: src/pip/_vendor/tomli_w/LICENSE
44
+ License-File: src/pip/_vendor/truststore/LICENSE
45
+ License-File: src/pip/_vendor/urllib3/LICENSE.txt
46
+ Project-URL: Changelog, https://pip.pypa.io/en/stable/news/
47
+ Project-URL: Documentation, https://pip.pypa.io
48
+ Project-URL: Homepage, https://pip.pypa.io/
49
+ Project-URL: Source, https://github.com/pypa/pip
30
50
 
31
51
  pip - The Python Package Installer
32
52
  ==================================
@@ -88,3 +108,4 @@ rooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.
88
108
  .. _User IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa
89
109
  .. _Development IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev
90
110
  .. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
111
+