pip 25.2__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 (114) hide show
  1. pip/__init__.py +1 -1
  2. pip/_internal/__init__.py +0 -0
  3. pip/_internal/build_env.py +71 -3
  4. pip/_internal/cache.py +1 -1
  5. pip/_internal/cli/cmdoptions.py +43 -71
  6. pip/_internal/cli/parser.py +3 -3
  7. pip/_internal/cli/req_command.py +46 -26
  8. pip/_internal/commands/download.py +4 -7
  9. pip/_internal/commands/install.py +19 -14
  10. pip/_internal/commands/lock.py +3 -6
  11. pip/_internal/commands/wheel.py +5 -10
  12. pip/_internal/configuration.py +1 -2
  13. pip/_internal/distributions/sdist.py +13 -14
  14. pip/_internal/exceptions.py +20 -3
  15. pip/_internal/index/package_finder.py +3 -3
  16. pip/_internal/metadata/__init__.py +7 -2
  17. pip/_internal/metadata/importlib/_dists.py +8 -2
  18. pip/_internal/models/link.py +1 -1
  19. pip/_internal/models/wheel.py +5 -66
  20. pip/_internal/network/cache.py +6 -11
  21. pip/_internal/network/lazy_wheel.py +5 -3
  22. pip/_internal/operations/build/wheel.py +4 -4
  23. pip/_internal/operations/build/wheel_editable.py +4 -4
  24. pip/_internal/operations/prepare.py +7 -1
  25. pip/_internal/pyproject.py +2 -61
  26. pip/_internal/req/__init__.py +1 -3
  27. pip/_internal/req/constructors.py +42 -38
  28. pip/_internal/req/req_file.py +0 -1
  29. pip/_internal/req/req_install.py +32 -141
  30. pip/_internal/resolution/resolvelib/candidates.py +20 -11
  31. pip/_internal/resolution/resolvelib/factory.py +31 -0
  32. pip/_internal/resolution/resolvelib/provider.py +9 -0
  33. pip/_internal/resolution/resolvelib/reporter.py +21 -8
  34. pip/_internal/resolution/resolvelib/resolver.py +2 -6
  35. pip/_internal/self_outdated_check.py +11 -3
  36. pip/_internal/utils/filesystem.py +12 -0
  37. pip/_internal/utils/unpacking.py +25 -0
  38. pip/_internal/wheel_builder.py +23 -96
  39. pip/_vendor/README.rst +180 -0
  40. pip/_vendor/cachecontrol/LICENSE.txt +13 -0
  41. pip/_vendor/certifi/LICENSE +20 -0
  42. pip/_vendor/certifi/__init__.py +1 -1
  43. pip/_vendor/certifi/cacert.pem +62 -40
  44. pip/_vendor/dependency_groups/LICENSE.txt +9 -0
  45. pip/_vendor/distlib/LICENSE.txt +284 -0
  46. pip/_vendor/distro/LICENSE +202 -0
  47. pip/_vendor/idna/LICENSE.md +31 -0
  48. pip/_vendor/msgpack/COPYING +14 -0
  49. pip/_vendor/msgpack/__init__.py +2 -2
  50. pip/_vendor/packaging/LICENSE +3 -0
  51. pip/_vendor/packaging/LICENSE.APACHE +177 -0
  52. pip/_vendor/packaging/LICENSE.BSD +23 -0
  53. pip/_vendor/pkg_resources/LICENSE +17 -0
  54. pip/_vendor/platformdirs/LICENSE +21 -0
  55. pip/_vendor/platformdirs/api.py +1 -1
  56. pip/_vendor/platformdirs/macos.py +10 -8
  57. pip/_vendor/platformdirs/version.py +16 -3
  58. pip/_vendor/pygments/LICENSE +25 -0
  59. pip/_vendor/pyproject_hooks/LICENSE +21 -0
  60. pip/_vendor/requests/LICENSE +175 -0
  61. pip/_vendor/requests/__version__.py +2 -2
  62. pip/_vendor/requests/adapters.py +17 -40
  63. pip/_vendor/requests/sessions.py +1 -1
  64. pip/_vendor/resolvelib/LICENSE +13 -0
  65. pip/_vendor/resolvelib/__init__.py +1 -1
  66. pip/_vendor/resolvelib/resolvers/abstract.py +3 -3
  67. pip/_vendor/resolvelib/resolvers/resolution.py +5 -0
  68. pip/_vendor/rich/LICENSE +19 -0
  69. pip/_vendor/rich/style.py +7 -11
  70. pip/_vendor/tomli/LICENSE +21 -0
  71. pip/_vendor/tomli/__init__.py +1 -1
  72. pip/_vendor/tomli/_parser.py +28 -21
  73. pip/_vendor/tomli/_re.py +8 -5
  74. pip/_vendor/tomli_w/LICENSE +21 -0
  75. pip/_vendor/truststore/LICENSE +21 -0
  76. pip/_vendor/truststore/__init__.py +1 -1
  77. pip/_vendor/truststore/_api.py +14 -6
  78. pip/_vendor/truststore/_openssl.py +3 -1
  79. pip/_vendor/urllib3/LICENSE.txt +21 -0
  80. pip/_vendor/vendor.txt +8 -8
  81. {pip-25.2.dist-info → pip-25.3.dist-info}/METADATA +9 -10
  82. {pip-25.2.dist-info → pip-25.3.dist-info}/RECORD +106 -90
  83. {pip-25.2.dist-info → pip-25.3.dist-info}/WHEEL +1 -2
  84. pip-25.3.dist-info/entry_points.txt +4 -0
  85. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/AUTHORS.txt +9 -0
  86. pip/_internal/operations/build/metadata_legacy.py +0 -73
  87. pip/_internal/operations/build/wheel_legacy.py +0 -119
  88. pip/_internal/operations/install/editable_legacy.py +0 -48
  89. pip/_internal/utils/setuptools_build.py +0 -149
  90. pip-25.2.dist-info/entry_points.txt +0 -3
  91. pip-25.2.dist-info/licenses/src/pip/_vendor/tomli/LICENSE-HEADER +0 -3
  92. pip-25.2.dist-info/top_level.txt +0 -1
  93. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/LICENSE.txt +0 -0
  94. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt +0 -0
  95. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/certifi/LICENSE +0 -0
  96. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt +0 -0
  97. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/distlib/LICENSE.txt +0 -0
  98. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/distro/LICENSE +0 -0
  99. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/idna/LICENSE.md +0 -0
  100. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/msgpack/COPYING +0 -0
  101. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE +0 -0
  102. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.APACHE +0 -0
  103. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.BSD +0 -0
  104. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/pkg_resources/LICENSE +0 -0
  105. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/platformdirs/LICENSE +0 -0
  106. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/pygments/LICENSE +0 -0
  107. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +0 -0
  108. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/requests/LICENSE +0 -0
  109. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/resolvelib/LICENSE +0 -0
  110. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/rich/LICENSE +0 -0
  111. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/tomli/LICENSE +0 -0
  112. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/tomli_w/LICENSE +0 -0
  113. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/truststore/LICENSE +0 -0
  114. {pip-25.2.dist-info → pip-25.3.dist-info}/licenses/src/pip/_vendor/urllib3/LICENSE.txt +0 -0
