botocore-stubs 1.35.49__tar.gz → 1.42.2__tar.gz

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.

Potentially problematic release.


This version of botocore-stubs might be problematic. Click here for more details.

Files changed (99) hide show
  1. {botocore_stubs-1.35.49/botocore_stubs.egg-info → botocore_stubs-1.42.2}/PKG-INFO +8 -30
  2. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/README.md +2 -2
  3. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/__init__.pyi +9 -2
  4. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/args.pyi +42 -26
  5. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/auth.pyi +41 -30
  6. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/awsrequest.pyi +30 -24
  7. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/client.pyi +49 -35
  8. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/compat.pyi +28 -13
  9. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/compress.pyi +9 -3
  10. botocore_stubs-1.42.2/botocore-stubs/config.pyi +72 -0
  11. botocore_stubs-1.42.2/botocore-stubs/configloader.pyi +12 -0
  12. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/configprovider.pyi +41 -28
  13. botocore_stubs-1.42.2/botocore-stubs/context.pyi +33 -0
  14. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/credentials.pyi +149 -97
  15. botocore_stubs-1.42.2/botocore-stubs/crt/__init__.pyi +7 -0
  16. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/crt/auth.pyi +19 -9
  17. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/discovery.pyi +31 -14
  18. botocore_stubs-1.42.2/botocore-stubs/docs/__init__.pyi +11 -0
  19. botocore_stubs-1.42.2/botocore-stubs/docs/bcdoc/__init__.pyi +7 -0
  20. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/docs/bcdoc/docstringparser.pyi +13 -7
  21. botocore_stubs-1.42.2/botocore-stubs/docs/bcdoc/restdoc.pyi +61 -0
  22. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/docs/bcdoc/style.pyi +13 -7
  23. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/docs/client.pyi +10 -4
  24. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/docs/docstring.pyi +6 -2
  25. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/docs/example.pyi +34 -25
  26. botocore_stubs-1.42.2/botocore-stubs/docs/method.pyi +45 -0
  27. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/docs/paginator.pyi +9 -2
  28. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/docs/params.pyi +32 -22
  29. botocore_stubs-1.42.2/botocore-stubs/docs/service.pyi +20 -0
  30. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/docs/shape.pyi +12 -4
  31. botocore_stubs-1.42.2/botocore-stubs/docs/sharedexample.pyi +29 -0
  32. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/docs/translator.pyi +8 -2
  33. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/docs/utils.pyi +15 -10
  34. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/docs/waiter.pyi +8 -3
  35. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/endpoint.pyi +25 -14
  36. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/endpoint_provider.pyi +43 -42
  37. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/errorfactory.pyi +9 -3
  38. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/eventstream.pyi +23 -16
  39. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/exceptions.pyi +18 -10
  40. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/handlers.pyi +41 -15
  41. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/history.pyi +8 -2
  42. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/hooks.pyi +29 -22
  43. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/httpchecksum.pyi +22 -12
  44. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/httpsession.pyi +24 -17
  45. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/loaders.pyi +20 -13
  46. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/model.pyi +61 -46
  47. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/monitoring.pyi +30 -22
  48. botocore_stubs-1.42.2/botocore-stubs/paginate.pyi +74 -0
  49. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/parsers.pyi +29 -7
  50. botocore_stubs-1.42.2/botocore-stubs/plugin.pyi +24 -0
  51. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/regions.pyi +38 -29
  52. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/response.pyi +12 -4
  53. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/retries/adaptive.pyi +7 -1
  54. botocore_stubs-1.42.2/botocore-stubs/retries/base.pyi +13 -0
  55. botocore_stubs-1.42.2/botocore-stubs/retries/bucket.pyi +24 -0
  56. botocore_stubs-1.42.2/botocore-stubs/retries/quota.pyi +15 -0
  57. botocore_stubs-1.42.2/botocore-stubs/retries/special.pyi +19 -0
  58. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/retries/standard.pyi +33 -24
  59. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/retries/throttling.pyi +6 -0
  60. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/retryhandler.pyi +13 -6
  61. botocore_stubs-1.42.2/botocore-stubs/serialize.pyi +82 -0
  62. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/session.pyi +60 -55
  63. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/signers.pyi +39 -24
  64. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/stub.pyi +16 -15
  65. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/tokens.pyi +20 -6
  66. botocore_stubs-1.42.2/botocore-stubs/translate.pyi +18 -0
  67. botocore_stubs-1.42.2/botocore-stubs/useragent.pyi +63 -0
  68. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/utils.pyi +118 -82
  69. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/validate.pyi +9 -2
  70. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/waiter.pyi +12 -5
  71. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2/botocore_stubs.egg-info}/PKG-INFO +8 -30
  72. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore_stubs.egg-info/SOURCES.txt +2 -0
  73. botocore_stubs-1.42.2/botocore_stubs.egg-info/requires.txt +4 -0
  74. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/pyproject.toml +55 -38
  75. botocore_stubs-1.35.49/botocore-stubs/config.pyi +0 -60
  76. botocore_stubs-1.35.49/botocore-stubs/configloader.pyi +0 -6
  77. botocore_stubs-1.35.49/botocore-stubs/crt/__init__.pyi +0 -3
  78. botocore_stubs-1.35.49/botocore-stubs/docs/__init__.pyi +0 -7
  79. botocore_stubs-1.35.49/botocore-stubs/docs/bcdoc/__init__.pyi +0 -1
  80. botocore_stubs-1.35.49/botocore-stubs/docs/bcdoc/restdoc.pyi +0 -50
  81. botocore_stubs-1.35.49/botocore-stubs/docs/method.pyi +0 -37
  82. botocore_stubs-1.35.49/botocore-stubs/docs/service.pyi +0 -15
  83. botocore_stubs-1.35.49/botocore-stubs/docs/sharedexample.pyi +0 -14
  84. botocore_stubs-1.35.49/botocore-stubs/paginate.pyi +0 -59
  85. botocore_stubs-1.35.49/botocore-stubs/retries/base.pyi +0 -7
  86. botocore_stubs-1.35.49/botocore-stubs/retries/bucket.pyi +0 -20
  87. botocore_stubs-1.35.49/botocore-stubs/retries/quota.pyi +0 -9
  88. botocore_stubs-1.35.49/botocore-stubs/retries/special.pyi +0 -12
  89. botocore_stubs-1.35.49/botocore-stubs/serialize.pyi +0 -51
  90. botocore_stubs-1.35.49/botocore-stubs/translate.pyi +0 -11
  91. botocore_stubs-1.35.49/botocore-stubs/useragent.pyi +0 -42
  92. botocore_stubs-1.35.49/botocore_stubs.egg-info/requires.txt +0 -7
  93. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/LICENSE +0 -0
  94. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/MANIFEST.in +0 -0
  95. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/py.typed +0 -0
  96. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore-stubs/retries/__init__.pyi +0 -0
  97. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore_stubs.egg-info/dependency_links.txt +0 -0
  98. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/botocore_stubs.egg-info/top_level.txt +0 -0
  99. {botocore_stubs-1.35.49 → botocore_stubs-1.42.2}/setup.cfg +0 -0
