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.

Files changed (70) hide show
  1. botocore-stubs/__init__.pyi +6 -2
  2. botocore-stubs/args.pyi +22 -24
  3. botocore-stubs/auth.pyi +34 -30
  4. botocore-stubs/awsrequest.pyi +25 -21
  5. botocore-stubs/client.pyi +31 -27
  6. botocore-stubs/compat.pyi +14 -9
  7. botocore-stubs/compress.pyi +6 -3
  8. botocore-stubs/config.pyi +27 -29
  9. botocore-stubs/configloader.pyi +9 -5
  10. botocore-stubs/configprovider.pyi +27 -25
  11. botocore-stubs/credentials.pyi +73 -69
  12. botocore-stubs/crt/__init__.pyi +1 -3
  13. botocore-stubs/crt/auth.pyi +4 -2
  14. botocore-stubs/discovery.pyi +11 -8
  15. botocore-stubs/docs/__init__.pyi +1 -3
  16. botocore-stubs/docs/bcdoc/docstringparser.pyi +11 -7
  17. botocore-stubs/docs/bcdoc/restdoc.pyi +10 -6
  18. botocore-stubs/docs/bcdoc/style.pyi +11 -7
  19. botocore-stubs/docs/client.pyi +8 -4
  20. botocore-stubs/docs/docstring.pyi +4 -2
  21. botocore-stubs/docs/example.pyi +20 -16
  22. botocore-stubs/docs/method.pyi +16 -12
  23. botocore-stubs/docs/paginator.pyi +4 -0
  24. botocore-stubs/docs/params.pyi +18 -14
  25. botocore-stubs/docs/service.pyi +6 -2
  26. botocore-stubs/docs/shape.pyi +6 -2
  27. botocore-stubs/docs/sharedexample.pyi +4 -0
  28. botocore-stubs/docs/translator.pyi +6 -2
  29. botocore-stubs/docs/utils.pyi +8 -4
  30. botocore-stubs/docs/waiter.pyi +4 -0
  31. botocore-stubs/endpoint.pyi +15 -11
  32. botocore-stubs/endpoint_provider.pyi +38 -39
  33. botocore-stubs/errorfactory.pyi +7 -3
  34. botocore-stubs/eventstream.pyi +20 -16
  35. botocore-stubs/exceptions.pyi +8 -10
  36. botocore-stubs/handlers.pyi +10 -6
  37. botocore-stubs/history.pyi +6 -2
  38. botocore-stubs/hooks.pyi +19 -17
  39. botocore-stubs/httpchecksum.pyi +13 -10
  40. botocore-stubs/httpsession.pyi +21 -17
  41. botocore-stubs/loaders.pyi +17 -13
  42. botocore-stubs/model.pyi +50 -46
  43. botocore-stubs/monitoring.pyi +23 -20
  44. botocore-stubs/paginate.pyi +7 -3
  45. botocore-stubs/parsers.pyi +11 -7
  46. botocore-stubs/regions.pyi +18 -14
  47. botocore-stubs/response.pyi +8 -4
  48. botocore-stubs/retries/adaptive.pyi +5 -1
  49. botocore-stubs/retries/bucket.pyi +4 -0
  50. botocore-stubs/retries/quota.pyi +6 -2
  51. botocore-stubs/retries/special.pyi +4 -0
  52. botocore-stubs/retries/standard.pyi +16 -12
  53. botocore-stubs/retries/throttling.pyi +4 -0
  54. botocore-stubs/retryhandler.pyi +10 -6
  55. botocore-stubs/serialize.pyi +11 -7
  56. botocore-stubs/session.pyi +43 -49
  57. botocore-stubs/signers.pyi +26 -24
  58. botocore-stubs/stub.pyi +13 -15
  59. botocore-stubs/tokens.pyi +10 -6
  60. botocore-stubs/translate.pyi +6 -2
  61. botocore-stubs/useragent.pyi +9 -5
  62. botocore-stubs/utils.pyi +57 -58
  63. botocore-stubs/validate.pyi +5 -1
  64. botocore-stubs/waiter.pyi +9 -5
  65. {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.71.dist-info}/METADATA +1 -2
  66. botocore_stubs-1.35.71.dist-info/RECORD +73 -0
  67. botocore_stubs-1.35.69.dist-info/RECORD +0 -73
  68. {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.71.dist-info}/LICENSE +0 -0
  69. {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.71.dist-info}/WHEEL +0 -0
  70. {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.71.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,8 @@
1
- from typing import Mapping, Type
1
+ """
2
+ Copyright 2024 Vlad Emelianov
3
+ """
4
+
5
+ from typing import Mapping
2
6
 
3
7
  from botocore.exceptions import ClientError as ClientError
4
8
  from botocore.exceptions import ClientError as _ClientError
@@ -6,8 +10,8 @@ from botocore.model import ServiceModel
6
10
  from botocore.utils import get_service_module_name as get_service_module_name
7
11
 
8
12
  class BaseClientExceptions:
9
- ClientError: Type[_ClientError] = ...
10
- def __init__(self, code_to_exception: Mapping[str, Type[_ClientError]]) -> None: ...
13
+ ClientError: type[_ClientError] = ... # noqa: F811
14
+ def __init__(self, code_to_exception: Mapping[str, type[_ClientError]]) -> None: ...
11
15
  def from_code(self, error_code: str) -> _ClientError: ...
12
16
  def __getattr__(self, name: str) -> None: ...
13
17
 
@@ -1,4 +1,8 @@
1
- from typing import Any, Dict, Generic, Iterator, Tuple, TypeVar
1
+ """
2
+ Copyright 2024 Vlad Emelianov
3
+ """
4
+
5
+ from typing import Any, Generic, Iterator, TypeVar
2
6
 
3
7
  from botocore.exceptions import EventStreamError as EventStreamError
4
8
  from botocore.model import StructureShape
@@ -32,31 +36,31 @@ class DecodeUtils:
32
36
  INT32_BYTE_FORMAT: str = ...
33
37
  INT64_BYTE_FORMAT: str = ...
34
38
  PRELUDE_BYTE_FORMAT: str = ...
35
- UINT_BYTE_FORMAT: Dict[int, str] = ...
39
+ UINT_BYTE_FORMAT: dict[int, str] = ...
36
40
  @staticmethod
37
- def unpack_true(data: bytes) -> Tuple[bool, int]: ...
41
+ def unpack_true(data: bytes) -> tuple[bool, int]: ...
38
42
  @staticmethod
39
- def unpack_false(data: bytes) -> Tuple[bool, int]: ...
43
+ def unpack_false(data: bytes) -> tuple[bool, int]: ...
40
44
  @staticmethod
41
- def unpack_uint8(data: bytes) -> Tuple[int, int]: ...
45
+ def unpack_uint8(data: bytes) -> tuple[int, int]: ...
42
46
  @staticmethod
43
- def unpack_uint32(data: bytes) -> Tuple[int, int]: ...
47
+ def unpack_uint32(data: bytes) -> tuple[int, int]: ...
44
48
  @staticmethod
45
- def unpack_int8(data: bytes) -> Tuple[int, int]: ...
49
+ def unpack_int8(data: bytes) -> tuple[int, int]: ...
46
50
  @staticmethod
47
- def unpack_int16(data: bytes) -> Tuple[int, int]: ...
51
+ def unpack_int16(data: bytes) -> tuple[int, int]: ...
48
52
  @staticmethod
49
- def unpack_int32(data: bytes) -> Tuple[int, int]: ...
53
+ def unpack_int32(data: bytes) -> tuple[int, int]: ...
50
54
  @staticmethod
51
- def unpack_int64(data: bytes) -> Tuple[int, int]: ...
55
+ def unpack_int64(data: bytes) -> tuple[int, int]: ...
52
56
  @staticmethod
53
- def unpack_byte_array(data: bytes, length_byte_size: int = ...) -> Tuple[bytes, int]: ...
57
+ def unpack_byte_array(data: bytes, length_byte_size: int = ...) -> tuple[bytes, int]: ...
54
58
  @staticmethod
55
- def unpack_utf8_string(data: bytes, length_byte_size: int = ...) -> Tuple[str, int]: ...
59
+ def unpack_utf8_string(data: bytes, length_byte_size: int = ...) -> tuple[str, int]: ...
56
60
  @staticmethod
57
- def unpack_uuid(data: bytes) -> Tuple[bytes, int]: ...
61
+ def unpack_uuid(data: bytes) -> tuple[bytes, int]: ...
58
62
  @staticmethod
59
- def unpack_prelude(data: bytes) -> Tuple[Tuple[int, int, int], int]: ...
63
+ def unpack_prelude(data: bytes) -> tuple[tuple[int, int, int], int]: ...
60
64
 
61
65
  class MessagePrelude:
62
66
  def __init__(self, total_length: int, headers_length: int, crc: int) -> None:
@@ -78,11 +82,11 @@ class EventStreamMessage:
78
82
  self.payload: bytes = ...
79
83
  self.crc: int = ...
80
84
 
81
- def to_response_dict(self, status_code: int = ...) -> Dict[str, Any]: ...
85
+ def to_response_dict(self, status_code: int = ...) -> dict[str, Any]: ...
82
86
 
83
87
  class EventStreamHeaderParser:
84
88
  def __init__(self) -> None: ...
85
- def parse(self, data: bytes) -> Dict[str, Any]: ...
89
+ def parse(self, data: bytes) -> dict[str, Any]: ...
86
90
 
87
91
  class EventStreamBuffer:
88
92
  def __init__(self) -> None: ...
@@ -1,14 +1,12 @@
1
- import sys
2
- from typing import IO, Any, Dict, Iterable, List, Mapping
1
+ """
2
+ Copyright 2024 Vlad Emelianov
3
+ """
4
+
5
+ from typing import IO, Any, Iterable, Mapping, TypedDict
3
6
 
4
7
  import requests
5
8
  from urllib3.exceptions import ReadTimeoutError as _ReadTimeoutError
6
9
 
7
- if sys.version_info >= (3, 9):
8
- from typing import TypedDict
9
- else:
10
- from typing_extensions import TypedDict
11
-
12
10
  class _ClientErrorResponseError(TypedDict, total=False):
13
11
  Code: str
14
12
  Message: str
@@ -17,7 +15,7 @@ class _ResponseMetadataTypeDef(TypedDict):
17
15
  RequestId: str
18
16
  HostId: str
19
17
  HTTPStatusCode: int
20
- HTTPHeaders: Dict[str, Any]
18
+ HTTPHeaders: dict[str, Any]
21
19
  RetryAttempts: int
22
20
 
23
21
  class _AttributeMapTypeDef(TypedDict, total=False):
@@ -34,7 +32,7 @@ class _ClientErrorResponseTypeDef(TypedDict, total=False):
34
32
  StatusReason: str
35
33
  Error: _ClientErrorResponseError
36
34
  ResponseMetadata: _ResponseMetadataTypeDef
37
- CancellationReasons: List[_CancellationReasonTypeDef]
35
+ CancellationReasons: list[_CancellationReasonTypeDef]
38
36
 
39
37
  class BotoCoreError(Exception):
40
38
  fmt: str
@@ -64,7 +62,7 @@ class _UnknownRegionErrorKwargs(TypedDict):
64
62
 
65
63
  class UnknownRegionError(BotoCoreError):
66
64
  def __init__(self, *, region_name: str = ..., error_msg: str = ..., **kwargs: Any) -> None:
67
- self.kwargs: _UnknownServiceErrorKwargs
65
+ self.kwargs: _UnknownRegionErrorKwargs
68
66
 
69
67
  class _ApiVersionNotFoundErrorKwargs(TypedDict):
70
68
  service_name: str
@@ -1,5 +1,9 @@
1
+ """
2
+ Copyright 2024 Vlad Emelianov
3
+ """
4
+
1
5
  from logging import Logger
2
- from typing import Any, Dict, List, Mapping, Pattern, Tuple
6
+ from typing import Any, Mapping, Pattern
3
7
  from urllib.request import Request
4
8
 
5
9
  from botocore.client import BaseClient
@@ -33,9 +37,9 @@ REGISTER_FIRST: Any
33
37
  REGISTER_LAST: Any
34
38
  VALID_BUCKET: Pattern[str]
35
39
  VALID_S3_ARN: Pattern[str]
36
- S3_SIGNING_NAMES: Tuple[str, ...]
40
+ S3_SIGNING_NAMES: tuple[str, ...]
37
41
  VERSION_ID_SUFFIX: Pattern[str]
38
- SERVICE_NAME_ALIASES: Dict[str, str]
42
+ SERVICE_NAME_ALIASES: dict[str, str]
39
43
 
40
44
  def handle_service_name_alias(service_name: str, **kwargs: Any) -> Any: ...
41
45
  def add_recursion_detection_header(params: Mapping[str, Any], **kwargs: Any) -> None: ...
@@ -140,12 +144,12 @@ def remove_content_type_header_for_presigning(request: Request, **kwargs: Any) -
140
144
  def handle_expires_header(
141
145
  operation_model: OperationModel,
142
146
  response_dict: Mapping[str, Any],
143
- customized_response_dict: Dict[str, Any],
147
+ customized_response_dict: dict[str, Any],
144
148
  **kwargs: Any,
145
149
  ) -> None: ...
146
150
  def document_expires_shape(section: DocumentStructure, event_name: str, **kwargs: Any) -> None: ...
147
151
  def add_query_compatibility_header(
148
- model: OperationModel, params: Dict[str, Any], **kwargs: Any
152
+ model: OperationModel, params: dict[str, Any], **kwargs: Any
149
153
  ) -> None: ...
150
154
 
151
- BUILTIN_HANDLERS: List[Tuple[Any, ...]] = ...
155
+ BUILTIN_HANDLERS: list[tuple[Any, ...]] = ...
@@ -1,9 +1,13 @@
1
+ """
2
+ Copyright 2024 Vlad Emelianov
3
+ """
4
+
1
5
  from logging import Logger
2
- from typing import Any, Optional
6
+ from typing import Any
3
7
 
4
8
  logger: Logger = ...
5
9
 
6
- HISTORY_RECORDER: Optional[HistoryRecorder]
10
+ HISTORY_RECORDER: HistoryRecorder | None
7
11
 
8
12
  class BaseHistoryHandler:
9
13
  def emit(self, event_type: str, payload: Any, source: str) -> None: ...
botocore-stubs/hooks.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, NamedTuple, Optional, TypeVar
6
+ from typing import Any, NamedTuple, TypeVar
3
7
 
4
8
  from botocore.compat import accepts_kwargs as accepts_kwargs
5
9
  from botocore.utils import EVENT_ALIASES as EVENT_ALIASES
@@ -16,7 +20,7 @@ class _NodeList(NamedTuple):
16
20
  class NodeList(_NodeList):
17
21
  def __copy__(self: _R) -> _R: ...
18
22
 
19
- def first_non_none_response(responses: Any, default: Optional[Any] = ...) -> Any: ...
23
+ def first_non_none_response(responses: Any, default: Any | None = ...) -> Any: ...
20
24
 
21
25
  class BaseEventHooks:
22
26
  def emit(self, event_name: Any, **kwargs: Any) -> Any: ...
@@ -24,28 +28,28 @@ class BaseEventHooks:
24
28
  self,
25
29
  event_name: str,
26
30
  handler: Any,
27
- unique_id: Optional[str] = ...,
31
+ unique_id: str | None = ...,
28
32
  unique_id_uses_count: bool = ...,
29
33
  ) -> None: ...
