botocore-stubs 1.34.66__tar.gz → 1.35.98__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 (95) hide show
  1. botocore_stubs-1.35.98/MANIFEST.in +4 -0
  2. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/PKG-INFO +39 -20
  3. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/README.md +1 -1
  4. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/__init__.pyi +8 -2
  5. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/args.pyi +27 -26
  6. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/auth.pyi +38 -29
  7. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/awsrequest.pyi +29 -23
  8. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/client.pyi +44 -35
  9. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/compat.pyi +23 -13
  10. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/compress.pyi +8 -3
  11. botocore_stubs-1.35.98/botocore-stubs/config.pyi +60 -0
  12. botocore_stubs-1.35.98/botocore-stubs/configloader.pyi +12 -0
  13. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/configprovider.pyi +40 -28
  14. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/credentials.pyi +105 -93
  15. botocore_stubs-1.35.98/botocore-stubs/crt/__init__.pyi +7 -0
  16. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/crt/auth.pyi +6 -2
  17. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/discovery.pyi +30 -14
  18. botocore_stubs-1.35.98/botocore-stubs/docs/__init__.pyi +11 -0
  19. botocore_stubs-1.35.98/botocore-stubs/docs/bcdoc/__init__.pyi +7 -0
  20. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/docs/bcdoc/docstringparser.pyi +13 -7
  21. botocore_stubs-1.35.98/botocore-stubs/docs/bcdoc/restdoc.pyi +60 -0
  22. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/docs/bcdoc/style.pyi +13 -7
  23. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/docs/client.pyi +10 -4
  24. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/docs/docstring.pyi +6 -2
  25. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/docs/example.pyi +34 -25
  26. botocore_stubs-1.35.98/botocore-stubs/docs/method.pyi +44 -0
  27. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/docs/paginator.pyi +9 -2
  28. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/docs/params.pyi +31 -22
  29. botocore_stubs-1.35.98/botocore-stubs/docs/service.pyi +20 -0
  30. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/docs/shape.pyi +11 -4
  31. botocore_stubs-1.35.98/botocore-stubs/docs/sharedexample.pyi +28 -0
  32. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/docs/translator.pyi +8 -2
  33. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/docs/utils.pyi +15 -10
  34. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/docs/waiter.pyi +8 -3
  35. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/endpoint.pyi +24 -14
  36. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/endpoint_provider.pyi +41 -40
  37. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/errorfactory.pyi +9 -3
  38. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/eventstream.pyi +22 -16
  39. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/exceptions.pyi +10 -10
  40. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/handlers.pyi +36 -14
  41. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/history.pyi +8 -2
  42. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/hooks.pyi +28 -22
  43. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/httpchecksum.pyi +15 -10
  44. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/httpsession.pyi +23 -17
  45. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/loaders.pyi +19 -13
  46. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/model.pyi +60 -44
  47. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/monitoring.pyi +29 -22
  48. botocore_stubs-1.35.98/botocore-stubs/paginate.pyi +73 -0
  49. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/parsers.pyi +13 -7
  50. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/regions.pyi +38 -29
  51. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/response.pyi +10 -4
  52. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/retries/adaptive.pyi +7 -1
  53. botocore_stubs-1.35.98/botocore-stubs/retries/base.pyi +13 -0
  54. botocore_stubs-1.35.98/botocore-stubs/retries/bucket.pyi +24 -0
  55. botocore_stubs-1.35.98/botocore-stubs/retries/quota.pyi +15 -0
  56. botocore_stubs-1.35.98/botocore-stubs/retries/special.pyi +19 -0
  57. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/retries/standard.pyi +32 -24
  58. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/retries/throttling.pyi +6 -0
  59. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/retryhandler.pyi +12 -6
  60. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/serialize.pyi +14 -8
  61. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/session.pyi +53 -55
  62. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/signers.pyi +40 -23
  63. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/stub.pyi +15 -15
  64. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/tokens.pyi +12 -6
  65. botocore_stubs-1.35.98/botocore-stubs/translate.pyi +18 -0
  66. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/useragent.pyi +11 -5
  67. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/utils.pyi +86 -76
  68. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/validate.pyi +7 -1
  69. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/waiter.pyi +11 -5
  70. botocore_stubs-1.35.98/botocore_stubs.egg-info/PKG-INFO +96 -0
  71. botocore_stubs-1.35.98/botocore_stubs.egg-info/SOURCES.txt +77 -0
  72. botocore_stubs-1.35.98/botocore_stubs.egg-info/dependency_links.txt +1 -0
  73. botocore_stubs-1.35.98/botocore_stubs.egg-info/requires.txt +4 -0
  74. botocore_stubs-1.35.98/botocore_stubs.egg-info/top_level.txt +1 -0
  75. botocore_stubs-1.35.98/pyproject.toml +153 -0
  76. botocore_stubs-1.35.98/setup.cfg +4 -0
  77. botocore_stubs-1.34.66/botocore-stubs/config.pyi +0 -60
  78. botocore_stubs-1.34.66/botocore-stubs/configloader.pyi +0 -6
  79. botocore_stubs-1.34.66/botocore-stubs/crt/__init__.pyi +0 -3
  80. botocore_stubs-1.34.66/botocore-stubs/docs/__init__.pyi +0 -7
  81. botocore_stubs-1.34.66/botocore-stubs/docs/bcdoc/__init__.pyi +0 -1
  82. botocore_stubs-1.34.66/botocore-stubs/docs/bcdoc/restdoc.pyi +0 -50
  83. botocore_stubs-1.34.66/botocore-stubs/docs/method.pyi +0 -37
  84. botocore_stubs-1.34.66/botocore-stubs/docs/service.pyi +0 -15
  85. botocore_stubs-1.34.66/botocore-stubs/docs/sharedexample.pyi +0 -14
  86. botocore_stubs-1.34.66/botocore-stubs/paginate.pyi +0 -59
  87. botocore_stubs-1.34.66/botocore-stubs/retries/base.pyi +0 -7
  88. botocore_stubs-1.34.66/botocore-stubs/retries/bucket.pyi +0 -20
  89. botocore_stubs-1.34.66/botocore-stubs/retries/quota.pyi +0 -9
  90. botocore_stubs-1.34.66/botocore-stubs/retries/special.pyi +0 -12
  91. botocore_stubs-1.34.66/botocore-stubs/translate.pyi +0 -11
  92. botocore_stubs-1.34.66/pyproject.toml +0 -89
  93. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/LICENSE +0 -0
  94. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/py.typed +0 -0
  95. {botocore_stubs-1.34.66 → botocore_stubs-1.35.98}/botocore-stubs/retries/__init__.pyi +0 -0