@@ -1,30 +1,9 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: botocore-stubs
3
- Version: 1.35.49
3
+ Version: 1.42.2
4
4
  Summary: Type annotations and code completion for botocore
5
5
  Author-email: Vlad Emelianov <vlad.emelianov.nz@gmail.com>
6
- License: MIT License
7
-
8
- Copyright (c) 2022 Vlad Emelianov
9
-
10
- Permission is hereby granted, free of charge, to any person obtaining a copy
11
- of this software and associated documentation files (the "Software"), to deal
12
- in the Software without restriction, including without limitation the rights
13
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- copies of the Software, and to permit persons to whom the Software is
15
- furnished to do so, subject to the following conditions:
16
-
17
- The above copyright notice and this permission notice shall be included in all
18
- copies or substantial portions of the Software.
19
-
20
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
- SOFTWARE.
27
-
6
+ License-Expression: MIT
28
7
  Project-URL: Homepage, https://github.com/youtype/botocore-stubs
29
8
  Project-URL: Documentation, https://youtype.github.io/mypy_boto3_builder/
30
9
  Project-URL: Repository, https://github.com/youtype/botocore-stubs
@@ -33,34 +12,33 @@ Project-URL: Issues, https://github.com/youtype/botocore-stubs/issues
33
12
  Keywords: botocore,type-annotations,pyright,mypy,boto3