@@ -27,7 +27,6 @@ from pip._vendor.urllib3.poolmanager import PoolManager, proxy_from_url
27
27
  from pip._vendor.urllib3.util import Timeout as TimeoutSauce
28
28
  from pip._vendor.urllib3.util import parse_url
29
29
  from pip._vendor.urllib3.util.retry import Retry
30
- from pip._vendor.urllib3.util.ssl_ import create_urllib3_context
31
30
 
32
31
  from .auth import _basic_auth_str
33
32
  from .compat import basestring, urlparse
@@ -74,19 +73,6 @@ DEFAULT_RETRIES = 0
74
73
  DEFAULT_POOL_TIMEOUT = None
75
74
 
76
75
 
77
- try:
78
- import ssl # noqa: F401
79
-
80
- _preloaded_ssl_context = create_urllib3_context()
81
- _preloaded_ssl_context.load_verify_locations(
82
- extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
83
- )
84
- except ImportError:
85
- # Bypass default SSLContext creation when Python
86
- # interpreter isn't built with the ssl module.
87
- _preloaded_ssl_context = None
88
-
89
-
90
76
  def _urllib3_request_context(
91
77
  request: "PreparedRequest",
92
78
  verify: "bool | str | None",
@@ -99,19 +85,9 @@ def _urllib3_request_context(
99
85
  scheme = parsed_request_url.scheme.lower()
100
86
  port = parsed_request_url.port
101
87
 
102
- # Determine if we have and should use our default SSLContext
103
- # to optimize performance on standard requests.
104
- poolmanager_kwargs = getattr(poolmanager, "connection_pool_kw", {})
105
- has_poolmanager_ssl_context = poolmanager_kwargs.get("ssl_context")
106
- should_use_default_ssl_context = (
107
- _preloaded_ssl_context is not None and not has_poolmanager_ssl_context
108
- )
109
-
110
88
  cert_reqs = "CERT_REQUIRED"
111
89
  if verify is False:
112
90
  cert_reqs = "CERT_NONE"
113
- elif verify is True and should_use_default_ssl_context:
114
- pool_kwargs["ssl_context"] = _preloaded_ssl_context
115
91
  elif isinstance(verify, str):
116
92
  if not os.path.isdir(verify):
117
93
  pool_kwargs["ca_certs"] = verify
@@ -314,26 +290,27 @@ class HTTPAdapter(BaseAdapter):
314
290
  :param cert: The SSL certificate to verify.
315
291
  """
316
292
  if url.lower().startswith("https") and verify:
317
- conn.cert_reqs = "CERT_REQUIRED"
293
+ cert_loc = None
318
294
 
319
- # Only load the CA certificates if 'verify' is a string indicating the CA bundle to use.
320
- # Otherwise, if verify is a boolean, we don't load anything since
321
- # the connection will be using a context with the default certificates already loaded,
322
- # and this avoids a call to the slow load_verify_locations()
295
+ # Allow self-specified cert location.
323
296
  if verify is not True:
324
- # `verify` must be a str with a path then
325
297
  cert_loc = verify
326
298
 
327
- if not os.path.exists(cert_loc):
328
- raise OSError(
329
- f"Could not find a suitable TLS CA certificate bundle, "
330
- f"invalid path: {cert_loc}"
331
- )
299
+ if not cert_loc:
300
+ cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
332
301
 
333
- if not os.path.isdir(cert_loc):
334
- conn.ca_certs = cert_loc
335
- else:
336
- conn.ca_cert_dir = cert_loc
302
+ if not cert_loc or not os.path.exists(cert_loc):
303
+ raise OSError(
304
+ f"Could not find a suitable TLS CA certificate bundle, "
305
+ f"invalid path: {cert_loc}"
306
+ )
307
+
308
+ conn.cert_reqs = "CERT_REQUIRED"
309
+
310
+ if not os.path.isdir(cert_loc):
311
+ conn.ca_certs = cert_loc
312
+ else:
313
+ conn.ca_cert_dir = cert_loc
337
314
  else:
338
315
  conn.cert_reqs = "CERT_NONE"
339
316
  conn.ca_certs = None
@@ -410,7 +387,7 @@ class HTTPAdapter(BaseAdapter):
410
387
  ``"cert_reqs"`` will be set
411
388
  * If ``verify`` is a string, (i.e., it is a user-specified trust bundle)
412
389
  ``"ca_certs"`` will be set if the string is not a directory recognized
413
- by :py:func:`os.path.isdir`, otherwise ``"ca_certs_dir"`` will be
390
+ by :py:func:`os.path.isdir`, otherwise ``"ca_cert_dir"`` will be
414
391
  set.
415
392
  * If ``"cert"`` is specified, ``"cert_file"`` will always be set. If
416
393
  ``"cert"`` is a tuple with a second item, ``"key_file"`` will also
@@ -535,7 +535,7 @@ class Session(SessionRedirectMixin):
535
535
  for multipart encoding upload.
536
536
  :param auth: (optional) Auth tuple or callable to enable
537
537
  Basic/Digest/Custom HTTP Auth.
538
- :param timeout: (optional) How long to wait for the server to send
538
+ :param timeout: (optional) How many seconds to wait for the server to send
539
539
  data before giving up, as a float, or a :ref:`(connect timeout,
540
540
  read timeout) <timeouts>` tuple.
541
541
  :type timeout: float or tuple
@@ -0,0 +1,13 @@
1
+ Copyright (c) 2018, Tzu-ping Chung <uranusjr@gmail.com>
2
+
3
+ Permission to use, copy, modify, and distribute this software for any
4
+ purpose with or without fee is hereby granted, provided that the above
5
+ copyright notice and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -11,7 +11,7 @@ __all__ = [
11
11
  "__version__",
12
12
  ]
13
13
 
14
- __version__ = "1.2.0"
14
+ __version__ = "1.2.1"
15
15
 
16
16
 
17
17
  from .providers import AbstractProvider
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import collections
4
- from typing import TYPE_CHECKING, Any, Generic, Iterable, Mapping, NamedTuple
4
+ from typing import TYPE_CHECKING, Any, Generic, Iterable, NamedTuple
5
5
 
6
6
  from ..structs import CT, KT, RT, DirectedGraph
7
7
 
@@ -11,9 +11,9 @@ if TYPE_CHECKING:
11
11
  from .criterion import Criterion
12
12
 
13
13
  class Result(NamedTuple, Generic[RT, CT, KT]):
14
- mapping: Mapping[KT, CT]
14
+ mapping: dict[KT, CT]
15
15
  graph: DirectedGraph[KT | None]
16
- criteria: Mapping[KT, Criterion[RT, CT]]
16
+ criteria: dict[KT, Criterion[RT, CT]]
17
17
 
18
18
  else:
19
19
  Result = collections.namedtuple("Result", ["mapping", "graph", "criteria"])
@@ -384,6 +384,11 @@ class Resolution(Generic[RT, CT, KT]):
384
384
  if not broken_state.mapping:
385
385
  break
386
386
 
387
+ # Guard: We need at least two state to remain to both
388
+ # backtrack and push a new state
389
+ if len(self._states) <= 1:
390
+ raise ResolutionImpossible(causes)
391
+
387
392
  incompatibilities_from_broken = [
388
393
  (k, list(v.incompatibilities)) for k, v in broken_state.criteria.items()
389
394
  ]
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2020 Will McGugan
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
pip/_vendor/rich/style.py CHANGED
@@ -1,6 +1,7 @@
1
1
  import sys
2
2
  from functools import lru_cache
3
- from marshal import dumps, loads
3
+ from operator import attrgetter
4
+ from pickle import dumps, loads
4
5
  from random import randint
5
6
  from typing import Any, Dict, Iterable, List, Optional, Type, Union, cast
6
7
 
@@ -9,6 +10,10 @@ from .color import Color, ColorParseError, ColorSystem, blend_rgb
9
10
  from .repr import Result, rich_repr
10
11
  from .terminal_theme import DEFAULT_TERMINAL_THEME, TerminalTheme
11
12
 
13
+ _hash_getter = attrgetter(
14
+ "_color", "_bgcolor", "_attributes", "_set_attributes", "_link", "_meta"
15
+ )
16
+
12
17
  # Style instances and style definitions are often interchangeable
13
18
  StyleType = Union[str, "Style"]
14
19
 
@@ -432,16 +437,7 @@ class Style:
432
437
  def __hash__(self) -> int:
433
438
  if self._hash is not None:
434
439
  return self._hash
435
- self._hash = hash(
436
- (
437
- self._color,
438
- self._bgcolor,
439
- self._attributes,
440
- self._set_attributes,
441
- self._link,
442
- self._meta,
443
- )
444
- )
440
+ self._hash = hash(_hash_getter(self))
445
441
  return self._hash
446
442
 
447
443
  @property
@@ -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.
@@ -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
@@ -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,19 +1,19 @@
1
1
  CacheControl==0.14.3
2
2
  distlib==0.4.0
3
3
  distro==1.9.0
4
- msgpack==1.1.1
4
+ msgpack==1.1.2
5
5
  packaging==25.0
6
- platformdirs==4.3.8
6
+ platformdirs==4.5.0
7
7
  pyproject-hooks==1.2.0
8
- requests==2.32.4
9
- certifi==2025.7.14
8
+ requests==2.32.5
9
+ certifi==2025.10.5
10
10
  idna==3.10
11
11
  urllib3==1.26.20
12
- rich==14.1.0
12
+ rich==14.2.0
13
13
  pygments==2.19.2
14
- resolvelib==1.2.0
14
+ resolvelib==1.2.1
15
15
  setuptools==70.3.0
16
- tomli==2.2.1
16
+ tomli==2.3.0
17
17
  tomli-w==1.2.0
18
- truststore==0.10.1
18
+ truststore==0.10.4
19
19
  dependency-groups==1.3.1
@@ -1,13 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pip
3
- Version: 25.2
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
+ Requires-Python: >=3.9
7
+ Description-Content-Type: text/x-rst
6
8
  License-Expression: 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/
11
9
  Classifier: Development Status :: 5 - Production/Stable
12
10
  Classifier: Intended Audience :: Developers
13
11
  Classifier: Topic :: Software Development :: Build Tools
@@ -22,17 +20,15 @@ Classifier: Programming Language :: Python :: 3.13
22
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
23
  License-File: AUTHORS.txt
28
24
  License-File: LICENSE.txt
29
- License-File: src/pip/_vendor/msgpack/COPYING
30
25
  License-File: src/pip/_vendor/cachecontrol/LICENSE.txt
31
26
  License-File: src/pip/_vendor/certifi/LICENSE
32
27
  License-File: src/pip/_vendor/dependency_groups/LICENSE.txt
33
28
  License-File: src/pip/_vendor/distlib/LICENSE.txt
34
29
  License-File: src/pip/_vendor/distro/LICENSE
35
30
  License-File: src/pip/_vendor/idna/LICENSE.md
31
+ License-File: src/pip/_vendor/msgpack/COPYING
36
32
  License-File: src/pip/_vendor/packaging/LICENSE
37
33
  License-File: src/pip/_vendor/packaging/LICENSE.APACHE
38
34
  License-File: src/pip/_vendor/packaging/LICENSE.BSD
@@ -44,11 +40,13 @@ License-File: src/pip/_vendor/requests/LICENSE
44
40
  License-File: src/pip/_vendor/resolvelib/LICENSE
45
41
  License-File: src/pip/_vendor/rich/LICENSE
46
42
  License-File: src/pip/_vendor/tomli/LICENSE
47
- License-File: src/pip/_vendor/tomli/LICENSE-HEADER
48
43
  License-File: src/pip/_vendor/tomli_w/LICENSE
49
44
  License-File: src/pip/_vendor/truststore/LICENSE
50
45
  License-File: src/pip/_vendor/urllib3/LICENSE.txt
51
- Dynamic: license-file
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
52
50
 
53
51
  pip - The Python Package Installer
54
52
  ==================================
@@ -110,3 +108,4 @@ rooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.
110
108
  .. _User IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa
111
109
  .. _Development IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev
112
110
  .. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
111
+