@@ -0,0 +1,4 @@
1
+ include botocore-stubs/py.typed
2
+ include botocore-stubs/*.pyi
3
+ include botocore-stubs/*/*.pyi
4
+ include botocore-stubs/*/*/*.pyi
@@ -1,13 +1,36 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: botocore-stubs
3
- Version: 1.34.66
3
+ Version: 1.35.98
4
4
  Summary: Type annotations and code completion for botocore
5
- Home-page: https://youtype.github.io/mypy_boto3_builder/
6
- License: MIT
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
+
28
+ Project-URL: Homepage, https://github.com/youtype/botocore-stubs
29
+ Project-URL: Documentation, https://youtype.github.io/mypy_boto3_builder/
30
+ Project-URL: Repository, https://github.com/youtype/botocore-stubs
31
+ Project-URL: Changelog, https://github.com/youtype/botocore-stubs/releases
32
+ Project-URL: Issues, https://github.com/youtype/botocore-stubs/issues
7
33
  Keywords: botocore,type-annotations,pyright,mypy,boto3
8
- Author: Vlad Emelianov
9
- Author-email: vlad.emelianov.nz@gmail.com
10
- Requires-Python: >=3.8,<4.0
11
34
  Classifier: Development Status :: 5 - Production/Stable
12
35
  Classifier: Environment :: Console
13
36
  Classifier: License :: OSI Approved :: MIT License
@@ -19,28 +42,25 @@ Classifier: Programming Language :: Python :: 3.9
19
42
  Classifier: Programming Language :: Python :: 3.10