34
13
  Classifier: Development Status :: 5 - Production/Stable
35
14
  Classifier: Environment :: Console
36
- Classifier: License :: OSI Approved :: MIT License
37
15
  Classifier: Natural Language :: English
38
16
  Classifier: Operating System :: OS Independent
39
17
  Classifier: Programming Language :: Python :: 3
40
- Classifier: Programming Language :: Python :: 3.8
41
18
  Classifier: Programming Language :: Python :: 3.9
42
19
  Classifier: Programming Language :: Python :: 3.10
43
20
  Classifier: Programming Language :: Python :: 3.11
44
21
  Classifier: Programming Language :: Python :: 3.12
45
22
  Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
46
24
  Classifier: Programming Language :: Python :: 3 :: Only
47
25
  Classifier: Programming Language :: Python :: Implementation :: CPython
48
26
  Classifier: Typing :: Stubs Only
49
27
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
50
- Requires-Python: >=3.8
28
+ Requires-Python: >=3.9
51
29
  Description-Content-Type: text/markdown
52
30
  License-File: LICENSE
53
31
  Requires-Dist: types-awscrt
54
- Requires-Dist: typing-extensions>=4.1.0; python_version < "3.9"
55
32
  Provides-Extra: botocore
56
33
  Requires-Dist: botocore; extra == "botocore"
34
+ Dynamic: license-file
57
35
 
58
36
  # botocore-stubs
59
37
 