30
34
  def register_first(
31
35
  self,
32
36
  event_name: str,
33
37
  handler: Any,
34
- unique_id: Optional[str] = ...,
38
+ unique_id: str | None = ...,
35
39
  unique_id_uses_count: bool = ...,
36
40
  ) -> None: ...
37
41
  def register_last(
38
42
  self,
39
43
  event_name: str,
40
44
  handler: Any,
41
- unique_id: Optional[str] = ...,
45
+ unique_id: str | None = ...,
42
46
  unique_id_uses_count: bool = ...,
43
47
  ) -> None: ...
44
48
  def unregister(
45
49
  self,
46
50
  event_name: str,
47
- handler: Optional[Any] = ...,
48
- unique_id: Optional[str] = ...,
51
+ handler: Any | None = ...,
52
+ unique_id: str | None = ...,
49
53
  unique_id_uses_count: bool = ...,
50
54
  ) -> None: ...
51
55
 
@@ -56,44 +60,42 @@ class HierarchicalEmitter(BaseEventHooks):
56
60
  def unregister(
57
61
  self,
58
62
  event_name: str,
59
- handler: Optional[Any] = ...,
60
- unique_id: Optional[str] = ...,
63
+ handler: Any | None = ...,
64
+ unique_id: str | None = ...,
61
65
  unique_id_uses_count: bool = ...,
62
66
  ) -> None: ...