20
43
  Classifier: Programming Language :: Python :: 3.11
21
44
  Classifier: Programming Language :: Python :: 3.12
22
- Classifier: Programming Language :: Python :: 3 :: Only
23
45
  Classifier: Programming Language :: Python :: 3.13
24
- Classifier: Programming Language :: Python :: 3.7
46
+ Classifier: Programming Language :: Python :: 3.14
47
+ Classifier: Programming Language :: Python :: 3 :: Only
25
48
  Classifier: Programming Language :: Python :: Implementation :: CPython
26
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
49
  Classifier: Typing :: Stubs Only
28
- Provides-Extra: botocore
29
- Requires-Dist: botocore ; extra == "botocore"
30
- Requires-Dist: types-awscrt
31
- Requires-Dist: typing-extensions (>=4.1.0) ; python_version < "3.9"
32
- Project-URL: Bug Tracker, https://github.com/youtype/botocore-stubs/issues
33
- Project-URL: Documentation, https://youtype.github.io/mypy_boto3_builder/
34
- Project-URL: Repository, https://github.com/youtype/botocore-stubs
35
- Project-URL: Source, https://github.com/youtype/botocore-stubs
50
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
51
+ Requires-Python: >=3.8
36
52
  Description-Content-Type: text/markdown
53
+ License-File: LICENSE
54
+ Requires-Dist: types-awscrt
55
+ Provides-Extra: botocore
56
+ Requires-Dist: botocore; extra == "botocore"
37
57
 
38
58
  # botocore-stubs
39
59
 
