botocore-stubs 1.35.69__py3-none-any.whl → 1.35.71__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of botocore-stubs might be problematic. Click here for more details.
- botocore-stubs/__init__.pyi +6 -2
- botocore-stubs/args.pyi +22 -24
- botocore-stubs/auth.pyi +34 -30
- botocore-stubs/awsrequest.pyi +25 -21
- botocore-stubs/client.pyi +31 -27
- botocore-stubs/compat.pyi +14 -9
- botocore-stubs/compress.pyi +6 -3
- botocore-stubs/config.pyi +27 -29
- botocore-stubs/configloader.pyi +9 -5
- botocore-stubs/configprovider.pyi +27 -25
- botocore-stubs/credentials.pyi +73 -69
- botocore-stubs/crt/__init__.pyi +1 -3
- botocore-stubs/crt/auth.pyi +4 -2
- botocore-stubs/discovery.pyi +11 -8
- botocore-stubs/docs/__init__.pyi +1 -3
- botocore-stubs/docs/bcdoc/docstringparser.pyi +11 -7
- botocore-stubs/docs/bcdoc/restdoc.pyi +10 -6
- botocore-stubs/docs/bcdoc/style.pyi +11 -7
- botocore-stubs/docs/client.pyi +8 -4
- botocore-stubs/docs/docstring.pyi +4 -2
- botocore-stubs/docs/example.pyi +20 -16
- botocore-stubs/docs/method.pyi +16 -12
- botocore-stubs/docs/paginator.pyi +4 -0
- botocore-stubs/docs/params.pyi +18 -14
- botocore-stubs/docs/service.pyi +6 -2
- botocore-stubs/docs/shape.pyi +6 -2
- botocore-stubs/docs/sharedexample.pyi +4 -0
- botocore-stubs/docs/translator.pyi +6 -2
- botocore-stubs/docs/utils.pyi +8 -4
- botocore-stubs/docs/waiter.pyi +4 -0
- botocore-stubs/endpoint.pyi +15 -11
- botocore-stubs/endpoint_provider.pyi +38 -39
- botocore-stubs/errorfactory.pyi +7 -3
- botocore-stubs/eventstream.pyi +20 -16
- botocore-stubs/exceptions.pyi +8 -10
- botocore-stubs/handlers.pyi +10 -6
- botocore-stubs/history.pyi +6 -2
- botocore-stubs/hooks.pyi +19 -17
- botocore-stubs/httpchecksum.pyi +13 -10
- botocore-stubs/httpsession.pyi +21 -17
- botocore-stubs/loaders.pyi +17 -13
- botocore-stubs/model.pyi +50 -46
- botocore-stubs/monitoring.pyi +23 -20
- botocore-stubs/paginate.pyi +7 -3
- botocore-stubs/parsers.pyi +11 -7
- botocore-stubs/regions.pyi +18 -14
- botocore-stubs/response.pyi +8 -4
- botocore-stubs/retries/adaptive.pyi +5 -1
- botocore-stubs/retries/bucket.pyi +4 -0
- botocore-stubs/retries/quota.pyi +6 -2
- botocore-stubs/retries/special.pyi +4 -0
- botocore-stubs/retries/standard.pyi +16 -12
- botocore-stubs/retries/throttling.pyi +4 -0
- botocore-stubs/retryhandler.pyi +10 -6
- botocore-stubs/serialize.pyi +11 -7
- botocore-stubs/session.pyi +43 -49
- botocore-stubs/signers.pyi +26 -24
- botocore-stubs/stub.pyi +13 -15
- botocore-stubs/tokens.pyi +10 -6
- botocore-stubs/translate.pyi +6 -2
- botocore-stubs/useragent.pyi +9 -5
- botocore-stubs/utils.pyi +57 -58
- botocore-stubs/validate.pyi +5 -1
- botocore-stubs/waiter.pyi +9 -5
- {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.71.dist-info}/METADATA +1 -2
- botocore_stubs-1.35.71.dist-info/RECORD +73 -0
- botocore_stubs-1.35.69.dist-info/RECORD +0 -73
- {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.71.dist-info}/LICENSE +0 -0
- {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.71.dist-info}/WHEEL +0 -0
- {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.71.dist-info}/top_level.txt +0 -0
botocore-stubs/model.pyi
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import Any, Mapping, NamedTuple, TypeVar
|
|
2
6
|
|
|
3
7
|
from botocore.utils import CachedProperty
|
|
4
8
|
|
|
@@ -15,31 +19,31 @@ class ServiceId(str):
|
|
|
15
19
|
def hyphenize(self) -> str: ...
|
|
16
20
|
|
|
17
21
|
class Shape:
|
|
18
|
-
SERIALIZED_ATTRS:
|
|
19
|
-
METADATA_ATTRS:
|
|
20
|
-
MAP_TYPE:
|
|
22
|
+
SERIALIZED_ATTRS: list[str]
|
|
23
|
+
METADATA_ATTRS: list[str]
|
|
24
|
+
MAP_TYPE: type[dict[str, Any]]
|
|
21
25
|
def __init__(
|
|
22
26
|
self,
|
|
23
27
|
shape_name: str,
|
|
24
28
|
shape_model: Mapping[str, Any],
|
|
25
|
-
shape_resolver:
|
|
29
|
+
shape_resolver: ShapeResolver | None = ...,
|
|
26
30
|
) -> None:
|
|
27
31
|
self.name: str
|
|
28
32
|
self.type_name: str
|
|
29
33
|
self.documentation: str
|
|
30
34
|
|
|
31
35
|
@CachedProperty
|
|
32
|
-
def serialization(self) ->
|
|
36
|
+
def serialization(self) -> dict[str, Any]: ...
|
|
33
37
|
@CachedProperty
|
|
34
|
-
def metadata(self) ->
|
|
38
|
+
def metadata(self) -> dict[str, Any]: ...
|
|
35
39
|
@CachedProperty
|
|
36
|
-
def required_members(self) ->
|
|
40
|
+
def required_members(self) -> list[str]: ...
|
|
37
41
|
@CachedProperty
|
|
38
42
|
def event_stream_name(self) -> None: ...
|
|
39
43
|
|
|
40
44
|
class StructureShape(Shape):
|
|
41
45
|
@CachedProperty
|
|
42
|
-
def members(self) ->
|
|
46
|
+
def members(self) -> dict[str, Shape]: ...
|
|
43
47
|
@CachedProperty
|
|
44
48
|
def error_code(self) -> str: ...
|
|
45
49
|
@CachedProperty
|
|
@@ -59,11 +63,11 @@ class MapShape(Shape):
|
|
|
59
63
|
|
|
60
64
|
class StringShape(Shape):
|
|
61
65
|
@CachedProperty
|
|
62
|
-
def enum(self) ->
|
|
66
|
+
def enum(self) -> list[str]: ...
|
|
63
67
|
|
|
64
68
|
class StaticContextParameter(NamedTuple):
|
|
65
69
|
name: str
|
|
66
|
-
value:
|
|
70
|
+
value: bool | str
|
|
67
71
|
|
|
68
72
|
class ContextParameter(NamedTuple):
|
|
69
73
|
name: str
|
|
@@ -76,24 +80,24 @@ class ClientContextParameter(NamedTuple):
|
|
|
76
80
|
|
|
77
81
|
class ServiceModel:
|
|
78
82
|
def __init__(
|
|
79
|
-
self, service_description: Mapping[str, Any], service_name:
|
|
83
|
+
self, service_description: Mapping[str, Any], service_name: str | None = ...
|
|
80
84
|
) -> None:
|
|
81
|
-
self.metadata:
|
|
85
|
+
self.metadata: dict[str, Any]
|
|
82
86
|
|
|
83
87
|
def shape_for(
|
|
84
|
-
self, shape_name: str, member_traits:
|
|
88
|
+
self, shape_name: str, member_traits: Mapping[str, Any] | None = ...
|
|
85
89
|
) -> Shape: ...
|
|
86
90
|
def shape_for_error_code(self, error_code: int) -> Shape: ...
|
|
87
91
|
def resolve_shape_ref(self, shape_ref: str) -> Shape: ...
|
|
88
92
|
@CachedProperty
|
|
89
|
-
def shape_names(self) ->
|
|
93
|
+
def shape_names(self) -> list[str]: ...
|
|
90
94
|
@CachedProperty
|
|
91
|
-
def error_shapes(self) ->
|
|
92
|
-
def operation_model(self, operation_name: str) ->
|
|
95
|
+
def error_shapes(self) -> list[Shape]: ...
|
|
96
|
+
def operation_model(self, operation_name: str) -> OperationModel: ...
|
|
93
97
|
@CachedProperty
|
|
94
98
|
def documentation(self) -> str: ...
|
|
95
99
|
@CachedProperty
|
|
96
|
-
def operation_names(self) ->
|
|
100
|
+
def operation_names(self) -> list[str]: ...
|
|
97
101
|
@CachedProperty
|
|
98
102
|
def service_name(self) -> str: ...
|
|
99
103
|
@CachedProperty
|
|
@@ -107,11 +111,11 @@ class ServiceModel:
|
|
|
107
111
|
@CachedProperty
|
|
108
112
|
def endpoint_prefix(self) -> str: ...
|
|
109
113
|
@CachedProperty
|
|
110
|
-
def endpoint_discovery_operation(self) ->
|
|
114
|
+
def endpoint_discovery_operation(self) -> OperationModel: ...
|
|
111
115
|
@CachedProperty
|
|
112
116
|
def endpoint_discovery_required(self) -> bool: ...
|
|
113
117
|
@CachedProperty
|
|
114
|
-
def client_context_parameters(self) ->
|
|
118
|
+
def client_context_parameters(self) -> list[ClientContextParameter]: ...
|
|
115
119
|
@property
|
|
116
120
|
def signature_version(self) -> str: ...
|
|
117
121
|
@signature_version.setter
|
|
@@ -124,10 +128,10 @@ class OperationModel:
|
|
|
124
128
|
self,
|
|
125
129
|
operation_model: Mapping[str, Any],
|
|
126
130
|
service_model: ServiceModel,
|
|
127
|
-
name:
|
|
131
|
+
name: str | None = None,
|
|
128
132
|
) -> None:
|
|
129
|
-
self.metadata:
|
|
130
|
-
self.http:
|
|
133
|
+
self.metadata: dict[str, Any]
|
|
134
|
+
self.http: dict[str, Any]
|
|
131
135
|
|
|
132
136
|
@CachedProperty
|
|
133
137
|
def name(self) -> str: ...
|
|
@@ -140,70 +144,70 @@ class OperationModel:
|
|
|
140
144
|
@CachedProperty
|
|
141
145
|
def deprecated(self) -> bool: ...
|
|
142
146
|
@CachedProperty
|
|
143
|
-
def endpoint_discovery(self) ->
|
|
147
|
+
def endpoint_discovery(self) -> OperationModel | None: ...
|
|
144
148
|
@CachedProperty
|
|
145
149
|
def is_endpoint_discovery_operation(self) -> bool: ...
|
|
146
150
|
@CachedProperty
|
|
147
|
-
def input_shape(self) ->
|
|
151
|
+
def input_shape(self) -> StructureShape | None: ...
|
|
148
152
|
@CachedProperty
|
|
149
|
-
def output_shape(self) ->
|
|
153
|
+
def output_shape(self) -> StructureShape | None: ...
|
|
150
154
|
@CachedProperty
|
|
151
|
-
def idempotent_members(self) ->
|
|
155
|
+
def idempotent_members(self) -> list[str]: ...
|
|
152
156
|
@CachedProperty
|
|
153
|
-
def static_context_parameters(self) ->
|
|
157
|
+
def static_context_parameters(self) -> list[StaticContextParameter]: ...
|
|
154
158
|
@CachedProperty
|
|
155
|
-
def context_parameters(self) ->
|
|
159
|
+
def context_parameters(self) -> list[ContextParameter]: ...
|
|
156
160
|
@CachedProperty
|
|
157
|
-
def request_compression(self) ->
|
|
161
|
+
def request_compression(self) -> dict[str, Any] | None: ...
|
|
158
162
|
@CachedProperty
|
|
159
|
-
def auth(self) ->
|
|
163
|
+
def auth(self) -> str | None: ...
|
|
160
164
|
@CachedProperty
|
|
161
|
-
def auth_type(self) ->
|
|
165
|
+
def auth_type(self) -> str | None: ...
|
|
162
166
|
@CachedProperty
|
|
163
|
-
def resolved_auth_type(self) ->
|
|
167
|
+
def resolved_auth_type(self) -> str | None: ...
|
|
164
168
|
@CachedProperty
|
|
165
169
|
def unsigned_payload(self) -> Any: ...
|
|
166
170
|
@CachedProperty
|
|
167
|
-
def error_shapes(self) ->
|
|
171
|
+
def error_shapes(self) -> list[Shape]: ...
|
|
168
172
|
@CachedProperty
|
|
169
|
-
def endpoint(self) ->
|
|
173
|
+
def endpoint(self) -> str | None: ...
|
|
170
174
|
@CachedProperty
|
|
171
175
|
def http_checksum_required(self) -> bool: ...
|
|
172
176
|
@CachedProperty
|
|
173
|
-
def http_checksum(self) ->
|
|
177
|
+
def http_checksum(self) -> dict[str, Any]: ...
|
|
174
178
|
@CachedProperty
|
|
175
179
|
def has_event_stream_input(self) -> bool: ...
|
|
176
180
|
@CachedProperty
|
|
177
181
|
def has_event_stream_output(self) -> bool: ...
|
|
178
|
-
def get_event_stream_input(self) ->
|
|
179
|
-
def get_event_stream_output(self) ->
|
|
182
|
+
def get_event_stream_input(self) -> Shape | None: ...
|
|
183
|
+
def get_event_stream_output(self) -> Shape | None: ...
|
|
180
184
|
@CachedProperty
|
|
181
185
|
def has_streaming_input(self) -> bool: ...
|
|
182
186
|
@CachedProperty
|
|
183
187
|
def has_streaming_output(self) -> bool: ...
|
|
184
|
-
def get_streaming_input(self) ->
|
|
185
|
-
def get_streaming_output(self) ->
|
|
188
|
+
def get_streaming_input(self) -> Shape | None: ...
|
|
189
|
+
def get_streaming_output(self) -> Shape | None: ...
|
|
186
190
|
|
|
187
191
|
class ShapeResolver:
|
|
188
|
-
SHAPE_CLASSES:
|
|
192
|
+
SHAPE_CLASSES: dict[str, Shape]
|
|
189
193
|
def __init__(self, shape_map: Mapping[str, Shape]) -> None: ...
|
|
190
194
|
def get_shape_by_name(
|
|
191
|
-
self, shape_name: str, member_traits:
|
|
195
|
+
self, shape_name: str, member_traits: Mapping[str, Any] | None = ...
|
|
192
196
|
) -> Shape: ...
|
|
193
197
|
def resolve_shape_ref(self, shape_ref: Mapping[str, Any]) -> Shape: ...
|
|
194
198
|
|
|
195
199
|
class UnresolvableShapeMap:
|
|
196
200
|
def get_shape_by_name(
|
|
197
|
-
self, shape_name: str, member_traits:
|
|
201
|
+
self, shape_name: str, member_traits: Mapping[str, Any] | None = ...
|
|
198
202
|
) -> Shape: ...
|
|
199
203
|
def resolve_shape_ref(self, shape_ref: Mapping[str, Any]) -> Shape: ...
|
|
200
204
|
|
|
201
205
|
class DenormalizedStructureBuilder:
|
|
202
|
-
SCALAR_TYPES:
|
|
206
|
+
SCALAR_TYPES: tuple[str, ...]
|
|
203
207
|
|
|
204
|
-
def __init__(self, name:
|
|
208
|
+
def __init__(self, name: str | None = ...) -> None:
|
|
205
209
|
self.name: str
|
|
206
|
-
self.members:
|
|
210
|
+
self.members: dict[str, Any]
|
|
207
211
|
|
|
208
212
|
def with_members(self: _R, members: Mapping[str, Any]) -> _R: ...
|
|
209
213
|
def build_model(self) -> StructureShape: ...
|
botocore-stubs/monitoring.pyi
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
import socket
|
|
2
6
|
from logging import Logger
|
|
3
|
-
from typing import Any, Callable,
|
|
7
|
+
from typing import Any, Callable, Sequence
|
|
4
8
|
|
|
5
9
|
from botocore.compat import ensure_bytes as ensure_bytes
|
|
6
10
|
from botocore.compat import ensure_unicode as ensure_unicode
|
|
7
11
|
from botocore.compat import urlparse as urlparse
|
|
8
12
|
from botocore.hooks import BaseEventHooks
|
|
9
13
|
from botocore.model import OperationModel
|
|
10
|
-
from botocore.retryhandler import EXCEPTION_MAP as RETRYABLE_EXCEPTIONS
|
|
11
14
|
|
|
12
15
|
logger: Logger = ...
|
|
13
16
|
|
|
@@ -19,7 +22,7 @@ class Monitor:
|
|
|
19
22
|
class MonitorEventAdapter:
|
|
20
23
|
def __init__(self, time: Callable[[], float] = ...) -> None: ...
|
|
21
24
|
def feed(
|
|
22
|
-
self, emitter_event_name: str, emitter_payload:
|
|
25
|
+
self, emitter_event_name: str, emitter_payload: dict[str, Any]
|
|
23
26
|
) -> BaseMonitorEvent: ...
|
|
24
27
|
|
|
25
28
|
class BaseMonitorEvent:
|
|
@@ -28,7 +31,7 @@ class BaseMonitorEvent:
|
|
|
28
31
|
self.operation: str = ...
|
|
29
32
|
self.timestamp: int = ...
|
|
30
33
|
|
|
31
|
-
def __eq__(self, other:
|
|
34
|
+
def __eq__(self, other: object) -> bool: ...
|
|
32
35
|
|
|
33
36
|
class APICallEvent(BaseMonitorEvent):
|
|
34
37
|
def __init__(
|
|
@@ -36,8 +39,8 @@ class APICallEvent(BaseMonitorEvent):
|
|
|
36
39
|
service: str,
|
|
37
40
|
operation: OperationModel,
|
|
38
41
|
timestamp: int,
|
|
39
|
-
latency:
|
|
40
|
-
attempts:
|
|
42
|
+
latency: int | None = ...,
|
|
43
|
+
attempts: Sequence[APICallAttemptEvent] | None = ...,
|
|
41
44
|
retries_exceeded: bool = ...,
|
|
42
45
|
) -> None:
|
|
43
46
|
self.latency: int = ...
|
|
@@ -52,21 +55,21 @@ class APICallAttemptEvent(BaseMonitorEvent):
|
|
|
52
55
|
service: str,
|
|
53
56
|
operation: OperationModel,
|
|
54
57
|
timestamp: int,
|
|
55
|
-
latency:
|
|
56
|
-
url:
|
|
57
|
-
http_status_code:
|
|
58
|
-
request_headers:
|
|
59
|
-
response_headers:
|
|
60
|
-
parsed_error:
|
|
61
|
-
wire_exception:
|
|
58
|
+
latency: int | None = ...,
|
|
59
|
+
url: str | None = ...,
|
|
60
|
+
http_status_code: int | None = ...,
|
|
61
|
+
request_headers: dict[str, Any] | None = ...,
|
|
62
|
+
response_headers: dict[str, Any] | None = ...,
|
|
63
|
+
parsed_error: dict[str, Any] | None = ...,
|
|
64
|
+
wire_exception: Exception | None = ...,
|
|
62
65
|
) -> None:
|
|
63
|
-
self.latency:
|
|
64
|
-
self.url:
|
|
65
|
-
self.http_status_code:
|
|
66
|
-
self.request_headers:
|
|
67
|
-
self.response_headers:
|
|
68
|
-
self.parsed_error:
|
|
69
|
-
self.wire_exception:
|
|
66
|
+
self.latency: int | None = ...
|
|
67
|
+
self.url: str | None = ...
|
|
68
|
+
self.http_status_code: int | None = ...
|
|
69
|
+
self.request_headers: dict[str, Any] | None = ...
|
|
70
|
+
self.response_headers: dict[str, Any] | None = ...
|
|
71
|
+
self.parsed_error: dict[str, Any] | None = ...
|
|
72
|
+
self.wire_exception: Exception | None = ...
|
|
70
73
|
|
|
71
74
|
class CSMSerializer:
|
|
72
75
|
def __init__(self, csm_client_id: str) -> None:
|
botocore-stubs/paginate.pyi
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
from logging import Logger
|
|
2
|
-
from typing import Any,
|
|
6
|
+
from typing import Any, Iterator
|
|
3
7
|
|
|
4
8
|
from botocore.exceptions import PaginationError as PaginationError
|
|
5
9
|
from botocore.utils import merge_dicts as merge_dicts
|
|
@@ -8,10 +12,10 @@ from botocore.utils import set_value_from_jmespath as set_value_from_jmespath
|
|
|
8
12
|
log: Logger = ...
|
|
9
13
|
|
|
10
14
|
class TokenEncoder:
|
|
11
|
-
def encode(self, token:
|
|
15
|
+
def encode(self, token: dict[str, Any]) -> str: ...
|
|
12
16
|
|
|
13
17
|
class TokenDecoder:
|
|
14
|
-
def decode(self, token: str) ->
|
|
18
|
+
def decode(self, token: str) -> dict[str, Any]: ...
|
|
15
19
|
|
|
16
20
|
class PaginatorModel:
|
|
17
21
|
def __init__(self, paginator_config: Any) -> None: ...
|
botocore-stubs/parsers.pyi
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
from logging import Logger
|
|
2
|
-
from typing import Any, Callable,
|
|
6
|
+
from typing import Any, Callable, Mapping
|
|
3
7
|
|
|
4
8
|
from botocore.compat import XMLParseError as XMLParseError
|
|
5
9
|
from botocore.eventstream import EventStream as EventStream
|
|
@@ -24,19 +28,19 @@ class ResponseParserError(Exception): ...
|
|
|
24
28
|
|
|
25
29
|
class ResponseParser:
|
|
26
30
|
DEFAULT_ENCODING: str = ...
|
|
27
|
-
EVENT_STREAM_PARSER_CLS:
|
|
31
|
+
EVENT_STREAM_PARSER_CLS: type[ResponseParser] | None = ...
|
|
28
32
|
def __init__(
|
|
29
33
|
self,
|
|
30
|
-
timestamp_parser:
|
|
31
|
-
blob_parser:
|
|
34
|
+
timestamp_parser: Callable[[str], Any] | None = ...,
|
|
35
|
+
blob_parser: Callable[[str], Any] | None = ...,
|
|
32
36
|
) -> None: ...
|
|
33
37
|
def parse(self, response: Mapping[str, Any], shape: Shape) -> Any: ...
|
|
34
38
|
|
|
35
39
|
class BaseXMLResponseParser(ResponseParser):
|
|
36
40
|
def __init__(
|
|
37
41
|
self,
|
|
38
|
-
timestamp_parser:
|
|
39
|
-
blob_parser:
|
|
42
|
+
timestamp_parser: Callable[[str], Any] | None = ...,
|
|
43
|
+
blob_parser: Callable[[str], Any] | None = ...,
|
|
40
44
|
) -> None: ...
|
|
41
45
|
|
|
42
46
|
class QueryParser(BaseXMLResponseParser): ...
|
|
@@ -50,4 +54,4 @@ class BaseRestParser(ResponseParser): ...
|
|
|
50
54
|
class RestJSONParser(BaseRestParser, BaseJSONParser): ...
|
|
51
55
|
class RestXMLParser(BaseRestParser, BaseXMLResponseParser): ...
|
|
52
56
|
|
|
53
|
-
PROTOCOL_PARSERS:
|
|
57
|
+
PROTOCOL_PARSERS: dict[str, ResponseParser]
|
botocore-stubs/regions.pyi
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
from enum import Enum
|
|
2
6
|
from logging import Logger
|
|
3
|
-
from typing import Any,
|
|
7
|
+
from typing import Any, Mapping
|
|
4
8
|
|
|
5
9
|
from botocore.auth import AUTH_TYPE_MAPS as AUTH_TYPE_MAPS
|
|
6
10
|
from botocore.compat import HAS_CRT as HAS_CRT
|
|
@@ -13,40 +17,40 @@ from botocore.model import OperationModel, ServiceModel
|
|
|
13
17
|
|
|
14
18
|
LOG: Logger = ...
|
|
15
19
|
DEFAULT_URI_TEMPLATE: str
|
|
16
|
-
DEFAULT_SERVICE_DATA:
|
|
20
|
+
DEFAULT_SERVICE_DATA: dict[str, dict[str, Any]]
|
|
17
21
|
|
|
18
22
|
class BaseEndpointResolver:
|
|
19
|
-
def construct_endpoint(self, service_name: str, region_name:
|
|
20
|
-
def get_available_partitions(self) ->
|
|
23
|
+
def construct_endpoint(self, service_name: str, region_name: str | None = ...) -> None: ...
|
|
24
|
+
def get_available_partitions(self) -> list[str]: ...
|
|
21
25
|
def get_available_endpoints(
|
|
22
26
|
self,
|
|
23
27
|
service_name: str,
|
|
24
28
|
partition_name: str = ...,
|
|
25
29
|
allow_non_regional: bool = ...,
|
|
26
|
-
) ->
|
|
30
|
+
) -> list[str]: ...
|
|
27
31
|
|
|
28
32
|
class EndpointResolver(BaseEndpointResolver):
|
|
29
33
|
def __init__(self, endpoint_data: Mapping[str, Any], uses_builtin_data: bool = ...) -> None: ...
|
|
30
34
|
def get_service_endpoints_data(self, service_name: str, partition_name: str = ...) -> Any: ...
|
|
31
|
-
def get_available_partitions(self) ->
|
|
35
|
+
def get_available_partitions(self) -> list[str]: ...
|
|
32
36
|
def get_available_endpoints(
|
|
33
37
|
self,
|
|
34
38
|
service_name: str,
|
|
35
39
|
partition_name: str = ...,
|
|
36
40
|
allow_non_regional: bool = ...,
|
|
37
41
|
endpoint_variant_tags: Any = ...,
|
|
38
|
-
) ->
|
|
42
|
+
) -> list[str]: ...
|
|
39
43
|
def get_partition_dns_suffix(
|
|
40
44
|
self, partition_name: str, endpoint_variant_tags: Any = ...
|
|
41
45
|
) -> str: ...
|
|
42
46
|
def construct_endpoint( # type: ignore [override]
|
|
43
47
|
self,
|
|
44
48
|
service_name: str,
|
|
45
|
-
region_name:
|
|
46
|
-
partition_name:
|
|
49
|
+
region_name: str | None = ...,
|
|
50
|
+
partition_name: str | None = ...,
|
|
47
51
|
use_dualstack_endpoint: bool = ...,
|
|
48
52
|
use_fips_endpoint: bool = ...,
|
|
49
|
-
) ->
|
|
53
|
+
) -> dict[str, Any] | None: ...
|
|
50
54
|
def get_partition_for_region(self, region_name: str) -> str: ...
|
|
51
55
|
|
|
52
56
|
class EndpointResolverBuiltins(Enum):
|
|
@@ -74,17 +78,17 @@ class EndpointRulesetResolver:
|
|
|
74
78
|
client_context: Any,
|
|
75
79
|
event_emitter: BaseEventHooks,
|
|
76
80
|
use_ssl: bool = ...,
|
|
77
|
-
requested_auth_scheme:
|
|
81
|
+
requested_auth_scheme: str | None = ...,
|
|
78
82
|
) -> None: ...
|
|
79
83
|
def construct_endpoint(
|
|
80
84
|
self,
|
|
81
85
|
operation_model: OperationModel,
|
|
82
|
-
call_args:
|
|
86
|
+
call_args: Mapping[str, Any] | None,
|
|
83
87
|
request_context: Any,
|
|
84
88
|
) -> RuleSetEndpoint: ...
|
|
85
89
|
def auth_schemes_to_signing_ctx(
|
|
86
|
-
self, auth_schemes:
|
|
87
|
-
) ->
|
|
90
|
+
self, auth_schemes: list[Mapping[str, Any]]
|
|
91
|
+
) -> tuple[str, dict[str, Any]]: ...
|
|
88
92
|
def ruleset_error_to_botocore_exception(
|
|
89
93
|
self, ruleset_exception: Exception, params: Mapping[str, Any]
|
|
90
94
|
) -> BotoCoreError: ...
|
botocore-stubs/response.pyi
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
import logging
|
|
2
6
|
from io import IOBase
|
|
3
|
-
from typing import IO, Any, Iterator
|
|
7
|
+
from typing import IO, Any, Iterator
|
|
4
8
|
|
|
5
9
|
import requests
|
|
6
10
|
from botocore.model import OperationModel
|
|
@@ -11,9 +15,9 @@ class StreamingBody(IOBase):
|
|
|
11
15
|
def __init__(self, raw_stream: IO[bytes], content_length: int) -> None: ...
|
|
12
16
|
def set_socket_timeout(self, timeout: float) -> None: ...
|
|
13
17
|
def readable(self) -> bool: ...
|
|
14
|
-
def read(self, amt:
|
|
18
|
+
def read(self, amt: int | None = ...) -> bytes: ...
|
|
15
19
|
# FIXME: Signature of "readlines" incompatible with supertype "IOBase"
|
|
16
|
-
def readlines(self) ->
|
|
20
|
+
def readlines(self) -> list[bytes]: ... # type: ignore [override]
|
|
17
21
|
def __iter__(self) -> Iterator[bytes]: ...
|
|
18
22
|
def iter_lines(self, chunk_size: int = ..., keepends: bool = ...) -> Iterator[bytes]: ...
|
|
19
23
|
def iter_chunks(self, chunk_size: int = ...) -> Iterator[bytes]: ...
|
|
@@ -23,4 +27,4 @@ class StreamingBody(IOBase):
|
|
|
23
27
|
|
|
24
28
|
def get_response(
|
|
25
29
|
operation_model: OperationModel, http_response: requests.Response
|
|
26
|
-
) ->
|
|
30
|
+
) -> tuple[requests.Response, Any]: ...
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
from logging import Logger
|
|
2
6
|
from typing import Any
|
|
3
7
|
|
|
@@ -8,7 +12,7 @@ from botocore.retries import throttling as throttling
|
|
|
8
12
|
|
|
9
13
|
logger: Logger = ...
|
|
10
14
|
|
|
11
|
-
def register_retry_handler(client: BaseClient) ->
|
|
15
|
+
def register_retry_handler(client: BaseClient) -> ClientRateLimiter: ...
|
|
12
16
|
|
|
13
17
|
class ClientRateLimiter:
|
|
14
18
|
def __init__(
|
botocore-stubs/retries/quota.pyi
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
2
6
|
|
|
3
7
|
class RetryQuota:
|
|
4
8
|
INITIAL_CAPACITY: int = ...
|
|
5
|
-
def __init__(self, initial_capacity: Any = ..., lock:
|
|
9
|
+
def __init__(self, initial_capacity: Any = ..., lock: Any | None = ...) -> None: ...
|
|
6
10
|
def acquire(self, capacity_amount: Any) -> Any: ...
|
|
7
11
|
def release(self, capacity_amount: Any) -> None: ...
|
|
8
12
|
@property
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
from logging import Logger
|
|
2
|
-
from typing import Any, Callable,
|
|
6
|
+
from typing import Any, Callable, Sequence
|
|
3
7
|
|
|
4
8
|
from botocore.client import BaseClient
|
|
5
9
|
from botocore.exceptions import BotoCoreError
|
|
@@ -27,7 +31,7 @@ class RetryHandler:
|
|
|
27
31
|
retry_event_adapter: RetryEventAdapter,
|
|
28
32
|
retry_quota: RetryQuota,
|
|
29
33
|
) -> None: ...
|
|
30
|
-
def needs_retry(self, **kwargs: Any) ->
|
|
34
|
+
def needs_retry(self, **kwargs: Any) -> float | None: ...
|
|
31
35
|
|
|
32
36
|
class RetryEventAdapter:
|
|
33
37
|
def create_retry_context(self, **kwargs: Any) -> Any: ...
|
|
@@ -37,20 +41,20 @@ class RetryContext:
|
|
|
37
41
|
def __init__(
|
|
38
42
|
self,
|
|
39
43
|
attempt_number: int,
|
|
40
|
-
operation_model:
|
|
44
|
+
operation_model: OperationModel | None = ...,
|
|
41
45
|
parsed_response: Any = ...,
|
|
42
46
|
http_response: Any = ...,
|
|
43
|
-
caught_exception:
|
|
47
|
+
caught_exception: Exception | None = ...,
|
|
44
48
|
request_context: Any = ...,
|
|
45
49
|
) -> None:
|
|
46
50
|
self.attempt_number: int = ...
|
|
47
|
-
self.operation_model:
|
|
51
|
+
self.operation_model: OperationModel | None = ...
|
|
48
52
|
self.parsed_response: Any = ...
|
|
49
53
|
self.http_response: Any = ...
|
|
50
|
-
self.caught_exception:
|
|
54
|
+
self.caught_exception: Exception | None = ...
|
|
51
55
|
self.request_context: Any = ...
|
|
52
56
|
|
|
53
|
-
def get_error_code(self) ->
|
|
57
|
+
def get_error_code(self) -> int | None: ...
|
|
54
58
|
def add_retry_metadata(self, **kwargs: Any) -> None: ...
|
|
55
59
|
def get_retry_metadata(self) -> Any: ...
|
|
56
60
|
|
|
@@ -72,14 +76,14 @@ class MaxAttemptsChecker(BaseRetryableChecker):
|
|
|
72
76
|
class TransientRetryableChecker(BaseRetryableChecker):
|
|
73
77
|
def __init__(
|
|
74
78
|
self,
|
|
75
|
-
transient_error_codes:
|
|
76
|
-
transient_status_codes:
|
|
77
|
-
transient_exception_cls:
|
|
79
|
+
transient_error_codes: Sequence[str] | None = ...,
|
|
80
|
+
transient_status_codes: Sequence[int] | None = ...,
|
|
81
|
+
transient_exception_cls: Sequence[type[BotoCoreError]] | None = ...,
|
|
78
82
|
) -> None: ...
|
|
79
83
|
def is_retryable(self, context: Any) -> bool: ...
|
|
80
84
|
|
|
81
85
|
class ThrottledRetryableChecker(BaseRetryableChecker):
|
|
82
|
-
def __init__(self, throttled_error_codes:
|
|
86
|
+
def __init__(self, throttled_error_codes: Sequence[str] | None = ...) -> None: ...
|
|
83
87
|
def is_retryable(self, context: Any) -> bool: ...
|
|
84
88
|
|
|
85
89
|
class ModeledRetryableChecker(BaseRetryableChecker):
|
|
@@ -104,6 +108,6 @@ class OrRetryChecker(BaseRetryableChecker):
|
|
|
104
108
|
def is_retryable(self, context: Any) -> Any: ...
|
|
105
109
|
|
|
106
110
|
class RetryQuotaChecker:
|
|
107
|
-
def __init__(self, quota: Any) -> None: ...
|
|
111
|
+
def __init__(self, quota: Any) -> None: ... # noqa: F811
|
|
108
112
|
def acquire_retry_quota(self, context: Any) -> bool: ...
|
|
109
113
|
def release_retry_quota(self, context: Any, http_response: Any, **kwargs: Any) -> None: ...
|
botocore-stubs/retryhandler.pyi
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
from logging import Logger
|
|
2
|
-
from typing import Any, Callable,
|
|
6
|
+
from typing import Any, Callable, Iterable, Mapping
|
|
3
7
|
|
|
4
8
|
from botocore.config import Config
|
|
5
9
|
from botocore.exceptions import BotoCoreError
|
|
@@ -11,18 +15,18 @@ from botocore.exceptions import ReadTimeoutError as ReadTimeoutError
|
|
|
11
15
|
|
|
12
16
|
logger: Logger = ...
|
|
13
17
|
|
|
14
|
-
EXCEPTION_MAP:
|
|
18
|
+
EXCEPTION_MAP: dict[str, list[type[BotoCoreError]]]
|
|
15
19
|
|
|
16
20
|
def delay_exponential(base: float, growth_factor: float, attempts: int) -> float: ...
|
|
17
21
|
def create_exponential_delay_function(
|
|
18
22
|
base: float, growth_factor: float
|
|
19
23
|
) -> Callable[[int], float]: ...
|
|
20
|
-
def create_retry_handler(config: Config, operation_name:
|
|
24
|
+
def create_retry_handler(config: Config, operation_name: str | None = ...) -> RetryHandler: ...
|
|
21
25
|
def create_retry_action_from_config(
|
|
22
|
-
config: Config, operation_name:
|
|
26
|
+
config: Config, operation_name: str | None = ...
|
|
23
27
|
) -> Callable[[int], float]: ...
|
|
24
28
|
def create_checker_from_retry_config(
|
|
25
|
-
config: Config, operation_name:
|
|
29
|
+
config: Config, operation_name: str | None = ...
|
|
26
30
|
) -> MaxAttemptsDecorator: ...
|
|
27
31
|
|
|
28
32
|
class RetryHandler:
|
|
@@ -41,7 +45,7 @@ class MaxAttemptsDecorator(BaseChecker):
|
|
|
41
45
|
self,
|
|
42
46
|
checker: BaseChecker,
|
|
43
47
|
max_attempts: int,
|
|
44
|
-
retryable_exceptions:
|
|
48
|
+
retryable_exceptions: Iterable[type[Exception]] | None = ...,
|
|
45
49
|
) -> None: ...
|
|
46
50
|
# FIXME: Signature of "__call__" incompatible with supertype "BaseChecker"
|
|
47
51
|
def __call__( # type: ignore [override]
|