63
67
  def __copy__(self: _R) -> _R: ...
64
68
 
65
69
  class EventAliaser(BaseEventHooks):
66
- def __init__(
67
- self, event_emitter: BaseEventHooks, event_aliases: Optional[Any] = ...
68
- ) -> None: ...
70
+ def __init__(self, event_emitter: BaseEventHooks, event_aliases: Any | None = ...) -> None: ...
69
71
  def emit(self, event_name: str, **kwargs: Any) -> Any: ...
70
72
  def emit_until_response(self, event_name: str, **kwargs: Any) -> Any: ...
71
73
  def register(
72
74
  self,
73
75
  event_name: str,
74
76
  handler: Any,
75
- unique_id: Optional[Any] = ...,
77
+ unique_id: Any | None = ...,
76
78
  unique_id_uses_count: bool = ...,
77
79
  ) -> Any: ...
78
80
  def register_first(
79
81
  self,
80
82
  event_name: str,
81
83
  handler: Any,
82
- unique_id: Optional[str] = ...,
84
+ unique_id: str | None = ...,
83
85
  unique_id_uses_count: bool = ...,
84
86
  ) -> Any: ...
85
87
  def register_last(
86
88
  self,
87
89
  event_name: str,
88
90
  handler: Any,
89
- unique_id: Optional[str] = ...,
91
+ unique_id: str | None = ...,
90
92
  unique_id_uses_count: bool = ...,
91
93
  ) -> Any: ...
