botocore-stubs 1.35.69__py3-none-any.whl → 1.35.70__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.70.dist-info}/METADATA +1 -2
- botocore_stubs-1.35.70.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.70.dist-info}/LICENSE +0 -0
- {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.70.dist-info}/WHEEL +0 -0
- {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.70.dist-info}/top_level.txt +0 -0
botocore-stubs/__init__.pyi
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
import logging
|
|
2
|
-
from typing import Any, Callable, Mapping
|
|
6
|
+
from typing import Any, Callable, Mapping
|
|
3
7
|
|
|
4
8
|
from botocore.session import Session
|
|
5
9
|
|
|
@@ -7,7 +11,7 @@ class NullHandler(logging.Handler):
|
|
|
7
11
|
def emit(self, record: Any) -> None: ...
|
|
8
12
|
|
|
9
13
|
log: logging.Logger
|
|
10
|
-
ScalarTypes:
|
|
14
|
+
ScalarTypes: tuple[str, ...]
|
|
11
15
|
BOTOCORE_ROOT: str
|
|
12
16
|
|
|
13
17
|
UNSIGNED: Any
|
botocore-stubs/args.pyi
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
2
5
|
from logging import Logger
|
|
3
|
-
from typing import Any,
|
|
6
|
+
from typing import Any, Mapping, TypedDict
|
|
4
7
|
|
|
5
8
|
from botocore.client import ClientEndpointBridge
|
|
6
9
|
from botocore.config import Config as Config
|
|
7
10
|
from botocore.configprovider import ConfigValueStore
|
|
8
11
|
from botocore.endpoint import Endpoint
|
|
9
12
|
from botocore.endpoint import EndpointCreator as EndpointCreator
|
|
13
|
+
from botocore.errorfactory import ClientExceptionsFactory
|
|
10
14
|
from botocore.hooks import BaseEventHooks
|
|
11
15
|
from botocore.loaders import Loader
|
|
12
16
|
from botocore.model import ServiceModel
|
|
@@ -14,17 +18,11 @@ from botocore.parsers import ResponseParser, ResponseParserFactory
|
|
|
14
18
|
from botocore.serialize import BaseRestSerializer
|
|
15
19
|
from botocore.signers import RequestSigner as RequestSigner
|
|
16
20
|
from botocore.useragent import UserAgentString
|
|
17
|
-
from botocore.errorfactory import ClientExceptionsFactory
|
|
18
|
-
|
|
19
|
-
if sys.version_info >= (3, 9):
|
|
20
|
-
from typing import TypedDict
|
|
21
|
-
else:
|
|
22
|
-
from typing_extensions import TypedDict
|
|
23
21
|
|
|
24
22
|
logger: Logger = ...
|
|
25
23
|
|
|
26
|
-
VALID_REGIONAL_ENDPOINTS_CONFIG:
|
|
27
|
-
LEGACY_GLOBAL_STS_REGIONS:
|
|
24
|
+
VALID_REGIONAL_ENDPOINTS_CONFIG: list[str]
|
|
25
|
+
LEGACY_GLOBAL_STS_REGIONS: list[str]
|
|
28
26
|
USERAGENT_APPID_MAXLEN: int
|
|
29
27
|
|
|
30
28
|
class _GetClientArgsTypeDef(TypedDict):
|
|
@@ -36,7 +34,7 @@ class _GetClientArgsTypeDef(TypedDict):
|
|
|
36
34
|
service_model: ServiceModel
|
|
37
35
|
loader: Loader
|
|
38
36
|
client_config: Config
|
|
39
|
-
partition:
|
|
37
|
+
partition: str | None
|
|
40
38
|
exceptions_factory: ClientExceptionsFactory
|
|
41
39
|
|
|
42
40
|
class ClientArgsCreator:
|
|
@@ -48,34 +46,34 @@ class ClientArgsCreator:
|
|
|
48
46
|
loader: Loader,
|
|
49
47
|
exceptions_factory: ClientExceptionsFactory,
|
|
50
48
|
config_store: ConfigValueStore,
|
|
51
|
-
user_agent_creator:
|
|
49
|
+
user_agent_creator: UserAgentString | None = ...,
|
|
52
50
|
) -> None: ...
|
|
53
51
|
def get_client_args(
|
|
54
52
|
self,
|
|
55
53
|
service_model: ServiceModel,
|
|
56
54
|
region_name: str,
|
|
57
55
|
is_secure: bool,
|
|
58
|
-
endpoint_url:
|
|
59
|
-
verify:
|
|
60
|
-
credentials:
|
|
61
|
-
scoped_config:
|
|
62
|
-
client_config:
|
|
56
|
+
endpoint_url: str | None,
|
|
57
|
+
verify: str | bool | None,
|
|
58
|
+
credentials: Any | None,
|
|
59
|
+
scoped_config: Mapping[str, Any] | None,
|
|
60
|
+
client_config: Config | None,
|
|
63
61
|
endpoint_bridge: ClientEndpointBridge,
|
|
64
|
-
auth_token:
|
|
65
|
-
endpoints_ruleset_data:
|
|
66
|
-
partition_data:
|
|
62
|
+
auth_token: str | None = ...,
|
|
63
|
+
endpoints_ruleset_data: Mapping[str, Any] | None = ...,
|
|
64
|
+
partition_data: Mapping[str, Any] | None = ...,
|
|
67
65
|
) -> _GetClientArgsTypeDef: ...
|
|
68
66
|
def compute_client_args(
|
|
69
67
|
self,
|
|
70
68
|
service_model: ServiceModel,
|
|
71
|
-
client_config:
|
|
69
|
+
client_config: Config | None,
|
|
72
70
|
endpoint_bridge: ClientEndpointBridge,
|
|
73
71
|
region_name: str,
|
|
74
72
|
endpoint_url: str,
|
|
75
73
|
is_secure: bool,
|
|
76
|
-
scoped_config:
|
|
74
|
+
scoped_config: Mapping[str, Any] | None,
|
|
77
75
|
) -> Any: ...
|
|
78
|
-
def compute_s3_config(self, client_config:
|
|
76
|
+
def compute_s3_config(self, client_config: Config | None) -> dict[str, Any]: ...
|
|
79
77
|
def compute_endpoint_resolver_builtin_defaults(
|
|
80
78
|
self,
|
|
81
79
|
region_name: str,
|
|
@@ -84,4 +82,4 @@ class ClientArgsCreator:
|
|
|
84
82
|
endpoint_bridge: ClientEndpointBridge,
|
|
85
83
|
client_endpoint_url: str,
|
|
86
84
|
legacy_endpoint_url: str,
|
|
87
|
-
) ->
|
|
85
|
+
) -> dict[str, Any]: ...
|
botocore-stubs/auth.pyi
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
from http.client import HTTPMessage
|
|
2
6
|
from logging import Logger
|
|
3
|
-
from typing import Any,
|
|
7
|
+
from typing import Any, Iterable, Mapping
|
|
4
8
|
from urllib.parse import SplitResult
|
|
5
9
|
|
|
6
10
|
from botocore.awsrequest import AWSRequest
|
|
@@ -12,41 +16,41 @@ from botocore.utils import IdentityCache
|
|
|
12
16
|
|
|
13
17
|
logger: Logger = ...
|
|
14
18
|
|
|
15
|
-
_CredentialsUnion = Union[Credentials, ReadOnlyCredentials]
|
|
16
|
-
|
|
17
19
|
EMPTY_SHA256_HASH: str
|
|
18
20
|
PAYLOAD_BUFFER: int
|
|
19
21
|
ISO8601: str
|
|
20
22
|
SIGV4_TIMESTAMP: str
|
|
21
|
-
SIGNED_HEADERS_BLACKLIST:
|
|
23
|
+
SIGNED_HEADERS_BLACKLIST: list[str]
|
|
22
24
|
UNSIGNED_PAYLOAD: str
|
|
23
25
|
STREAMING_UNSIGNED_PAYLOAD_TRAILER: str
|
|
24
26
|
|
|
25
27
|
class BaseSigner:
|
|
26
28
|
REQUIRES_REGION: bool = ...
|
|
27
29
|
REQUIRES_TOKEN: bool = ...
|
|
28
|
-
def add_auth(self, request: AWSRequest) ->
|
|
30
|
+
def add_auth(self, request: AWSRequest) -> AWSRequest | None: ...
|
|
29
31
|
|
|
30
32
|
class TokenSigner(BaseSigner):
|
|
31
33
|
def __init__(self, auth_token: str) -> None: ...
|
|
32
34
|
|
|
33
35
|
class SigV2Auth(BaseSigner):
|
|
34
|
-
def __init__(self, credentials:
|
|
35
|
-
self.credentials:
|
|
36
|
+
def __init__(self, credentials: Credentials | ReadOnlyCredentials) -> None:
|
|
37
|
+
self.credentials: Credentials | ReadOnlyCredentials
|
|
36
38
|
|
|
37
|
-
def calc_signature(self, request: AWSRequest, params: Mapping[str, Any]) ->
|
|
39
|
+
def calc_signature(self, request: AWSRequest, params: Mapping[str, Any]) -> tuple[str, str]: ...
|
|
38
40
|
def add_auth(self, request: AWSRequest) -> AWSRequest: ...
|
|
39
41
|
|
|
40
42
|
class SigV3Auth(BaseSigner):
|
|
41
|
-
def __init__(self, credentials:
|
|
42
|
-
self.credentials:
|
|
43
|
+
def __init__(self, credentials: Credentials | ReadOnlyCredentials) -> None:
|
|
44
|
+
self.credentials: Credentials | ReadOnlyCredentials
|
|
43
45
|
|
|
44
46
|
def add_auth(self, request: AWSRequest) -> None: ...
|
|
45
47
|
|
|
46
48
|
class SigV4Auth(BaseSigner):
|
|
47
49
|
REQUIRES_REGION: bool = ...
|
|
48
|
-
def __init__(
|
|
49
|
-
self
|
|
50
|
+
def __init__(
|
|
51
|
+
self, credentials: Credentials | ReadOnlyCredentials, service_name: str, region_name: str
|
|
52
|
+
) -> None:
|
|
53
|
+
self.credentials: Credentials | ReadOnlyCredentials
|
|
50
54
|
|
|
51
55
|
def headers_to_sign(self, request: AWSRequest) -> HTTPMessage: ...
|
|
52
56
|
def canonical_query_string(self, request: AWSRequest) -> str: ...
|
|
@@ -67,7 +71,7 @@ class S3ExpressAuth(S3SigV4Auth):
|
|
|
67
71
|
|
|
68
72
|
def __init__(
|
|
69
73
|
self,
|
|
70
|
-
credentials:
|
|
74
|
+
credentials: Credentials | ReadOnlyCredentials,
|
|
71
75
|
service_name: str,
|
|
72
76
|
region_name: str,
|
|
73
77
|
*,
|
|
@@ -81,7 +85,7 @@ class S3ExpressQueryAuth(S3ExpressAuth):
|
|
|
81
85
|
|
|
82
86
|
def __init__(
|
|
83
87
|
self,
|
|
84
|
-
credentials:
|
|
88
|
+
credentials: Credentials | ReadOnlyCredentials,
|
|
85
89
|
service_name: str,
|
|
86
90
|
region_name: str,
|
|
87
91
|
*,
|
|
@@ -93,7 +97,7 @@ class SigV4QueryAuth(SigV4Auth):
|
|
|
93
97
|
DEFAULT_EXPIRES: int = ...
|
|
94
98
|
def __init__(
|
|
95
99
|
self,
|
|
96
|
-
credentials:
|
|
100
|
+
credentials: Credentials | ReadOnlyCredentials,
|
|
97
101
|
service_name: str,
|
|
98
102
|
region_name: str,
|
|
99
103
|
expires: int = ...,
|
|
@@ -106,42 +110,42 @@ class S3SigV4PostAuth(SigV4Auth):
|
|
|
106
110
|
def add_auth(self, request: AWSRequest) -> None: ...
|
|
107
111
|
|
|
108
112
|
class HmacV1Auth(BaseSigner):
|
|
109
|
-
QSAOfInterest:
|
|
113
|
+
QSAOfInterest: list[str] = ...
|
|
110
114
|
def __init__(
|
|
111
115
|
self,
|
|
112
|
-
credentials:
|
|
113
|
-
service_name:
|
|
114
|
-
region_name:
|
|
116
|
+
credentials: Credentials | ReadOnlyCredentials,
|
|
117
|
+
service_name: str | None = ...,
|
|
118
|
+
region_name: str | None = ...,
|
|
115
119
|
) -> None:
|
|
116
|
-
self.credentials:
|
|
120
|
+
self.credentials: Credentials | ReadOnlyCredentials
|
|
117
121
|
|
|
118
122
|
def sign_string(self, string_to_sign: str) -> str: ...
|
|
119
123
|
def canonical_standard_headers(self, headers: Mapping[str, Any]) -> str: ...
|
|
120
124
|
def canonical_custom_headers(self, headers: Mapping[str, Any]) -> str: ...
|
|
121
|
-
def unquote_v(self, nv: str) ->
|
|
122
|
-
def canonical_resource(self, split: SplitResult, auth_path:
|
|
125
|
+
def unquote_v(self, nv: str) -> tuple[str, str] | str: ...
|
|
126
|
+
def canonical_resource(self, split: SplitResult, auth_path: str | None = ...) -> str: ...
|
|
123
127
|
def canonical_string(
|
|
124
128
|
self,
|
|
125
129
|
method: str,
|
|
126
130
|
split: SplitResult,
|
|
127
131
|
headers: Mapping[str, Any],
|
|
128
|
-
expires:
|
|
129
|
-
auth_path:
|
|
132
|
+
expires: int | None = ...,
|
|
133
|
+
auth_path: str | None = ...,
|
|
130
134
|
) -> Any: ...
|
|
131
135
|
def get_signature(
|
|
132
136
|
self,
|
|
133
137
|
method: str,
|
|
134
138
|
split: SplitResult,
|
|
135
139
|
headers: Mapping[str, Any],
|
|
136
|
-
expires:
|
|
137
|
-
auth_path:
|
|
140
|
+
expires: int | None = ...,
|
|
141
|
+
auth_path: str | None = ...,
|
|
138
142
|
) -> Any: ...
|
|
139
143
|
def add_auth(self, request: AWSRequest) -> None: ...
|
|
140
144
|
|
|
141
145
|
class HmacV1QueryAuth(HmacV1Auth):
|
|
142
146
|
DEFAULT_EXPIRES: int = ...
|
|
143
|
-
def __init__(self, credentials:
|
|
144
|
-
self.credentials:
|
|
147
|
+
def __init__(self, credentials: Credentials | ReadOnlyCredentials, expires: int = ...) -> None:
|
|
148
|
+
self.credentials: Credentials | ReadOnlyCredentials
|
|
145
149
|
|
|
146
150
|
class HmacV1PostAuth(HmacV1Auth):
|
|
147
151
|
def add_auth(self, request: AWSRequest) -> None: ...
|
|
@@ -151,5 +155,5 @@ class BearerAuth(TokenSigner):
|
|
|
151
155
|
|
|
152
156
|
def resolve_auth_type(auth_trait: Iterable[str]) -> str: ...
|
|
153
157
|
|
|
154
|
-
AUTH_TYPE_MAPS:
|
|
155
|
-
AUTH_TYPE_TO_SIGNATURE_VERSION:
|
|
158
|
+
AUTH_TYPE_MAPS: dict[str, type[BaseSigner]]
|
|
159
|
+
AUTH_TYPE_TO_SIGNATURE_VERSION: dict[str, str]
|
botocore-stubs/awsrequest.pyi
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
from collections.abc import MutableMapping
|
|
2
6
|
from logging import Logger
|
|
3
|
-
from typing import IO, Any,
|
|
7
|
+
from typing import IO, Any, Iterator, Mapping, TypeVar
|
|
4
8
|
|
|
5
9
|
from botocore.compat import HTTPHeaders as HTTPHeaders
|
|
6
10
|
from botocore.compat import HTTPResponse as HTTPResponse
|
|
@@ -28,7 +32,7 @@ class AWSConnection:
|
|
|
28
32
|
method: str,
|
|
29
33
|
url: str,
|
|
30
34
|
body: Any = ...,
|
|
31
|
-
headers:
|
|
35
|
+
headers: Mapping[str, Any] | None = ...,
|
|
32
36
|
*args: Any,
|
|
33
37
|
**kwargs: Any,
|
|
34
38
|
) -> HTTPConnection: ...
|
|
@@ -39,16 +43,16 @@ class AWSHTTPConnection(AWSConnection, HTTPConnection): ... # type: ignore [mis
|
|
|
39
43
|
class AWSHTTPSConnection(AWSConnection, VerifiedHTTPSConnection): ... # type: ignore [misc]
|
|
40
44
|
|
|
41
45
|
class AWSHTTPConnectionPool(HTTPConnectionPool):
|
|
42
|
-
ConnectionCls:
|
|
46
|
+
ConnectionCls: type[AWSHTTPConnection] # type: ignore [misc,assignment]
|
|
43
47
|
|
|
44
48
|
class AWSHTTPSConnectionPool(HTTPSConnectionPool):
|
|
45
|
-
ConnectionCls:
|
|
49
|
+
ConnectionCls: type[AWSHTTPSConnection] # type: ignore [misc,assignment]
|
|
46
50
|
|
|
47
51
|
def prepare_request_dict(
|
|
48
52
|
request_dict: Mapping[str, Any],
|
|
49
53
|
endpoint_url: str,
|
|
50
|
-
context:
|
|
51
|
-
user_agent:
|
|
54
|
+
context: Any | None = ...,
|
|
55
|
+
user_agent: str | None = ...,
|
|
52
56
|
) -> None: ...
|
|
53
57
|
def create_request_object(request_dict: Mapping[str, Any]) -> Any: ...
|
|
54
58
|
|
|
@@ -58,13 +62,13 @@ class AWSPreparedRequest:
|
|
|
58
62
|
method: str,
|
|
59
63
|
url: str,
|
|
60
64
|
headers: HTTPHeaders,
|
|
61
|
-
body:
|
|
65
|
+
body: str | bytes | bytearray | IO[bytes] | IO[str] | None,
|
|
62
66
|
stream_output: bool,
|
|
63
67
|
) -> None:
|
|
64
68
|
self.method: str
|
|
65
69
|
self.url: str
|
|
66
70
|
self.headers: HTTPHeaders
|
|
67
|
-
self.body:
|
|
71
|
+
self.body: str | bytes | bytearray | IO[bytes] | IO[str] | None
|
|
68
72
|
self.stream_output: bool
|
|
69
73
|
|
|
70
74
|
def reset_stream(self) -> None: ...
|
|
@@ -72,22 +76,22 @@ class AWSPreparedRequest:
|
|
|
72
76
|
class AWSRequest:
|
|
73
77
|
def __init__(
|
|
74
78
|
self,
|
|
75
|
-
method:
|
|
76
|
-
url:
|
|
77
|
-
headers:
|
|
78
|
-
data:
|
|
79
|
-
params:
|
|
80
|
-
auth_path:
|
|
79
|
+
method: str | None = ...,
|
|
80
|
+
url: str | None = ...,
|
|
81
|
+
headers: Mapping[str, Any] | None = ...,
|
|
82
|
+
data: Any | None = ...,
|
|
83
|
+
params: Mapping[str, Any] | None = ...,
|
|
84
|
+
auth_path: str | None = ...,
|
|
81
85
|
stream_output: bool = ...,
|
|
82
86
|
) -> None:
|
|
83
|
-
self.method:
|
|
84
|
-
self.url:
|
|
87
|
+
self.method: str | None
|
|
88
|
+
self.url: str | None
|
|
85
89
|
self.headers: HTTPHeaders
|
|
86
|
-
self.data:
|
|
87
|
-
self.params:
|
|
88
|
-
self.auth_path:
|
|
90
|
+
self.data: Any | None
|
|
91
|
+
self.params: dict[str, Any]
|
|
92
|
+
self.auth_path: str | None
|
|
89
93
|
self.stream_output: bool
|
|
90
|
-
self.context:
|
|
94
|
+
self.context: dict[str, Any]
|
|
91
95
|
|
|
92
96
|
def prepare(self) -> AWSPreparedRequest: ...
|
|
93
97
|
@property
|
|
@@ -111,7 +115,7 @@ class AWSResponse:
|
|
|
111
115
|
class _HeaderKey:
|
|
112
116
|
def __init__(self, key: str) -> None: ...
|
|
113
117
|
def __hash__(self) -> int: ...
|
|
114
|
-
def __eq__(self, other:
|
|
118
|
+
def __eq__(self, other: object) -> bool: ...
|
|
115
119
|
|
|
116
120
|
class HeadersDict(MutableMapping[str, str]):
|
|
117
121
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
botocore-stubs/client.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
|
|
3
7
|
|
|
4
8
|
from botocore.args import ClientArgsCreator as ClientArgsCreator
|
|
5
9
|
from botocore.auth import AUTH_TYPE_MAPS as AUTH_TYPE_MAPS
|
|
@@ -11,6 +15,7 @@ from botocore.discovery import EndpointDiscoveryManager as EndpointDiscoveryMana
|
|
|
11
15
|
from botocore.discovery import (
|
|
12
16
|
block_endpoint_discovery_required_operations as block_endpoint_discovery_required_operations,
|
|
13
17
|
)
|
|
18
|
+
from botocore.errorfactory import ClientExceptionsFactory
|
|
14
19
|
from botocore.exceptions import ClientError as ClientError
|
|
15
20
|
from botocore.exceptions import DataNotFoundError as DataNotFoundError
|
|
16
21
|
from botocore.exceptions import (
|
|
@@ -40,7 +45,6 @@ from botocore.utils import S3RegionRedirector as S3RegionRedirector
|
|
|
40
45
|
from botocore.utils import ensure_boolean as ensure_boolean
|
|
41
46
|
from botocore.utils import get_service_module_name as get_service_module_name
|
|
42
47
|
from botocore.waiter import Waiter
|
|
43
|
-
from botocore.errorfactory import ClientExceptionsFactory
|
|
44
48
|
|
|
45
49
|
logger: Logger = ...
|
|
46
50
|
history_recorder: HistoryRecorder = ...
|
|
@@ -54,37 +58,37 @@ class ClientCreator:
|
|
|
54
58
|
event_emitter: BaseEventHooks,
|
|
55
59
|
retry_handler_factory: Any,
|
|
56
60
|
retry_config_translator: Any,
|
|
57
|
-
response_parser_factory:
|
|
58
|
-
exceptions_factory:
|
|
59
|
-
config_store:
|
|
60
|
-
user_agent_creator:
|
|
61
|
+
response_parser_factory: Any | None = ...,
|
|
62
|
+
exceptions_factory: ClientExceptionsFactory | None = ...,
|
|
63
|
+
config_store: ConfigValueStore | None = ...,
|
|
64
|
+
user_agent_creator: UserAgentString | None = ...,
|
|
61
65
|
) -> None: ...
|
|
62
66
|
def create_client(
|
|
63
67
|
self,
|
|
64
68
|
service_name: str,
|
|
65
69
|
region_name: str,
|
|
66
70
|
is_secure: bool = ...,
|
|
67
|
-
endpoint_url:
|
|
68
|
-
verify:
|
|
69
|
-
credentials:
|
|
70
|
-
scoped_config:
|
|
71
|
-
api_version:
|
|
72
|
-
client_config:
|
|
73
|
-
auth_token:
|
|
71
|
+
endpoint_url: str | None = ...,
|
|
72
|
+
verify: str | bool | None = ...,
|
|
73
|
+
credentials: Any | None = ...,
|
|
74
|
+
scoped_config: Any | None = ...,
|
|
75
|
+
api_version: str | None = ...,
|
|
76
|
+
client_config: Config | None = ...,
|
|
77
|
+
auth_token: str | None = ...,
|
|
74
78
|
) -> BaseClient: ...
|
|
75
|
-
def create_client_class(self, service_name: str, api_version:
|
|
79
|
+
def create_client_class(self, service_name: str, api_version: Any | None = ...) -> None: ...
|
|
76
80
|
|
|
77
81
|
class ClientEndpointBridge:
|
|
78
82
|
DEFAULT_ENDPOINT: str = ...
|
|
79
83
|
def __init__(
|
|
80
84
|
self,
|
|
81
85
|
endpoint_resolver: BaseEndpointResolver,
|
|
82
|
-
scoped_config:
|
|
83
|
-
client_config:
|
|
84
|
-
default_endpoint:
|
|
85
|
-
service_signing_name:
|
|
86
|
-
config_store:
|
|
87
|
-
service_signature_version:
|
|
86
|
+
scoped_config: Any | None = ...,
|
|
87
|
+
client_config: Any | None = ...,
|
|
88
|
+
default_endpoint: str | None = ...,
|
|
89
|
+
service_signing_name: str | None = ...,
|
|
90
|
+
config_store: ConfigValueStore | None = ...,
|
|
91
|
+
service_signature_version: str | None = ...,
|
|
88
92
|
) -> None:
|
|
89
93
|
self.service_signing_name: str
|
|
90
94
|
self.endpoint_resolver: BaseEndpointResolver
|
|
@@ -96,8 +100,8 @@ class ClientEndpointBridge:
|
|
|
96
100
|
def resolve(
|
|
97
101
|
self,
|
|
98
102
|
service_name: str,
|
|
99
|
-
region_name:
|
|
100
|
-
endpoint_url:
|
|
103
|
+
region_name: str | None = ...,
|
|
104
|
+
endpoint_url: str | None = ...,
|
|
101
105
|
is_secure: bool = ...,
|
|
102
106
|
) -> None: ...
|
|
103
107
|
def resolver_uses_builtin_data(self) -> bool: ...
|
|
@@ -115,8 +119,8 @@ class BaseClient:
|
|
|
115
119
|
client_config: Config,
|
|
116
120
|
partition: str,
|
|
117
121
|
exceptions_factory: ClientExceptionsFactory,
|
|
118
|
-
endpoint_ruleset_resolver:
|
|
119
|
-
user_agent_creator:
|
|
122
|
+
endpoint_ruleset_resolver: EndpointRulesetResolver | None = ...,
|
|
123
|
+
user_agent_creator: UserAgentString | None = ...,
|
|
120
124
|
) -> None:
|
|
121
125
|
self.meta: ClientMeta
|
|
122
126
|
# FIXME: it hides `has no attribute` errors on Client type checking
|
|
@@ -126,7 +130,7 @@ class BaseClient:
|
|
|
126
130
|
def can_paginate(self, operation_name: str) -> bool: ...
|
|
127
131
|
def get_waiter(self, waiter_name: Any) -> Waiter: ...
|
|
128
132
|
@CachedProperty
|
|
129
|
-
def waiter_names(self) ->
|
|
133
|
+
def waiter_names(self) -> list[str]: ...
|
|
130
134
|
@property
|
|
131
135
|
def exceptions(self) -> Any: ...
|
|
132
136
|
|
|
@@ -137,7 +141,7 @@ class ClientMeta:
|
|
|
137
141
|
client_config: Config,
|
|
138
142
|
endpoint_url: str,
|
|
139
143
|
service_model: ServiceModel,
|
|
140
|
-
method_to_api_mapping:
|
|
144
|
+
method_to_api_mapping: dict[str, str],
|
|
141
145
|
partition: str,
|
|
142
146
|
) -> None:
|
|
143
147
|
self.events: BaseEventHooks
|
|
@@ -151,6 +155,6 @@ class ClientMeta:
|
|
|
151
155
|
@property
|
|
152
156
|
def config(self) -> Any: ...
|
|
153
157
|
@property
|
|
154
|
-
def method_to_api_mapping(self) ->
|
|
158
|
+
def method_to_api_mapping(self) -> dict[str, str]: ...
|
|
155
159
|
@property
|
|
156
160
|
def partition(self) -> str: ...
|
botocore-stubs/compat.pyi
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
from base64 import encodebytes as encodebytes
|
|
2
6
|
from collections import OrderedDict as OrderedDict
|
|
3
7
|
from email.utils import formatdate as formatdate
|
|
4
8
|
from http.client import HTTPMessage
|
|
5
9
|
from http.client import HTTPResponse as HTTPResponse
|
|
10
|
+
from inspect import FullArgSpec
|
|
6
11
|
from itertools import zip_longest as zip_longest
|
|
7
12
|
from logging import Logger
|
|
8
|
-
from typing import Any, Iterable, Mapping,
|
|
13
|
+
from typing import Any, Callable, Iterable, Mapping, Pattern, TypeVar
|
|
9
14
|
from urllib.parse import parse_qs as parse_qs
|
|
10
15
|
from urllib.parse import parse_qsl as parse_qsl
|
|
11
16
|
from urllib.parse import quote as quote
|
|
@@ -26,27 +31,27 @@ _R = TypeVar("_R")
|
|
|
26
31
|
|
|
27
32
|
class HTTPHeaders(HTTPMessage):
|
|
28
33
|
@classmethod
|
|
29
|
-
def from_dict(cls:
|
|
34
|
+
def from_dict(cls: type[_R], d: Mapping[str, Any]) -> _R: ...
|
|
30
35
|
@classmethod
|
|
31
|
-
def from_pairs(cls:
|
|
36
|
+
def from_pairs(cls: type[_R], pairs: Iterable[tuple[str, Any]]) -> _R: ...
|
|
32
37
|
|
|
33
38
|
file_type: Any
|
|
34
39
|
zip: Any
|
|
35
40
|
unquote_str = unquote_plus
|
|
36
41
|
|
|
37
42
|
def set_socket_timeout(http_response: Any, timeout: Any) -> None: ...
|
|
38
|
-
def accepts_kwargs(func: Any) ->
|
|
39
|
-
def ensure_unicode(s:
|
|
40
|
-
def ensure_bytes(s:
|
|
43
|
+
def accepts_kwargs(func: Callable[..., Any]) -> FullArgSpec: ...
|
|
44
|
+
def ensure_unicode(s: str, encoding: str | None = ..., errors: Any | None = ...) -> str: ...
|
|
45
|
+
def ensure_bytes(s: str | bytes, encoding: str = ..., errors: str = ...) -> bytes: ...
|
|
41
46
|
|
|
42
47
|
XMLParseError = ETree.ParseError
|
|
43
48
|
|
|
44
49
|
def filter_ssl_warnings() -> None: ...
|
|
45
|
-
def _from_dict(cls:
|
|
50
|
+
def _from_dict(cls: type[_R], d: Mapping[str, Any]) -> _R: ...
|
|
46
51
|
|
|
47
52
|
from_dict: Any
|
|
48
53
|
|
|
49
|
-
def _from_pairs(cls:
|
|
54
|
+
def _from_pairs(cls: type[_R], d: Mapping[str, Any]) -> _R: ...
|
|
50
55
|
|
|
51
56
|
from_pairs: Any
|
|
52
57
|
|
|
@@ -56,7 +61,7 @@ def total_seconds(delta: Any) -> Any: ...
|
|
|
56
61
|
MD5_AVAILABLE: bool
|
|
57
62
|
|
|
58
63
|
def get_md5(*args: Any, **kwargs: Any) -> Any: ...
|
|
59
|
-
def compat_shell_split(s: Any, platform:
|
|
64
|
+
def compat_shell_split(s: Any, platform: Any | None = ...) -> Any: ...
|
|
60
65
|
def get_tzinfo_options() -> Any: ...
|
|
61
66
|
|
|
62
67
|
HAS_CRT: bool
|
botocore-stubs/compress.pyi
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
import io
|
|
2
6
|
from gzip import GzipFile as GzipFile
|
|
3
|
-
from gzip import compress as gzip_compress
|
|
4
7
|
from logging import Logger
|
|
5
|
-
from typing import Any, Callable,
|
|
8
|
+
from typing import Any, Callable, Mapping
|
|
6
9
|
|
|
7
10
|
from botocore.compat import urlencode as urlencode
|
|
8
11
|
from botocore.config import Config
|
|
@@ -15,4 +18,4 @@ def maybe_compress_request(
|
|
|
15
18
|
config: Config, request_dict: Mapping[str, Any], operation_model: OperationModel
|
|
16
19
|
) -> None: ...
|
|
17
20
|
|
|
18
|
-
COMPRESSION_MAPPING:
|
|
21
|
+
COMPRESSION_MAPPING: dict[str, Callable[[io.BytesIO], io.BytesIO]] = ...
|
botocore-stubs/config.pyi
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import Literal, Mapping, TypedDict, TypeVar
|
|
3
6
|
|
|
4
7
|
from botocore.compat import OrderedDict as OrderedDict
|
|
5
8
|
from botocore.endpoint import DEFAULT_TIMEOUT as DEFAULT_TIMEOUT
|
|
@@ -9,11 +12,6 @@ from botocore.exceptions import InvalidRetryConfigurationError as InvalidRetryCo
|
|
|
9
12
|
from botocore.exceptions import InvalidRetryModeError as InvalidRetryModeError
|
|
10
13
|
from botocore.exceptions import InvalidS3AddressingStyleError as InvalidS3AddressingStyleError
|
|
11
14
|
|
|
12
|
-
if sys.version_info >= (3, 9):
|
|
13
|
-
from typing import Literal, TypedDict
|
|
14
|
-
else:
|
|
15
|
-
from typing_extensions import Literal, TypedDict
|
|
16
|
-
|
|
17
15
|
class _RetryDict(TypedDict, total=False):
|
|
18
16
|
total_max_attempts: int
|
|
19
17
|
max_attempts: int
|
|
@@ -27,34 +25,34 @@ class _S3Dict(TypedDict, total=False):
|
|
|
27
25
|
|
|
28
26
|
class _ProxiesConfigDict(TypedDict, total=False):
|
|
29
27
|
proxy_ca_bundle: str
|
|
30
|
-
proxy_client_cert:
|
|
28
|
+
proxy_client_cert: str | tuple[str, str]
|
|
31
29
|
proxy_use_forwarding_for_https: bool
|
|
32
30
|
|
|
33
|
-
_Config = TypeVar("_Config", bound=
|
|
31
|
+
_Config = TypeVar("_Config", bound=Config)
|
|
34
32
|
|
|
35
33
|
class Config:
|
|
36
34
|
OPTION_DEFAULTS: OrderedDict[str, None]
|
|
37
|
-
NON_LEGACY_OPTION_DEFAULTS:
|
|
35
|
+
NON_LEGACY_OPTION_DEFAULTS: dict[str, None]
|
|
38
36
|
def __init__(
|
|
39
37
|
self,
|
|
40
|
-
region_name:
|
|
41
|
-
signature_version:
|
|
42
|
-
user_agent:
|
|
43
|
-
user_agent_extra:
|
|
44
|
-
connect_timeout:
|
|
45
|
-
read_timeout:
|
|
46
|
-
parameter_validation:
|
|
47
|
-
max_pool_connections:
|
|
48
|
-
proxies:
|
|
49
|
-
proxies_config:
|
|
50
|
-
s3:
|
|
51
|
-
retries:
|
|
52
|
-
client_cert:
|
|
53
|
-
inject_host_prefix:
|
|
54
|
-
endpoint_discovery_enabled:
|
|
55
|
-
use_dualstack_endpoint:
|
|
56
|
-
use_fips_endpoint:
|
|
57
|
-
defaults_mode:
|
|
58
|
-
tcp_keepalive:
|
|
38
|
+
region_name: str | None = None,
|
|
39
|
+
signature_version: str | None = None,
|
|
40
|
+
user_agent: str | None = None,
|
|
41
|
+
user_agent_extra: str | None = None,
|
|
42
|
+
connect_timeout: float | None = 60,
|
|
43
|
+
read_timeout: float | None = 60,
|
|
44
|
+
parameter_validation: bool | None = True,
|
|
45
|
+
max_pool_connections: int | None = 10,
|
|
46
|
+
proxies: Mapping[str, str] | None = None,
|
|
47
|
+
proxies_config: _ProxiesConfigDict | None = None,
|
|
48
|
+
s3: _S3Dict | None = None,
|
|
49
|
+
retries: _RetryDict | None = None,
|
|
50
|
+
client_cert: str | tuple[str, str] | None = None,
|
|
51
|
+
inject_host_prefix: bool | None = True,
|
|
52
|
+
endpoint_discovery_enabled: bool | None = None,
|
|
53
|
+
use_dualstack_endpoint: bool | None = None,
|
|
54
|
+
use_fips_endpoint: bool | None = None,
|
|
55
|
+
defaults_mode: bool | None = None,
|
|
56
|
+
tcp_keepalive: bool | None = False,
|
|
59
57
|
) -> None: ...
|
|
60
58
|
def merge(self: _Config, other_config: _Config) -> _Config: ...
|