botocore-stubs 1.34.128__tar.gz → 1.40.76__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.
Files changed (98) hide show
  1. botocore_stubs-1.40.76/MANIFEST.in +4 -0
  2. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/PKG-INFO +20 -22
  3. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/README.md +2 -2
  4. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/__init__.pyi +9 -2
  5. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/args.pyi +42 -26
  6. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/auth.pyi +43 -29
  7. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/awsrequest.pyi +30 -24
  8. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/client.pyi +49 -35
  9. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/compat.pyi +28 -13
  10. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/compress.pyi +9 -3
  11. botocore_stubs-1.40.76/botocore-stubs/config.pyi +72 -0
  12. botocore_stubs-1.40.76/botocore-stubs/configloader.pyi +12 -0
  13. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/configprovider.pyi +41 -28
  14. botocore_stubs-1.40.76/botocore-stubs/context.pyi +33 -0
  15. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/credentials.pyi +125 -97
  16. botocore_stubs-1.40.76/botocore-stubs/crt/__init__.pyi +7 -0
  17. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/crt/auth.pyi +19 -9
  18. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/discovery.pyi +31 -14
  19. botocore_stubs-1.40.76/botocore-stubs/docs/__init__.pyi +11 -0
  20. botocore_stubs-1.40.76/botocore-stubs/docs/bcdoc/__init__.pyi +7 -0
  21. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/docs/bcdoc/docstringparser.pyi +13 -7
  22. botocore_stubs-1.40.76/botocore-stubs/docs/bcdoc/restdoc.pyi +61 -0
  23. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/docs/bcdoc/style.pyi +13 -7
  24. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/docs/client.pyi +10 -4
  25. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/docs/docstring.pyi +6 -2
  26. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/docs/example.pyi +34 -25
  27. botocore_stubs-1.40.76/botocore-stubs/docs/method.pyi +45 -0
  28. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/docs/paginator.pyi +9 -2
  29. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/docs/params.pyi +32 -22
  30. botocore_stubs-1.40.76/botocore-stubs/docs/service.pyi +20 -0
  31. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/docs/shape.pyi +12 -4
  32. botocore_stubs-1.40.76/botocore-stubs/docs/sharedexample.pyi +29 -0
  33. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/docs/translator.pyi +8 -2
  34. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/docs/utils.pyi +15 -10
  35. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/docs/waiter.pyi +8 -3
  36. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/endpoint.pyi +25 -14
  37. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/endpoint_provider.pyi +43 -42
  38. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/errorfactory.pyi +9 -3
  39. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/eventstream.pyi +23 -16
  40. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/exceptions.pyi +13 -10
  41. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/handlers.pyi +41 -15
  42. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/history.pyi +8 -2
  43. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/hooks.pyi +29 -22
  44. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/httpchecksum.pyi +22 -12
  45. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/httpsession.pyi +24 -17
  46. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/loaders.pyi +20 -13
  47. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/model.pyi +65 -44
  48. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/monitoring.pyi +30 -22
  49. botocore_stubs-1.40.76/botocore-stubs/paginate.pyi +74 -0
  50. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/parsers.pyi +29 -7
  51. botocore_stubs-1.40.76/botocore-stubs/plugin.pyi +24 -0
  52. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/regions.pyi +38 -29
  53. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/response.pyi +12 -4
  54. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/retries/adaptive.pyi +7 -1
  55. botocore_stubs-1.40.76/botocore-stubs/retries/base.pyi +13 -0
  56. botocore_stubs-1.40.76/botocore-stubs/retries/bucket.pyi +24 -0
  57. botocore_stubs-1.40.76/botocore-stubs/retries/quota.pyi +15 -0
  58. botocore_stubs-1.40.76/botocore-stubs/retries/special.pyi +19 -0
  59. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/retries/standard.pyi +33 -24
  60. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/retries/throttling.pyi +6 -0
  61. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/retryhandler.pyi +13 -6
  62. botocore_stubs-1.40.76/botocore-stubs/serialize.pyi +82 -0
  63. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/session.pyi +60 -55
  64. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/signers.pyi +41 -26
  65. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/stub.pyi +16 -15
  66. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/tokens.pyi +20 -6
  67. botocore_stubs-1.40.76/botocore-stubs/translate.pyi +18 -0
  68. botocore_stubs-1.40.76/botocore-stubs/useragent.pyi +63 -0
  69. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/utils.pyi +110 -82
  70. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/validate.pyi +9 -2
  71. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/waiter.pyi +12 -5
  72. botocore_stubs-1.40.76/botocore_stubs.egg-info/PKG-INFO +74 -0
  73. botocore_stubs-1.40.76/botocore_stubs.egg-info/SOURCES.txt +79 -0
  74. botocore_stubs-1.40.76/botocore_stubs.egg-info/dependency_links.txt +1 -0
  75. botocore_stubs-1.40.76/botocore_stubs.egg-info/requires.txt +4 -0
  76. botocore_stubs-1.40.76/botocore_stubs.egg-info/top_level.txt +1 -0
  77. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/pyproject.toml +76 -65
  78. botocore_stubs-1.40.76/setup.cfg +4 -0
  79. botocore_stubs-1.34.128/botocore-stubs/config.pyi +0 -60
  80. botocore_stubs-1.34.128/botocore-stubs/configloader.pyi +0 -6
  81. botocore_stubs-1.34.128/botocore-stubs/crt/__init__.pyi +0 -3
  82. botocore_stubs-1.34.128/botocore-stubs/docs/__init__.pyi +0 -7
  83. botocore_stubs-1.34.128/botocore-stubs/docs/bcdoc/__init__.pyi +0 -1
  84. botocore_stubs-1.34.128/botocore-stubs/docs/bcdoc/restdoc.pyi +0 -50
  85. botocore_stubs-1.34.128/botocore-stubs/docs/method.pyi +0 -37
  86. botocore_stubs-1.34.128/botocore-stubs/docs/service.pyi +0 -15
  87. botocore_stubs-1.34.128/botocore-stubs/docs/sharedexample.pyi +0 -14
  88. botocore_stubs-1.34.128/botocore-stubs/paginate.pyi +0 -59
  89. botocore_stubs-1.34.128/botocore-stubs/retries/base.pyi +0 -7
  90. botocore_stubs-1.34.128/botocore-stubs/retries/bucket.pyi +0 -20
  91. botocore_stubs-1.34.128/botocore-stubs/retries/quota.pyi +0 -9
  92. botocore_stubs-1.34.128/botocore-stubs/retries/special.pyi +0 -12
  93. botocore_stubs-1.34.128/botocore-stubs/serialize.pyi +0 -51
  94. botocore_stubs-1.34.128/botocore-stubs/translate.pyi +0 -11
  95. botocore_stubs-1.34.128/botocore-stubs/useragent.pyi +0 -42
  96. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/LICENSE +0 -0
  97. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/botocore-stubs/py.typed +0 -0
  98. {botocore_stubs-1.34.128 → botocore_stubs-1.40.76}/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,45 +1,44 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: botocore-stubs