92
94
  def unregister(
93
95
  self,
94
96
  event_name: str,
95
- handler: Optional[Any] = ...,
96
- unique_id: Optional[str] = ...,
97
+ handler: Any | None = ...,
98
+ unique_id: str | None = ...,
97
99
  unique_id_uses_count: bool = ...,
98
100
  ) -> Any: ...
99
101
  def __copy__(self: _R) -> _R: ...
@@ -1,7 +1,10 @@
1
+ """
2
+ Copyright 2024 Vlad Emelianov
3
+ """
4
+
1
5
  import logging
2
- from typing import IO, Any, Dict, Iterator, Mapping, Optional, Sequence, Type, Union
6
+ from typing import IO, Any, Iterator, Mapping, Sequence
3
7
 
4
- from awscrt import checksums as crt_checksums
5
8
  from botocore.awsrequest import AWSHTTPResponse
6
9
  from botocore.compat import HAS_CRT as HAS_CRT
7
10
  from botocore.exceptions import AwsChunkedWrapperError as AwsChunkedWrapperError
@@ -14,10 +17,10 @@ from botocore.utils import determine_content_length as determine_content_length
14
17
  logger: logging.Logger
15
18
 
16
19
  class BaseChecksum:
17
- def update(self, chunk: Union[bytes, bytearray]) -> None: ...
20
+ def update(self, chunk: bytes | bytearray) -> None: ...
18
21
  def digest(self) -> bytes: ...