40
60
  [![PyPI - botocore-stubs](https://img.shields.io/pypi/v/botocore-stubs.svg?color=blue&label=botocore-stubs)](https://pypi.org/project/botocore-stubs)
41
61
  [![PyPI - botocore](https://img.shields.io/pypi/v/botocore.svg?color=blue&label=botocore)](https://pypi.org/project/botocore)
42
62
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/botocore-stubs.svg?color=blue)](https://pypi.org/project/botocore-stubs)
43
- [![PyPI - Downloads](https://static.pepy.tech/badge/botocore-stubs)](https://pepy.tech/project/botocore-stubs)
63
+ [![PyPI - Downloads](https://static.pepy.tech/badge/botocore-stubs)](https://pypistats.org/packages/botocore-stubs)
44
64
 
45
65
  ![boto3.typed](https://github.com/youtype/mypy_boto3_builder/raw/main/logo.png)
46
66
 
@@ -74,4 +94,3 @@ Use [mypy](https://github.com/python/mypy) or [pyright](https://github.com/micro
74
94
 
75
95
  Please reports any bugs or request new features in
76
96
  [botocore-stubs](https://github.com/youtype/botocore-stubs/issues/) repository.
77
-
@@ -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
 
@@ -1,5 +1,11 @@
1
+ """
2
+ Type annotations for botocore module.
3
+
4
+ Copyright 2024 Vlad Emelianov
5
+ """
6
+
1
7
  import logging
2
- from typing import Any, Callable, Mapping, Tuple
8
+ from typing import Any, Callable, Mapping
3
9
 
4
10
  from botocore.session import Session
5
11
 
@@ -7,7 +13,7 @@ class NullHandler(logging.Handler):
7
13
  def emit(self, record: Any) -> None: ...
8
14
 
9
15
  log: logging.Logger
10
- ScalarTypes: Tuple[str, ...]
16
+ ScalarTypes: tuple[str, ...]
11
17
  BOTOCORE_ROOT: str
12
18
 
13
19
  UNSIGNED: Any
@@ -1,12 +1,18 @@
1
- import sys
1
+ """
2
+ Type annotations for botocore.args module.
3
+
4
+ Copyright 2024 Vlad Emelianov
5
+ """
6
+
2
7
  from logging import Logger
3
- from typing import Any, Dict, List, Mapping, Optional, Union
8
+ from typing import Any, Mapping, TypedDict
4
9
 
5
10
  from botocore.client import ClientEndpointBridge
6
11
  from botocore.config import Config as Config
7
12
  from botocore.configprovider import ConfigValueStore
8
13
  from botocore.endpoint import Endpoint
9
14
  from botocore.endpoint import EndpointCreator as EndpointCreator
15
+ from botocore.errorfactory import ClientExceptionsFactory
10
16
  from botocore.hooks import BaseEventHooks
11
17
  from botocore.loaders import Loader
12
18
  from botocore.model import ServiceModel
@@ -15,15 +21,10 @@ from botocore.serialize import BaseRestSerializer
15
21
  from botocore.signers import RequestSigner as RequestSigner
16
22
  from botocore.useragent import UserAgentString
17
23
 
18
- if sys.version_info >= (3, 9):
19
- from typing import TypedDict
20
- else:
21
- from typing_extensions import TypedDict
22
-
23
24
  logger: Logger = ...
24
25
 
25
- VALID_REGIONAL_ENDPOINTS_CONFIG: List[str]
26
- LEGACY_GLOBAL_STS_REGIONS: List[str]
26
+ VALID_REGIONAL_ENDPOINTS_CONFIG: list[str]
27
+ LEGACY_GLOBAL_STS_REGIONS: list[str]
27
28
  USERAGENT_APPID_MAXLEN: int
28
29
 
29
30
  class _GetClientArgsTypeDef(TypedDict):
@@ -35,46 +36,46 @@ class _GetClientArgsTypeDef(TypedDict):
35
36
  service_model: ServiceModel
36
37
  loader: Loader
37
38
  client_config: Config
38
- partition: Optional[str]
39
- exceptions_factory: Any
39
+ partition: str | None
40
+ exceptions_factory: ClientExceptionsFactory
40
41
 
41
42
  class ClientArgsCreator:
42
43
  def __init__(
43
44
  self,
44
45
  event_emitter: BaseEventHooks,
45
- user_agent: Any,
46
+ user_agent: str,
46
47
  response_parser_factory: ResponseParserFactory,
47
48
  loader: Loader,
48
- exceptions_factory: Any,
49
+ exceptions_factory: ClientExceptionsFactory,
49
50
  config_store: ConfigValueStore,
50
- user_agent_creator: Optional[UserAgentString] = ...,
51
+ user_agent_creator: UserAgentString | None = ...,
51
52
  ) -> None: ...
52
53
  def get_client_args(
53
54
  self,
54
55
  service_model: ServiceModel,
55
56
  region_name: str,
56
57
  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],
58
+ endpoint_url: str | None,
59
+ verify: str | bool | None,
60
+ credentials: Any | None,
61
+ scoped_config: Mapping[str, Any] | None,
62
+ client_config: Config | None,
62
63
  endpoint_bridge: ClientEndpointBridge,
63
- auth_token: Optional[str] = ...,
64
- endpoints_ruleset_data: Optional[Mapping[str, Any]] = ...,
65
- partition_data: Optional[Mapping[str, Any]] = ...,
64
+ auth_token: str | None = ...,
65
+ endpoints_ruleset_data: Mapping[str, Any] | None = ...,
66
+ partition_data: Mapping[str, Any] | None = ...,
66
67
  ) -> _GetClientArgsTypeDef: ...
67
68
  def compute_client_args(
68
69
  self,
69
70
  service_model: ServiceModel,
70
- client_config: Optional[Config],
71
+ client_config: Config | None,
71
72
  endpoint_bridge: ClientEndpointBridge,
72
73
  region_name: str,
73
74
  endpoint_url: str,
74
75
  is_secure: bool,
75
- scoped_config: Optional[Mapping[str, Any]],
76
+ scoped_config: Mapping[str, Any] | None,
76
77
  ) -> Any: ...
77
- def compute_s3_config(self, client_config: Optional[Config]) -> Dict[str, Any]: ...
78
+ def compute_s3_config(self, client_config: Config | None) -> dict[str, Any]: ...
78
79
  def compute_endpoint_resolver_builtin_defaults(
79
80
  self,
80
81
  region_name: str,
@@ -83,4 +84,4 @@ class ClientArgsCreator:
83
84
  endpoint_bridge: ClientEndpointBridge,
84
85
  client_endpoint_url: str,
85
86
  legacy_endpoint_url: str,
86
- ) -> Dict[str, Any]: ...
87
+ ) -> dict[str, Any]: ...
@@ -1,6 +1,12 @@
1
+ """
2
+ Type annotations for botocore.auth module.
3
+
4
+ Copyright 2024 Vlad Emelianov
5
+ """
6
+
1
7
  from http.client import HTTPMessage
2
8
  from logging import Logger
3
- from typing import Any, Dict, Iterable, List, Mapping, Optional, Tuple, Type, Union
9
+ from typing import Any, Iterable, Mapping
4
10
  from urllib.parse import SplitResult
5
11
 
6
12
  from botocore.awsrequest import AWSRequest
@@ -12,41 +18,41 @@ from botocore.utils import IdentityCache
12
18
 
13
19
  logger: Logger = ...
14
20
 
15
- _CredentialsUnion = Union[Credentials, ReadOnlyCredentials]
16
-
17
21
  EMPTY_SHA256_HASH: str
18
22
  PAYLOAD_BUFFER: int
19
23
  ISO8601: str
20
24
  SIGV4_TIMESTAMP: str
21
- SIGNED_HEADERS_BLACKLIST: List[str]
25
+ SIGNED_HEADERS_BLACKLIST: list[str]
22
26
  UNSIGNED_PAYLOAD: str
23
27
  STREAMING_UNSIGNED_PAYLOAD_TRAILER: str
24
28
 
25
29
  class BaseSigner:
26
30
  REQUIRES_REGION: bool = ...
27
31
  REQUIRES_TOKEN: bool = ...
28
- def add_auth(self, request: AWSRequest) -> Optional[AWSRequest]: ...
32
+ def add_auth(self, request: AWSRequest) -> AWSRequest | None: ...
29
33
 
30
34
  class TokenSigner(BaseSigner):
31
35
  def __init__(self, auth_token: str) -> None: ...
32
36
 
33
37
  class SigV2Auth(BaseSigner):
34
- def __init__(self, credentials: _CredentialsUnion) -> None:
35
- self.credentials: _CredentialsUnion
38
+ def __init__(self, credentials: Credentials | ReadOnlyCredentials) -> None:
39
+ self.credentials: Credentials | ReadOnlyCredentials
36
40
 
37
- def calc_signature(self, request: AWSRequest, params: Mapping[str, Any]) -> Tuple[str, str]: ...
41
+ def calc_signature(self, request: AWSRequest, params: Mapping[str, Any]) -> tuple[str, str]: ...
38
42
  def add_auth(self, request: AWSRequest) -> AWSRequest: ...
39
43
 
40
44
  class SigV3Auth(BaseSigner):
41
- def __init__(self, credentials: _CredentialsUnion) -> None:
42
- self.credentials: _CredentialsUnion
45
+ def __init__(self, credentials: Credentials | ReadOnlyCredentials) -> None:
46
+ self.credentials: Credentials | ReadOnlyCredentials
43
47
 
44
48
  def add_auth(self, request: AWSRequest) -> None: ...
45
49
 
46
50
  class SigV4Auth(BaseSigner):
47
51
  REQUIRES_REGION: bool = ...
48
- def __init__(self, credentials: _CredentialsUnion, service_name: str, region_name: str) -> None:
49
- self.credentials: _CredentialsUnion
52
+ def __init__(
53
+ self, credentials: Credentials | ReadOnlyCredentials, service_name: str, region_name: str
54
+ ) -> None:
55
+ self.credentials: Credentials | ReadOnlyCredentials
50
56
 
51
57
  def headers_to_sign(self, request: AWSRequest) -> HTTPMessage: ...
52
58
  def canonical_query_string(self, request: AWSRequest) -> str: ...
@@ -67,7 +73,7 @@ class S3ExpressAuth(S3SigV4Auth):
67
73
 
68
74
  def __init__(
69
75
  self,
70
- credentials: _CredentialsUnion,
76
+ credentials: Credentials | ReadOnlyCredentials,
71
77
  service_name: str,
72
78
  region_name: str,
73
79
  *,
@@ -81,7 +87,7 @@ class S3ExpressQueryAuth(S3ExpressAuth):
81
87
 
82
88
  def __init__(
83
89
  self,
84
- credentials: _CredentialsUnion,
90
+ credentials: Credentials | ReadOnlyCredentials,
85
91
  service_name: str,
86
92
  region_name: str,
87
93
  *,
@@ -93,7 +99,7 @@ class SigV4QueryAuth(SigV4Auth):
93
99
  DEFAULT_EXPIRES: int = ...
94
100
  def __init__(
95
101
  self,
96
- credentials: _CredentialsUnion,
102
+ credentials: Credentials | ReadOnlyCredentials,
97
103
  service_name: str,
98
104
  region_name: str,
99
105
  expires: int = ...,
@@ -106,42 +112,42 @@ class S3SigV4PostAuth(SigV4Auth):
106
112
  def add_auth(self, request: AWSRequest) -> None: ...
107
113
 
108
114
  class HmacV1Auth(BaseSigner):
109
- QSAOfInterest: List[str] = ...
115
+ QSAOfInterest: list[str] = ...
110
116
  def __init__(
111
117
  self,
112
- credentials: _CredentialsUnion,
113
- service_name: Optional[str] = ...,
114
- region_name: Optional[str] = ...,
118
+ credentials: Credentials | ReadOnlyCredentials,
119
+ service_name: str | None = ...,
120
+ region_name: str | None = ...,
115
121
  ) -> None:
116
- self.credentials: _CredentialsUnion
122
+ self.credentials: Credentials | ReadOnlyCredentials
117
123
 
118
124
  def sign_string(self, string_to_sign: str) -> str: ...
119
125
  def canonical_standard_headers(self, headers: Mapping[str, Any]) -> str: ...
120
126
  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: ...
127
+ def unquote_v(self, nv: str) -> tuple[str, str] | str: ...
128
+ def canonical_resource(self, split: SplitResult, auth_path: str | None = ...) -> str: ...
123
129
  def canonical_string(
124
130
  self,
125
131
  method: str,
126
132
  split: SplitResult,
127
133
  headers: Mapping[str, Any],
128
- expires: Optional[int] = ...,
129
- auth_path: Optional[str] = ...,
134
+ expires: int | None = ...,
135
+ auth_path: str | None = ...,
130
136
  ) -> Any: ...
131
137
  def get_signature(
132
138
  self,
133
139
  method: str,
134
140
  split: SplitResult,
135
141
  headers: Mapping[str, Any],
136
- expires: Optional[int] = ...,
137
- auth_path: Optional[str] = ...,
142
+ expires: int | None = ...,
143
+ auth_path: str | None = ...,
138
144
  ) -> Any: ...
139
145
  def add_auth(self, request: AWSRequest) -> None: ...
140
146
 
141
147
  class HmacV1QueryAuth(HmacV1Auth):
142
148
  DEFAULT_EXPIRES: int = ...
143
- def __init__(self, credentials: _CredentialsUnion, expires: int = ...) -> None:
144
- self.credentials: _CredentialsUnion
149
+ def __init__(self, credentials: Credentials | ReadOnlyCredentials, expires: int = ...) -> None:
150
+ self.credentials: Credentials | ReadOnlyCredentials
145
151
 
146
152
  class HmacV1PostAuth(HmacV1Auth):
147
153
  def add_auth(self, request: AWSRequest) -> None: ...
@@ -149,4 +155,7 @@ class HmacV1PostAuth(HmacV1Auth):
149
155
  class BearerAuth(TokenSigner):
150
156
  def add_auth(self, request: AWSRequest) -> None: ...
151
157
 
152
- AUTH_TYPE_MAPS: Dict[str, Type[BaseSigner]]
158
+ def resolve_auth_type(auth_trait: Iterable[str]) -> str: ...
159
+
160
+ AUTH_TYPE_MAPS: dict[str, type[BaseSigner]]
161
+ AUTH_TYPE_TO_SIGNATURE_VERSION: dict[str, str]
@@ -1,6 +1,12 @@
1
+ """
2
+ Type annotations for botocore.awsrequest module.
3
+
4
+ Copyright 2024 Vlad Emelianov
5
+ """
6
+
1
7
  from collections.abc import 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, Iterator, Mapping, 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: ...
@@ -1,15 +1,23 @@
1
+ """
2
+ Type annotations for botocore.client module.
3
+
4
+ Copyright 2024 Vlad Emelianov
5
+ """
6
+
1
7
  from logging import Logger
2
- from typing import Any, Dict, List, Optional, Union
8
+ from typing import Any, Mapping
3
9
 
4
10
  from botocore.args import ClientArgsCreator as ClientArgsCreator
5
11
  from botocore.auth import AUTH_TYPE_MAPS as AUTH_TYPE_MAPS
6
12
  from botocore.awsrequest import prepare_request_dict as prepare_request_dict
7
13
  from botocore.config import Config as Config
14
+ from botocore.configprovider import ConfigValueStore
8
15
  from botocore.discovery import EndpointDiscoveryHandler as EndpointDiscoveryHandler
9
16
  from botocore.discovery import EndpointDiscoveryManager as EndpointDiscoveryManager
10
17
  from botocore.discovery import (
11
18
  block_endpoint_discovery_required_operations as block_endpoint_discovery_required_operations,
12
19
  )
20
+ from botocore.errorfactory import BaseClientExceptions, ClientExceptionsFactory
13
21
  from botocore.exceptions import ClientError as ClientError
14
22
  from botocore.exceptions import DataNotFoundError as DataNotFoundError
15
23
  from botocore.exceptions import (
@@ -24,6 +32,7 @@ from botocore.hooks import first_non_none_response as first_non_none_response
24
32
  from botocore.loaders import Loader
25
33
  from botocore.model import ServiceModel as ServiceModel
26
34
  from botocore.paginate import Paginator as Paginator
35
+ from botocore.parsers import ResponseParser, ResponseParserFactory
27
36
  from botocore.regions import BaseEndpointResolver, EndpointRulesetResolver
28
37
  from botocore.retries import adaptive as adaptive
29
38
  from botocore.retries import standard as standard
@@ -52,50 +61,50 @@ class ClientCreator:
52
61
  event_emitter: BaseEventHooks,
53
62
  retry_handler_factory: Any,
54
63
  retry_config_translator: Any,
55
- response_parser_factory: Optional[Any] = ...,
56
- exceptions_factory: Optional[Any] = ...,
57
- config_store: Optional[Any] = ...,
58
- user_agent_creator: Optional[UserAgentString] = ...,
64
+ response_parser_factory: ResponseParserFactory | None = ...,
65
+ exceptions_factory: ClientExceptionsFactory | None = ...,
66
+ config_store: ConfigValueStore | None = ...,
67
+ user_agent_creator: UserAgentString | None = ...,
59
68
  ) -> None: ...
60
69
  def create_client(
61
70
  self,
62
71
  service_name: str,
63
72
  region_name: str,
64
73
  is_secure: bool = ...,
65
- endpoint_url: Optional[str] = ...,
66
- verify: Optional[Union[str, bool]] = ...,
67
- credentials: Optional[Any] = ...,
68
- scoped_config: Optional[Any] = ...,
69
- api_version: Optional[str] = ...,
70
- client_config: Optional[Config] = ...,
71
- auth_token: Optional[str] = ...,
74
+ endpoint_url: str | None = ...,
75
+ verify: str | bool | None = ...,
76
+ credentials: Any | None = ...,
77
+ scoped_config: Mapping[str, Any] | None = ...,
78
+ api_version: str | None = ...,
79
+ client_config: Config | None = ...,
80
+ auth_token: str | None = ...,
72
81
  ) -> BaseClient: ...
73
- def create_client_class(self, service_name: str, api_version: Optional[Any] = ...) -> None: ...
82
+ def create_client_class(self, service_name: str, api_version: str | None = ...) -> None: ...
74
83
 
75
84
  class ClientEndpointBridge:
76
85
  DEFAULT_ENDPOINT: str = ...
77
86
  def __init__(
78
87
  self,
79
88
  endpoint_resolver: BaseEndpointResolver,
80
- scoped_config: Optional[Any] = ...,
81
- client_config: Optional[Any] = ...,
82
- default_endpoint: Optional[str] = ...,
83
- service_signing_name: Optional[str] = ...,
84
- config_store: Any = ...,
85
- service_signature_version: Optional[str] = ...,
89
+ scoped_config: Mapping[str, Any] | None = ...,
90
+ client_config: Config | None = ...,
91
+ default_endpoint: str | None = ...,
92
+ service_signing_name: str | None = ...,
93
+ config_store: ConfigValueStore | None = ...,
94
+ service_signature_version: str | None = ...,
86
95
  ) -> None:
87
96
  self.service_signing_name: str
88
97
  self.endpoint_resolver: BaseEndpointResolver
89
- self.scoped_config: Any
90
- self.client_config: Any
98
+ self.scoped_config: Mapping[str, Any]
99
+ self.client_config: Config
91
100
  self.default_endpoint: str
92
- self.config_store: Any
101
+ self.config_store: ConfigValueStore
93
102
 
94
103
  def resolve(
95
104
  self,
96
105
  service_name: str,
97
- region_name: Optional[str] = ...,
98
- endpoint_url: Optional[str] = ...,
106
+ region_name: str | None = ...,
107
+ endpoint_url: str | None = ...,
99
108
  is_secure: bool = ...,
100
109
  ) -> None: ...
101
110
  def resolver_uses_builtin_data(self) -> bool: ...
@@ -105,28 +114,28 @@ class BaseClient:
105
114
  self,
106
115
  serializer: Serializer,
107
116
  endpoint: str,
108
- response_parser: Any,
117
+ response_parser: ResponseParser,
109
118
  event_emitter: BaseEventHooks,
110
119
  request_signer: RequestSigner,
111
120
  service_model: ServiceModel,
112
121
  loader: Loader,
113
122
  client_config: Config,
114
123
  partition: str,
115
- exceptions_factory: Any,
116
- endpoint_ruleset_resolver: Optional[EndpointRulesetResolver] = ...,
117
- user_agent_creator: Optional[UserAgentString] = ...,
124
+ exceptions_factory: ClientExceptionsFactory,
125
+ endpoint_ruleset_resolver: EndpointRulesetResolver | None = ...,
126
+ user_agent_creator: UserAgentString | None = ...,
118
127
  ) -> None:
119
128
  self.meta: ClientMeta
120
129
  # FIXME: it hides `has no attribute` errors on Client type checking
121
130
  # def __getattr__(self, item: str) -> Any: ...
122
131
  def close(self) -> None: ...
123
- def get_paginator(self, operation_name: Any) -> Paginator: ...
132
+ def get_paginator(self, operation_name: str) -> Paginator[Any]: ...
124
133
  def can_paginate(self, operation_name: str) -> bool: ...
125
- def get_waiter(self, waiter_name: Any) -> Waiter: ...
134
+ def get_waiter(self, waiter_name: str) -> Waiter: ...
126
135
  @CachedProperty
127
- def waiter_names(self) -> List[str]: ...
136
+ def waiter_names(self) -> list[str]: ...
128
137
  @property
129
- def exceptions(self) -> Any: ...
138
+ def exceptions(self) -> BaseClientExceptions: ...
130
139
 
131
140
  class ClientMeta:
132
141
  def __init__(
@@ -135,7 +144,7 @@ class ClientMeta:
135
144
  client_config: Config,
136
145
  endpoint_url: str,
137
146
  service_model: ServiceModel,
138
- method_to_api_mapping: Dict[str, str],
147
+ method_to_api_mapping: Mapping[str, str],
139
148
  partition: str,
140
149
  ) -> None:
141
150
  self.events: BaseEventHooks
@@ -147,8 +156,8 @@ class ClientMeta:
147
156
  @property
148
157
  def endpoint_url(self) -> str: ...
149
158
  @property
150
- def config(self) -> Any: ...
159
+ def config(self) -> Config: ...
151
160
  @property
152
- def method_to_api_mapping(self) -> Dict[str, str]: ...
161
+ def method_to_api_mapping(self) -> dict[str, str]: ...
153
162
  @property
154
163
  def partition(self) -> str: ...