3
- Version: 1.34.128
3
+ Version: 1.40.76
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-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/youtype/botocore-stubs
8
+ Project-URL: Documentation, https://youtype.github.io/mypy_boto3_builder/
9
+ Project-URL: Repository, https://github.com/youtype/botocore-stubs
10
+ Project-URL: Changelog, https://github.com/youtype/botocore-stubs/releases
11
+ Project-URL: Issues, https://github.com/youtype/botocore-stubs/issues
7
12
  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
13
  Classifier: Development Status :: 5 - Production/Stable
12
14
  Classifier: Environment :: Console
13
- Classifier: License :: OSI Approved :: MIT License
14
15
  Classifier: Natural Language :: English
15
16
  Classifier: Operating System :: OS Independent
16
17
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.8
18
18
  Classifier: Programming Language :: Python :: 3.9
19
19
  Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
21
  Classifier: Programming Language :: Python :: 3.12
22
- Classifier: Programming Language :: Python :: 3 :: Only
23
22
  Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Programming Language :: Python :: 3 :: Only
24
25
  Classifier: Programming Language :: Python :: Implementation :: CPython
25
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
26
  Classifier: Typing :: Stubs Only
27
- Provides-Extra: botocore
28
- Requires-Dist: botocore ; extra == "botocore"
29
- Requires-Dist: types-awscrt
30
- Requires-Dist: typing-extensions (>=4.1.0) ; python_version < "3.9"
31
- Project-URL: Bug Tracker, https://github.com/youtype/botocore-stubs/issues
32
- Project-URL: Documentation, https://youtype.github.io/mypy_boto3_builder/
33
- Project-URL: Repository, https://github.com/youtype/botocore-stubs
34
- Project-URL: Source, https://github.com/youtype/botocore-stubs
27
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
28
+ Requires-Python: >=3.9
35
29
  Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ Requires-Dist: types-awscrt
32
+ Provides-Extra: botocore
33
+ Requires-Dist: botocore; extra == "botocore"
34
+ Dynamic: license-file
36
35
 
37
36
  # botocore-stubs
38
37
 
39
38
  [![PyPI - botocore-stubs](https://img.shields.io/pypi/v/botocore-stubs.svg?color=blue&label=botocore-stubs)](https://pypi.org/project/botocore-stubs)
40
39
  [![PyPI - botocore](https://img.shields.io/pypi/v/botocore.svg?color=blue&label=botocore)](https://pypi.org/project/botocore)
41
40
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/botocore-stubs.svg?color=blue)](https://pypi.org/project/botocore-stubs)
42
- [![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)
43
42
 
44
43
  ![boto3.typed](https://github.com/youtype/mypy_boto3_builder/raw/main/logo.png)
45
44
 
@@ -67,10 +66,9 @@ Use [mypy](https://github.com/python/mypy) or [pyright](https://github.com/micro
67
66
  ## Versioning
68
67
 
69
68
  `botocore-stubs` version is the same as related `botocore` version and follows
70
- [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/).
71
70
 
72
71
  ## Support and contributing
73
72
 
74
73
  Please reports any bugs or request new features in
75
74
  [botocore-stubs](https://github.com/youtype/botocore-stubs/issues/) repository.
76
-
@@ -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: ...
@@ -149,4 +156,11 @@ class HmacV1PostAuth(HmacV1Auth):
149
156
  class BearerAuth(TokenSigner):
150
157
  def add_auth(self, request: AWSRequest) -> None: ...
151
158
 
152
- AUTH_TYPE_MAPS: Dict[str, Type[BaseSigner]]
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: ...
163
+
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: ...