19
22
  def b64digest(self) -> str: ...
20
- def handle(self, body: Union[bytes, bytearray, IO[Any]]) -> str: ...
23
+ def handle(self, body: bytes | bytearray | IO[Any]) -> str: ...
21
24
 
22
25
  class Crc32Checksum(BaseChecksum):
23
26
  def __init__(self) -> None: ...
@@ -38,19 +41,19 @@ class AwsChunkedWrapper:
38
41
  def __init__(
39
42
  self,
40
43
  raw: IO[Any],
41
- checksum_cls: Optional[Type[BaseChecksum]] = ...,
44
+ checksum_cls: type[BaseChecksum] | None = ...,
42
45
  checksum_name: str = ...,
43
- chunk_size: Optional[int] = ...,
46
+ chunk_size: int | None = ...,
44
47
  ) -> None: ...
45
48
  def seek(self, offset: int, whence: int = ...) -> None: ...
46
- def read(self, size: Optional[int] = ...) -> bytes: ...
49
+ def read(self, size: int | None = ...) -> bytes: ...
47
50
  def __iter__(self) -> Iterator[bytes]: ...
48
51
 
49
52
  class StreamingChecksumBody(StreamingBody):
50
53
  def __init__(
51
54
  self, raw_stream: IO[Any], content_length: int, checksum: BaseChecksum, expected: str
52
55
  ) -> None: ...