60
38
  [![PyPI - botocore-stubs](https://img.shields.io/pypi/v/botocore-stubs.svg?color=blue&label=botocore-stubs)](https://pypi.org/project/botocore-stubs)
61
39
  [![PyPI - botocore](https://img.shields.io/pypi/v/botocore.svg?color=blue&label=botocore)](https://pypi.org/project/botocore)
62
40
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/botocore-stubs.svg?color=blue)](https://pypi.org/project/botocore-stubs)
63
- [![PyPI - Downloads](https://static.pepy.tech/badge/botocore-stubs)](https://pepy.tech/project/botocore-stubs)
41
+ [![PyPI - Downloads](https://static.pepy.tech/badge/botocore-stubs)](https://pypistats.org/packages/botocore-stubs)
64
42
 
65
43
  ![boto3.typed](https://github.com/youtype/mypy_boto3_builder/raw/main/logo.png)
66
44
 
@@ -88,7 +66,7 @@ Use [mypy](https://github.com/python/mypy) or [pyright](https://github.com/micro
88
66
  ## Versioning
89
67
 
90
68
  `botocore-stubs` version is the same as related `botocore` version and follows
91
- [PEP 440](https://www.python.org/dev/peps/pep-0440/) format.
69
+ [Python Packaging version specifiers](https://packaging.python.org/en/latest/specifications/version-specifiers/).
92
70
 
93
71
  ## Support and contributing
94
72
 
@@ -3,7 +3,7 @@
3
3
  [![PyPI - botocore-stubs](https://img.shields.io/pypi/v/botocore-stubs.svg?color=blue&label=botocore-stubs)](https://pypi.org/project/botocore-stubs)
4
4
  [![PyPI - botocore](https://img.shields.io/pypi/v/botocore.svg?color=blue&label=botocore)](https://pypi.org/project/botocore)
5
5
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/botocore-stubs.svg?color=blue)](https://pypi.org/project/botocore-stubs)
6
- [![PyPI - Downloads](https://static.pepy.tech/badge/botocore-stubs)](https://pepy.tech/project/botocore-stubs)
6
+ [![PyPI - Downloads](https://static.pepy.tech/badge/botocore-stubs)](https://pypistats.org/packages/botocore-stubs)
7
7
 
8
8
  ![boto3.typed](https://github.com/youtype/mypy_boto3_builder/raw/main/logo.png)
9
9
 
@@ -31,7 +31,7 @@ Use [mypy](https://github.com/python/mypy) or [pyright](https://github.com/micro
31
31
  ## Versioning
32
32
 
33
33
  `botocore-stubs` version is the same as related `botocore` version and follows
34
- [PEP 440](https://www.python.org/dev/peps/pep-0440/) format.
34
+ [Python Packaging version specifiers](https://packaging.python.org/en/latest/specifications/version-specifiers/).
35
35
 
36
36
  ## Support and contributing
37
37
 
@@ -1,5 +1,12 @@
1
+ """
2
+ Type annotations for botocore module.
3
+
4
+ Copyright 2025 Vlad Emelianov
5
+ """
6
+
1
7
  import logging
2
- from typing import Any, Callable, Mapping, Tuple
8
+ from collections.abc import Mapping
9
+ from typing import Any, Callable
3
10
 
4
11
  from botocore.session import Session
5
12
 
@@ -7,7 +14,7 @@ class NullHandler(logging.Handler):
7
14
  def emit(self, record: Any) -> None: ...
8
15
 
9
16
  log: logging.Logger
10
- ScalarTypes: Tuple[str, ...]
17
+ ScalarTypes: tuple[str, ...]
11
18
  BOTOCORE_ROOT: str
12
19
 
13
20
  UNSIGNED: Any
@@ -1,12 +1,20 @@
1
- import sys
1
+ """
2
+ Type annotations for botocore.args module.
3
+
4
+ Copyright 2025 Vlad Emelianov
5
+ """
6
+
7
+ from collections.abc import Mapping
2
8
  from logging import Logger
3
- from typing import Any, Dict, List, Mapping, Optional, Union
9
+ from typing import Any, Literal, TypedDict, TypeVar
4
10
 
5
11
  from botocore.client import ClientEndpointBridge
6
12
  from botocore.config import Config as Config
7
13
  from botocore.configprovider import ConfigValueStore
14
+ from botocore.credentials import Credentials
8
15
  from botocore.endpoint import Endpoint
9
16
  from botocore.endpoint import EndpointCreator as EndpointCreator
17
+ from botocore.errorfactory import ClientExceptionsFactory
10
18
  from botocore.hooks import BaseEventHooks
11
19
  from botocore.loaders import Loader
12
20
  from botocore.model import ServiceModel
@@ -15,16 +23,17 @@ from botocore.serialize import BaseRestSerializer
15
23
  from botocore.signers import RequestSigner as RequestSigner
16
24
  from botocore.useragent import UserAgentString
17
25
 
18
- if sys.version_info >= (3, 9):
19
- from typing import TypedDict
20
- else:
21
- from typing_extensions import TypedDict
26
+ _R = TypeVar("_R")
22
27
 
23
28
  logger: Logger = ...
24
29
 
25
- VALID_REGIONAL_ENDPOINTS_CONFIG: List[str]
26
- LEGACY_GLOBAL_STS_REGIONS: List[str]
27
- USERAGENT_APPID_MAXLEN: int
30
+ VALID_REGIONAL_ENDPOINTS_CONFIG: list[str] = ...
31
+ LEGACY_GLOBAL_STS_REGIONS: list[str] = ...
32
+ USERAGENT_APPID_MAXLEN: int = ...
33
+ VALID_REQUEST_CHECKSUM_CALCULATION_CONFIG: tuple[str, ...] = ...
34
+ VALID_RESPONSE_CHECKSUM_VALIDATION_CONFIG: tuple[str, ...] = ...
35
+ PRIORITY_ORDERED_SUPPORTED_PROTOCOLS: tuple[str, ...] = ...
36
+ VALID_ACCOUNT_ID_ENDPOINT_MODE_CONFIG: tuple[str, ...] = ...
28
37
 
29
38
  class _GetClientArgsTypeDef(TypedDict):
30
39
  serializer: BaseRestSerializer
@@ -35,46 +44,46 @@ class _GetClientArgsTypeDef(TypedDict):
35
44
  service_model: ServiceModel
36
45
  loader: Loader
37
46
  client_config: Config
38
- partition: Optional[str]
39
- exceptions_factory: Any
47
+ partition: str | None
48
+ exceptions_factory: ClientExceptionsFactory
40
49
 
41
50
  class ClientArgsCreator:
42
51
  def __init__(
43
52
  self,
44
53
  event_emitter: BaseEventHooks,
45
- user_agent: Any,
54
+ user_agent: str,
46
55
  response_parser_factory: ResponseParserFactory,
47
56
  loader: Loader,
48
- exceptions_factory: Any,
57
+ exceptions_factory: ClientExceptionsFactory,
49
58
  config_store: ConfigValueStore,
50
- user_agent_creator: Optional[UserAgentString] = ...,
59
+ user_agent_creator: UserAgentString | None = ...,
51
60
  ) -> None: ...
52
61
  def get_client_args(
53
62
  self,
54
63
  service_model: ServiceModel,
55
64
  region_name: str,
56
65
  is_secure: bool,
57
- endpoint_url: Optional[str],
58
- verify: Optional[Union[str, bool]],
59
- credentials: Optional[Any],
60
- scoped_config: Optional[Mapping[str, Any]],
61
- client_config: Optional[Config],
66
+ endpoint_url: str | None,
67
+ verify: str | bool | None,
68
+ credentials: Any | None,
69
+ scoped_config: Mapping[str, Any] | None,
70
+ client_config: Config | None,
62
71
  endpoint_bridge: ClientEndpointBridge,
63
- auth_token: Optional[str] = ...,
64
- endpoints_ruleset_data: Optional[Mapping[str, Any]] = ...,
65
- partition_data: Optional[Mapping[str, Any]] = ...,
72
+ auth_token: str | None = ...,
73
+ endpoints_ruleset_data: Mapping[str, Any] | None = ...,
74
+ partition_data: Mapping[str, Any] | None = ...,
66
75
  ) -> _GetClientArgsTypeDef: ...
67
76
  def compute_client_args(
68
77
  self,
69
78
  service_model: ServiceModel,
70
- client_config: Optional[Config],
79
+ client_config: Config | None,
71
80
  endpoint_bridge: ClientEndpointBridge,
72
81
  region_name: str,
73
82
  endpoint_url: str,
74
83
  is_secure: bool,
75
- scoped_config: Optional[Mapping[str, Any]],
84
+ scoped_config: Mapping[str, Any] | None,
76
85
  ) -> Any: ...
77
- def compute_s3_config(self, client_config: Optional[Config]) -> Dict[str, Any]: ...
86
+ def compute_s3_config(self, client_config: Config | None) -> dict[str, Any]: ...
78
87
  def compute_endpoint_resolver_builtin_defaults(
79
88
  self,
80
89
  region_name: str,
@@ -83,4 +92,11 @@ class ClientArgsCreator:
83
92
  endpoint_bridge: ClientEndpointBridge,
84
93
  client_endpoint_url: str,
85
94
  legacy_endpoint_url: str,
86
- ) -> Dict[str, Any]: ...
95
+ credentials: Credentials | None,
96
+ account_id_endpoint_mode: Literal["preferred", "disabled", "required"] | None,
97
+ ) -> dict[str, Any]: ...
98
+
99
+ class ConfigObjectWrapper: ...
100
+
101
+ class ClientConfigString(str, ConfigObjectWrapper):
102
+ def __new__(cls: type[_R], value: Any = ...) -> _R: ...
@@ -1,6 +1,13 @@
1
+ """
2
+ Type annotations for botocore.auth module.
3
+
4
+ Copyright 2025 Vlad Emelianov
5
+ """
6
+
7
+ from collections.abc import Iterable, Mapping
1
8
  from http.client import HTTPMessage
2
9
  from logging import Logger
3
- from typing import Any, Dict, Iterable, List, Mapping, Optional, Tuple, Type, Union
10
+ from typing import Any
4
11
  from urllib.parse import SplitResult
5
12
 
6
13
  from botocore.awsrequest import AWSRequest
@@ -12,41 +19,41 @@ from botocore.utils import IdentityCache
12
19
 
13
20
  logger: Logger = ...
14
21
 
15
- _CredentialsUnion = Union[Credentials, ReadOnlyCredentials]
16
-
17
22
  EMPTY_SHA256_HASH: str
18
23
  PAYLOAD_BUFFER: int
19
24
  ISO8601: str
20
25
  SIGV4_TIMESTAMP: str
21
- SIGNED_HEADERS_BLACKLIST: List[str]
26
+ SIGNED_HEADERS_BLACKLIST: list[str]
22
27
  UNSIGNED_PAYLOAD: str
23
28
  STREAMING_UNSIGNED_PAYLOAD_TRAILER: str
24
29
 
25
30
  class BaseSigner:
26
31
  REQUIRES_REGION: bool = ...
27
32
  REQUIRES_TOKEN: bool = ...
28
- def add_auth(self, request: AWSRequest) -> Optional[AWSRequest]: ...
33
+ def add_auth(self, request: AWSRequest) -> AWSRequest | None: ...
29
34
 
30
35
  class TokenSigner(BaseSigner):
31
36
  def __init__(self, auth_token: str) -> None: ...
32
37
 
33
38
  class SigV2Auth(BaseSigner):
34
- def __init__(self, credentials: _CredentialsUnion) -> None:
35
- self.credentials: _CredentialsUnion
39
+ def __init__(self, credentials: Credentials | ReadOnlyCredentials) -> None:
40
+ self.credentials: Credentials | ReadOnlyCredentials
36
41
 
37
- def calc_signature(self, request: AWSRequest, params: Mapping[str, Any]) -> Tuple[str, str]: ...
42
+ def calc_signature(self, request: AWSRequest, params: Mapping[str, Any]) -> tuple[str, str]: ...
38
43
  def add_auth(self, request: AWSRequest) -> AWSRequest: ...
39
44
 
40
45
  class SigV3Auth(BaseSigner):
41
- def __init__(self, credentials: _CredentialsUnion) -> None:
42
- self.credentials: _CredentialsUnion
46
+ def __init__(self, credentials: Credentials | ReadOnlyCredentials) -> None:
47
+ self.credentials: Credentials | ReadOnlyCredentials
43
48
 
44
49
  def add_auth(self, request: AWSRequest) -> None: ...
45
50
 
46
51
  class SigV4Auth(BaseSigner):
47
52
  REQUIRES_REGION: bool = ...
48
- def __init__(self, credentials: _CredentialsUnion, service_name: str, region_name: str) -> None:
49
- self.credentials: _CredentialsUnion
53
+ def __init__(
54
+ self, credentials: Credentials | ReadOnlyCredentials, service_name: str, region_name: str
55
+ ) -> None:
56
+ self.credentials: Credentials | ReadOnlyCredentials
50
57
 
51
58
  def headers_to_sign(self, request: AWSRequest) -> HTTPMessage: ...
52
59
  def canonical_query_string(self, request: AWSRequest) -> str: ...
@@ -67,7 +74,7 @@ class S3ExpressAuth(S3SigV4Auth):
67
74
 
68
75
  def __init__(
69
76
  self,
70
- credentials: _CredentialsUnion,
77
+ credentials: Credentials | ReadOnlyCredentials,
71
78
  service_name: str,
72
79
  region_name: str,
73
80
  *,
@@ -81,7 +88,7 @@ class S3ExpressQueryAuth(S3ExpressAuth):
81
88
 
82
89
  def __init__(
83
90
  self,
84
- credentials: _CredentialsUnion,
91
+ credentials: Credentials | ReadOnlyCredentials,
85
92
  service_name: str,
86
93
  region_name: str,
87
94
  *,
@@ -93,7 +100,7 @@ class SigV4QueryAuth(SigV4Auth):
93
100
  DEFAULT_EXPIRES: int = ...
94
101
  def __init__(
95
102
  self,
96
- credentials: _CredentialsUnion,
103
+ credentials: Credentials | ReadOnlyCredentials,
97
104
  service_name: str,
98
105
  region_name: str,
99
106
  expires: int = ...,
@@ -106,42 +113,42 @@ class S3SigV4PostAuth(SigV4Auth):
106
113
  def add_auth(self, request: AWSRequest) -> None: ...
107
114
 
108
115
  class HmacV1Auth(BaseSigner):
109
- QSAOfInterest: List[str] = ...
116
+ QSAOfInterest: list[str] = ...
110
117
  def __init__(
111
118
  self,
112
- credentials: _CredentialsUnion,
113
- service_name: Optional[str] = ...,
114
- region_name: Optional[str] = ...,
119
+ credentials: Credentials | ReadOnlyCredentials,
120
+ service_name: str | None = ...,
121
+ region_name: str | None = ...,
115
122
  ) -> None:
116
- self.credentials: _CredentialsUnion
123
+ self.credentials: Credentials | ReadOnlyCredentials
117
124
 
118
125
  def sign_string(self, string_to_sign: str) -> str: ...
119
126
  def canonical_standard_headers(self, headers: Mapping[str, Any]) -> str: ...
120
127
  def canonical_custom_headers(self, headers: Mapping[str, Any]) -> str: ...
121
- def unquote_v(self, nv: str) -> Union[Tuple[str, str], str]: ...
122
- def canonical_resource(self, split: SplitResult, auth_path: Optional[str] = ...) -> str: ...
128
+ def unquote_v(self, nv: str) -> tuple[str, str] | str: ...
129
+ def canonical_resource(self, split: SplitResult, auth_path: str | None = ...) -> str: ...
123
130
  def canonical_string(
124
131
  self,
125
132
  method: str,
126
133
  split: SplitResult,
127
134
  headers: Mapping[str, Any],
128
- expires: Optional[int] = ...,
129
- auth_path: Optional[str] = ...,
135
+ expires: int | None = ...,
136
+ auth_path: str | None = ...,
130
137
  ) -> Any: ...
131
138
  def get_signature(
132
139
  self,
133
140
  method: str,
134
141
  split: SplitResult,
135
142
  headers: Mapping[str, Any],
136
- expires: Optional[int] = ...,
137
- auth_path: Optional[str] = ...,
143
+ expires: int | None = ...,
144
+ auth_path: str | None = ...,
138
145
  ) -> Any: ...
139
146
  def add_auth(self, request: AWSRequest) -> None: ...
140
147
 
141
148
  class HmacV1QueryAuth(HmacV1Auth):
142
149
  DEFAULT_EXPIRES: int = ...
143
- def __init__(self, credentials: _CredentialsUnion, expires: int = ...) -> None:
144
- self.credentials: _CredentialsUnion
150
+ def __init__(self, credentials: Credentials | ReadOnlyCredentials, expires: int = ...) -> None:
151
+ self.credentials: Credentials | ReadOnlyCredentials
145
152
 
146
153
  class HmacV1PostAuth(HmacV1Auth):
147
154
  def add_auth(self, request: AWSRequest) -> None: ...
@@ -150,6 +157,10 @@ class BearerAuth(TokenSigner):
150
157
  def add_auth(self, request: AWSRequest) -> None: ...
151
158
 
152
159
  def resolve_auth_type(auth_trait: Iterable[str]) -> str: ...
160
+ def resolve_auth_scheme_preference(
161
+ preference_list: Iterable[str], auth_options: Iterable[str]
162
+ ) -> str: ...
153
163
 
154
- AUTH_TYPE_MAPS: Dict[str, Type[BaseSigner]]
155
- AUTH_TYPE_TO_SIGNATURE_VERSION: Dict[str, str]
164
+ AUTH_TYPE_MAPS: dict[str, type[BaseSigner]]
165
+ AUTH_TYPE_TO_SIGNATURE_VERSION: dict[str, str]
166
+ AUTH_PREF_TO_SIGNATURE_VERSION: dict[str, str]
@@ -1,6 +1,12 @@
1
- from collections.abc import MutableMapping
1
+ """
2
+ Type annotations for botocore.awsrequest module.
3
+
4
+ Copyright 2025 Vlad Emelianov
5
+ """
6
+
7
+ from collections.abc import Iterator, Mapping, MutableMapping
2
8
  from logging import Logger
3
- from typing import IO, Any, Dict, Iterator, Mapping, Optional, Type, TypeVar, Union
9
+ from typing import IO, Any, TypeVar
4
10
 
5
11
  from botocore.compat import HTTPHeaders as HTTPHeaders
6
12
  from botocore.compat import HTTPResponse as HTTPResponse
@@ -20,15 +26,15 @@ class AWSHTTPResponse(HTTPResponse):
20
26
 
21
27
  class AWSConnection:
22
28
  def __init__(self, *args: Any, **kwargs: Any) -> None:
23
- self.response_class: Any
29
+ self.response_class: type[AWSHTTPResponse]
24
30
 
25
31
  def close(self) -> None: ...
26
32
  def request(
27
33
  self,
28
34
  method: str,
29
35
  url: str,
30
- body: Any = ...,
31
- headers: Optional[Mapping[str, Any]] = ...,
36
+ body: str | bytes | bytearray | IO[bytes] | IO[str] | None = ...,
37
+ headers: Mapping[str, Any] | None = ...,
32
38
  *args: Any,
33
39
  **kwargs: Any,
34
40
  ) -> HTTPConnection: ...
@@ -39,16 +45,16 @@ class AWSHTTPConnection(AWSConnection, HTTPConnection): ... # type: ignore [mis
39
45
  class AWSHTTPSConnection(AWSConnection, VerifiedHTTPSConnection): ... # type: ignore [misc]
40
46
 
41
47
  class AWSHTTPConnectionPool(HTTPConnectionPool):
42
- ConnectionCls: Type[AWSHTTPConnection] # type: ignore [misc,assignment]
48
+ ConnectionCls: type[AWSHTTPConnection] # type: ignore [misc,assignment]
43
49
 
44
50
  class AWSHTTPSConnectionPool(HTTPSConnectionPool):
45
- ConnectionCls: Type[AWSHTTPSConnection] # type: ignore [misc,assignment]
51
+ ConnectionCls: type[AWSHTTPSConnection] # type: ignore [misc,assignment]
46
52
 
47
53
  def prepare_request_dict(
48
54
  request_dict: Mapping[str, Any],
49
55
  endpoint_url: str,
50
- context: Optional[Any] = ...,
51
- user_agent: Optional[Any] = ...,
56
+ context: Mapping[str, Any] | None = ...,
57
+ user_agent: str | None = ...,
52
58
  ) -> None: ...
53
59
  def create_request_object(request_dict: Mapping[str, Any]) -> Any: ...
54
60
 
@@ -58,13 +64,13 @@ class AWSPreparedRequest:
58
64
  method: str,
59
65
  url: str,
60
66
  headers: HTTPHeaders,
61
- body: Union[str, bytes, bytearray, IO[bytes], IO[str], None],
67
+ body: str | bytes | bytearray | IO[bytes] | IO[str] | None,
62
68
  stream_output: bool,
63
69
  ) -> None:
64
70
  self.method: str
65
71
  self.url: str
66
72
  self.headers: HTTPHeaders
67
- self.body: Union[str, bytes, bytearray, IO[bytes], IO[str], None]
73
+ self.body: str | bytes | bytearray | IO[bytes] | IO[str] | None
68
74
  self.stream_output: bool
69
75
 
70
76
  def reset_stream(self) -> None: ...
@@ -72,22 +78,22 @@ class AWSPreparedRequest:
72
78
  class AWSRequest:
73
79
  def __init__(
74
80
  self,
75
- method: Optional[str] = ...,
76
- url: Optional[str] = ...,
77
- headers: Optional[Mapping[str, Any]] = ...,
78
- data: Optional[Any] = ...,
79
- params: Optional[Mapping[str, Any]] = ...,
80
- auth_path: Optional[str] = ...,
81
+ method: str | None = ...,
82
+ url: str | None = ...,
83
+ headers: Mapping[str, Any] | None = ...,
84
+ data: Any | None = ...,
85
+ params: Mapping[str, Any] | None = ...,
86
+ auth_path: str | None = ...,
81
87
  stream_output: bool = ...,
82
88
  ) -> None:
83
- self.method: Optional[str]
84
- self.url: Optional[str]
89
+ self.method: str | None
90
+ self.url: str | None
85
91
  self.headers: HTTPHeaders
86
- self.data: Optional[Any]
87
- self.params: Dict[str, Any]
88
- self.auth_path: Optional[str]
92
+ self.data: Any | None
93
+ self.params: dict[str, Any]
94
+ self.auth_path: str | None
89
95
  self.stream_output: bool
90
- self.context: Dict[str, Any]
96
+ self.context: dict[str, Any]
91
97
 
92
98
  def prepare(self) -> AWSPreparedRequest: ...
93
99
  @property
@@ -111,7 +117,7 @@ class AWSResponse:
111
117
  class _HeaderKey:
112
118
  def __init__(self, key: str) -> None: ...
113
119
  def __hash__(self) -> int: ...
114
- def __eq__(self, other: Any) -> bool: ...
120
+ def __eq__(self, other: object) -> bool: ...
115
121
 
116
122
  class HeadersDict(MutableMapping[str, str]):
117
123
  def __init__(self, *args: Any, **kwargs: Any) -> None: ...