53
- def read(self, amt: Optional[int] = ...) -> bytes: ...
56
+ def read(self, amt: int | None = ...) -> bytes: ...
54
57
 
55
58
  def resolve_checksum_context(
56
59
  request: Mapping[str, Any], operation_model: OperationModel, params: Mapping[str, Any]
@@ -59,14 +62,14 @@ def resolve_request_checksum_algorithm(
59
62
  request: Mapping[str, Any],
60
63
  operation_model: OperationModel,
61
64
  params: Mapping[str, Any],
62
- supported_algorithms: Optional[Sequence[str]] = ...,
65
+ supported_algorithms: Sequence[str] | None = ...,
63
66
  ) -> None: ...
64
67
  def apply_request_checksum(request: Mapping[str, Any]) -> None: ...
65
68
  def resolve_response_checksum_algorithms(
66
69
  request: Mapping[str, Any],
67
70
  operation_model: OperationModel,
68
71
  params: Mapping[str, Any],
69
- supported_algorithms: Optional[Sequence[str]] = ...,
72
+ supported_algorithms: Sequence[str] | None = ...,
70
73
  ) -> None: ...
71
74
  def handle_checksum_body(
72
75
  http_response: AWSHTTPResponse,
@@ -1,5 +1,9 @@
1
+ """
2
+ Copyright 2024 Vlad Emelianov
3
+ """
4
+
1
5
  from logging import Logger
2
- from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
6
+ from typing import Any, Mapping
3
7
 
4
8
  from botocore.awsrequest import AWSPreparedRequest, AWSRequest, AWSResponse
5
9
  from botocore.compat import IPV6_ADDRZ_RE as IPV6_ADDRZ_RE
@@ -19,15 +23,15 @@ logger: Logger = ...
19
23
  DEFAULT_TIMEOUT: int = ...
20
24
  MAX_POOL_CONNECTIONS: int = ...
21
25
  DEFAULT_CA_BUNDLE: str = ...
22
- DEFAULT_CIPHERS: Optional[str] = ...
26
+ DEFAULT_CIPHERS: str | None = ...
23
27
 
24
28
  def where() -> str: ...
25
- def get_cert_path(verify: bool) -> Optional[str]: ...
29
+ def get_cert_path(verify: bool) -> str | None: ...
26
30
  def create_urllib3_context(
27
- ssl_version: Optional[int] = ...,
28
- cert_reqs: Optional[bool] = ...,
29
- options: Optional[int] = ...,
30
- ciphers: Optional[str] = ...,
31
+ ssl_version: int | None = ...,
32
+ cert_reqs: bool | None = ...,
33
+ options: int | None = ...,
34
+ ciphers: str | None = ...,
31
35
  ) -> Any: ...
32
36
  def ensure_boolean(val: Any) -> bool: ...
33
37
  def mask_proxy_url(proxy_url: str) -> str: ...
@@ -35,24 +39,24 @@ def mask_proxy_url(proxy_url: str) -> str: ...
35
39
  class ProxyConfiguration:
36
40
  def __init__(
37
41
  self,
38
- proxies: Optional[Mapping[str, Any]] = ...,
39
- proxies_settings: Optional[Mapping[str, Any]] = ...,
42
+ proxies: Mapping[str, Any] | None = ...,
43
+ proxies_settings: Mapping[str, Any] | None = ...,
40
44
  ) -> None: ...
41
45
  def proxy_url_for(self, url: str) -> str: ...
42
- def proxy_headers_for(self, proxy_url: str) -> Dict[str, Any]: ...
46
+ def proxy_headers_for(self, proxy_url: str) -> dict[str, Any]: ...
43
47
  @property
44
- def settings(self) -> Dict[str, Any]: ...
48
+ def settings(self) -> dict[str, Any]: ...
45
49
 
46
50
  class URLLib3Session:
47
51
  def __init__(
48
52
  self,
49
53
  verify: bool = ...,
50
- proxies: Optional[Mapping[str, Any]] = ...,
51
- timeout: Optional[int] = ...,
54
+ proxies: Mapping[str, Any] | None = ...,
55
+ timeout: int | None = ...,
52
56
  max_pool_connections: int = ...,
53
- socket_options: Optional[List[str]] = ...,
54
- client_cert: Optional[Union[str, Tuple[str, str]]] = ...,
55
- proxies_config: Optional[Mapping[str, Any]] = ...,
57
+ socket_options: list[str] | None = ...,
58
+ client_cert: str | tuple[str, str] | None = ...,
59
+ proxies_config: Mapping[str, Any] | None = ...,
56
60
  ) -> None: ...
57
61
  def close(self) -> None: ...
58
- def send(self, request: Union[AWSRequest, AWSPreparedRequest]) -> AWSResponse: ...
62
+ def send(self, request: AWSRequest | AWSPreparedRequest) -> AWSResponse: ...
@@ -1,5 +1,9 @@
1
+ """
2
+ Copyright 2024 Vlad Emelianov
3
+ """
4
+
1
5
  from logging import Logger
2
- from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Type
6
+ from typing import Any, Callable, Iterable, Mapping
3
7
 
4
8
  from botocore.compat import OrderedDict as OrderedDict
5
9
  from botocore.exceptions import DataNotFoundError as DataNotFoundError
@@ -16,33 +20,33 @@ class JSONFileLoader:
16
20
  def exists(self, file_path: str) -> bool: ...
17
21
  def load_file(self, file_path: str) -> Any: ...
18
22
 
19
- def create_loader(search_path_string: Optional[str] = ...) -> "Loader": ...
23
+ def create_loader(search_path_string: str | None = ...) -> Loader: ...
20
24
 
21
25
  class Loader:
22
- FILE_LOADER_CLASS: Type[JSONFileLoader] = ...
26
+ FILE_LOADER_CLASS: type[JSONFileLoader] = ...
23
27
  BUILTIN_DATA_PATH: str = ...
24
28
  CUSTOMER_DATA_PATH: str = ...
25
- BUILTIN_EXTRAS_TYPES: List[str] = ...
29
+ BUILTIN_EXTRAS_TYPES: list[str] = ...
26
30
  def __init__(
27
31
  self,
28
- extra_search_paths: Optional[Iterable[str]] = ...,
29
- file_loader: Optional[JSONFileLoader] = ...,
30
- cache: Optional[Any] = ...,
32
+ extra_search_paths: Iterable[str] | None = ...,
33
+ file_loader: JSONFileLoader | None = ...,
34
+ cache: Any | None = ...,
31
35
  include_default_search_paths: bool = ...,
32
36
  include_default_extras: bool = ...,
33
37
  ) -> None:
34
38
  self.file_loader: JSONFileLoader
35
39
 
36
40
  @property
37
- def search_paths(self) -> List[str]: ...
41
+ def search_paths(self) -> list[str]: ...
38
42
  @property
39
- def extras_types(self) -> List[str]: ...
40
- def list_available_services(self, type_name: str) -> List[str]: ...
43
+ def extras_types(self) -> list[str]: ...
44
+ def list_available_services(self, type_name: str) -> list[str]: ...
41
45
  def determine_latest_version(self, service_name: str, type_name: str) -> str: ...
42
- def list_api_versions(self, service_name: str, type_name: str) -> List[str]: ...
43
- def load_data_with_path(self, name: str) -> Tuple[Dict[str, Any], str]: ...
46
+ def list_api_versions(self, service_name: str, type_name: str) -> list[str]: ...
47
+ def load_data_with_path(self, name: str) -> tuple[dict[str, Any], str]: ...
44
48
  def load_service_model(
45
- self, service_name: str, type_name: str, api_version: Optional[Any] = ...
49
+ self, service_name: str, type_name: str, api_version: Any | None = ...
46
50
  ) -> Any: ...
47
51
  def load_data(self, name: str) -> Any: ...
48
52
  def is_builtin_path(self, path: str) -> bool: ...