capo-redshift-data 0.5.0__tar.gz → 0.7.0__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.
- {capo_redshift_data-0.5.0/src/capo_redshift_data.egg-info → capo_redshift_data-0.7.0}/PKG-INFO +2 -2
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/pyproject.toml +2 -2
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_auth/_sigv4.py +9 -9
- capo_redshift_data-0.7.0/src/capo_redshift_data/_aws.py +28 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_operations/redshift_data/batch_execute_statement.py +6 -6
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_operations/redshift_data/cancel_statement.py +5 -5
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_operations/redshift_data/describe_statement.py +4 -4
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_operations/redshift_data/describe_table.py +5 -5
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_operations/redshift_data/execute_statement.py +6 -6
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_operations/redshift_data/get_statement_result.py +4 -4
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_operations/redshift_data/get_statement_result_v2.py +4 -4
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_operations/redshift_data/list_databases.py +5 -5
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_operations/redshift_data/list_schemas.py +5 -5
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_operations/redshift_data/list_sessions.py +3 -3
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_operations/redshift_data/list_statements.py +3 -3
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_operations/redshift_data/list_tables.py +5 -5
- capo_redshift_data-0.7.0/src/capo_redshift_data/_services/_pipeline.py +522 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_services/async_redshift_data.py +55 -18
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_services/redshift_data.py +55 -18
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/errors/_base.py +8 -3
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/errors/active_sessions_exceeded_exception.py +9 -3
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/errors/active_statements_exceeded_exception.py +9 -3
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/errors/active_waiting_requests_exceeded_exception.py +9 -3
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/errors/batch_execute_statement_exception.py +9 -3
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/errors/database_connection_exception.py +11 -3
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/errors/execute_statement_exception.py +11 -3
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/errors/internal_server_exception.py +11 -3
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/errors/query_timeout_exception.py +11 -3
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/errors/resource_not_found_exception.py +11 -3
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/errors/validation_exception.py +11 -3
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0/src/capo_redshift_data.egg-info}/PKG-INFO +2 -2
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data.egg-info/SOURCES.txt +1 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data.egg-info/requires.txt +1 -1
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/tests/test_sigv4.py +21 -6
- capo_redshift_data-0.5.0/src/capo_redshift_data/_services/_pipeline.py +0 -266
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/LICENSE +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/README.md +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/setup.cfg +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/__init__.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_async.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_auth/_identity.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_auth/_providers.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_auth/_signers.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_auth/_zapros_handler.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_body.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_iter.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_pagination.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_protocol/__init__.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_protocol/errors.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_protocol/eventstream.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_protocol/serialize.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_protocol/xml.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_rule_engine/__init__.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_rule_engine/_aws_partition.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_rule_engine/_endpoint_rule_set.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_rule_engine/_endpoint_runtime.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_services/_aws_config.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/errors/__init__.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/py.typed +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/_prelude/blob.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/_prelude/timestamp.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/batch_execute_statement_input.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/batch_execute_statement_output.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/blob.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/bool.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/boxed_boolean.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/boxed_double.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/boxed_long.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/cancel_statement_request.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/cancel_statement_response.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/client_token.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/cluster_identifier_string.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/column_list.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/column_metadata.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/column_metadata_list.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/database_list.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/db_group_list.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/describe_statement_request.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/describe_statement_response.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/describe_table_request.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/describe_table_response.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/execute_statement_input.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/execute_statement_output.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/execution_mode.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/field.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/field_list.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/formatted_sql_records.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/get_statement_result_request.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/get_statement_result_response.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/get_statement_result_v2_request.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/get_statement_result_v2_response.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/integer.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/list_databases_request.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/list_databases_response.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/list_schemas_request.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/list_schemas_response.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/list_sessions_request.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/list_sessions_response.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/list_statements_limit.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/list_statements_request.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/list_statements_response.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/list_tables_request.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/list_tables_response.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/long.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/page_size.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/parameter_name.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/parameter_value.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/query_records.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/result_format_string.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/schema_list.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/secret_arn.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/session_alive_seconds.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/session_data.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/session_list.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/session_status_string.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/sql_list.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/sql_parameter.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/sql_parameters_list.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/sql_records.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/statement_data.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/statement_list.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/statement_name_string.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/statement_status_string.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/statement_string.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/statement_string_list.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/status_string.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/string.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/sub_statement_data.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/sub_statement_list.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/table_list.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/table_member.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/uuid.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/wait_time_seconds.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/types/workgroup_name_string.py +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data.egg-info/dependency_links.txt +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data.egg-info/top_level.txt +0 -0
- {capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/tests/test_body.py +0 -0
{capo_redshift_data-0.5.0/src/capo_redshift_data.egg-info → capo_redshift_data-0.7.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: capo-redshift-data
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Python SDK for AWS Redshift Data.
|
|
5
5
|
Classifier: Development Status :: 4 - Beta
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -17,7 +17,7 @@ Classifier: Typing :: Typed
|
|
|
17
17
|
Requires-Python: >=3.10
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
|
-
Requires-Dist: zapros>=0.
|
|
20
|
+
Requires-Dist: zapros>=0.21.0
|
|
21
21
|
Provides-Extra: anyio
|
|
22
22
|
Requires-Dist: anyio>=3.0; extra == "anyio"
|
|
23
23
|
Provides-Extra: sso
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "capo-redshift-data"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.7.0"
|
|
4
4
|
description = "Python SDK for AWS Redshift Data."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -19,7 +19,7 @@ classifiers = [
|
|
|
19
19
|
"Typing :: Typed",
|
|
20
20
|
]
|
|
21
21
|
dependencies = [
|
|
22
|
-
"zapros>=0.
|
|
22
|
+
"zapros>=0.21.0",
|
|
23
23
|
]
|
|
24
24
|
|
|
25
25
|
[project.optional-dependencies]
|
{capo_redshift_data-0.5.0 → capo_redshift_data-0.7.0}/src/capo_redshift_data/_auth/_sigv4.py
RENAMED
|
@@ -17,7 +17,7 @@ import hmac
|
|
|
17
17
|
import re
|
|
18
18
|
from collections.abc import AsyncIterator, Iterator
|
|
19
19
|
from typing import Any, Literal, TypedDict, cast
|
|
20
|
-
from urllib.parse import quote
|
|
20
|
+
from urllib.parse import quote
|
|
21
21
|
|
|
22
22
|
import zapros
|
|
23
23
|
from pywhatwgurl import URLSearchParams
|
|
@@ -134,11 +134,11 @@ def _remove_dot_segments(path: str) -> str:
|
|
|
134
134
|
def _canonical_path(path: str, *, double_encode: bool, normalize: bool) -> str:
|
|
135
135
|
"""Build CanonicalURI.
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
normalize dot segments and URI-encode each
|
|
139
|
-
rules-engine ``disableNormalizePath`` /
|
|
140
|
-
turn those steps off — S3-family
|
|
141
|
-
signed exactly as provided.
|
|
137
|
+
``path`` is the path as sent on the wire, so it is already URI-encoded
|
|
138
|
+
once. Standard services normalize dot segments and URI-encode each
|
|
139
|
+
segment a second time. The rules-engine ``disableNormalizePath`` /
|
|
140
|
+
``disableDoubleEncoding`` flags turn those steps off — S3-family
|
|
141
|
+
services set both, so the path is signed exactly as provided.
|
|
142
142
|
"""
|
|
143
143
|
if not path:
|
|
144
144
|
return "/"
|
|
@@ -148,9 +148,9 @@ def _canonical_path(path: str, *, double_encode: bool, normalize: bool) -> str:
|
|
|
148
148
|
path = _remove_dot_segments(path)
|
|
149
149
|
if not double_encode:
|
|
150
150
|
return path
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return quote(
|
|
151
|
+
# Never decode first: that would turn a "%2F" inside a segment (an ARN in
|
|
152
|
+
# a path label) into a separator and leave it out of the second encoding.
|
|
153
|
+
return quote(path, safe="/~")
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
def _canonical_query(query: str) -> str:
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""Error codes and HTTP statuses that are retried whether or not the model marks them @retryable."""
|
|
2
|
+
|
|
3
|
+
# Transient: retried with the normal backoff.
|
|
4
|
+
KNOWN_RETRYABLE_STATUSES = frozenset({500, 502, 503, 504})
|
|
5
|
+
KNOWN_RETRYABLE_CODES = frozenset(
|
|
6
|
+
{"PriorRequestNotComplete", "RequestTimeout", "RequestTimeoutException"}
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
# Throttling: retried with the longer throttling backoff.
|
|
10
|
+
KNOWN_THROTTLING_STATUSES = frozenset({429})
|
|
11
|
+
KNOWN_THROTTLING_CODES = frozenset(
|
|
12
|
+
{
|
|
13
|
+
"BandwidthLimitExceeded",
|
|
14
|
+
"EC2ThrottledException",
|
|
15
|
+
"LimitExceededException",
|
|
16
|
+
"PriorRequestNotComplete",
|
|
17
|
+
"ProvisionedThroughputExceededException",
|
|
18
|
+
"RequestLimitExceeded",
|
|
19
|
+
"RequestThrottled",
|
|
20
|
+
"RequestThrottledException",
|
|
21
|
+
"SlowDown",
|
|
22
|
+
"ThrottledException",
|
|
23
|
+
"Throttling",
|
|
24
|
+
"ThrottlingException",
|
|
25
|
+
"TooManyRequestsException",
|
|
26
|
+
"TransactionInProgressException",
|
|
27
|
+
}
|
|
28
|
+
)
|
|
@@ -38,27 +38,27 @@ def handle_error(response: zapros.Response) -> Never:
|
|
|
38
38
|
match code:
|
|
39
39
|
case "ActiveSessionsExceededException":
|
|
40
40
|
raise capo_redshift_data.errors.active_sessions_exceeded_exception.ActiveSessionsExceededException.from_aws_json_1_1(
|
|
41
|
-
data, message
|
|
41
|
+
data, message, response=response
|
|
42
42
|
)
|
|
43
43
|
case "ActiveStatementsExceededException":
|
|
44
44
|
raise capo_redshift_data.errors.active_statements_exceeded_exception.ActiveStatementsExceededException.from_aws_json_1_1(
|
|
45
|
-
data, message
|
|
45
|
+
data, message, response=response
|
|
46
46
|
)
|
|
47
47
|
case "BatchExecuteStatementException":
|
|
48
48
|
raise capo_redshift_data.errors.batch_execute_statement_exception.BatchExecuteStatementException.from_aws_json_1_1(
|
|
49
|
-
data, message
|
|
49
|
+
data, message, response=response
|
|
50
50
|
)
|
|
51
51
|
case "InternalServerException":
|
|
52
52
|
raise capo_redshift_data.errors.internal_server_exception.InternalServerException.from_aws_json_1_1(
|
|
53
|
-
data, message
|
|
53
|
+
data, message, response=response
|
|
54
54
|
)
|
|
55
55
|
case "ResourceNotFoundException":
|
|
56
56
|
raise capo_redshift_data.errors.resource_not_found_exception.ResourceNotFoundException.from_aws_json_1_1(
|
|
57
|
-
data, message
|
|
57
|
+
data, message, response=response
|
|
58
58
|
)
|
|
59
59
|
case "ValidationException":
|
|
60
60
|
raise capo_redshift_data.errors.validation_exception.ValidationException.from_aws_json_1_1(
|
|
61
|
-
data, message
|
|
61
|
+
data, message, response=response
|
|
62
62
|
)
|
|
63
63
|
case _:
|
|
64
64
|
raise UnknownServiceError(code=code, message=message, response=response)
|
|
@@ -34,23 +34,23 @@ def handle_error(response: zapros.Response) -> Never:
|
|
|
34
34
|
match code:
|
|
35
35
|
case "DatabaseConnectionException":
|
|
36
36
|
raise capo_redshift_data.errors.database_connection_exception.DatabaseConnectionException.from_aws_json_1_1(
|
|
37
|
-
data, message
|
|
37
|
+
data, message, response=response
|
|
38
38
|
)
|
|
39
39
|
case "InternalServerException":
|
|
40
40
|
raise capo_redshift_data.errors.internal_server_exception.InternalServerException.from_aws_json_1_1(
|
|
41
|
-
data, message
|
|
41
|
+
data, message, response=response
|
|
42
42
|
)
|
|
43
43
|
case "QueryTimeoutException":
|
|
44
44
|
raise capo_redshift_data.errors.query_timeout_exception.QueryTimeoutException.from_aws_json_1_1(
|
|
45
|
-
data, message
|
|
45
|
+
data, message, response=response
|
|
46
46
|
)
|
|
47
47
|
case "ResourceNotFoundException":
|
|
48
48
|
raise capo_redshift_data.errors.resource_not_found_exception.ResourceNotFoundException.from_aws_json_1_1(
|
|
49
|
-
data, message
|
|
49
|
+
data, message, response=response
|
|
50
50
|
)
|
|
51
51
|
case "ValidationException":
|
|
52
52
|
raise capo_redshift_data.errors.validation_exception.ValidationException.from_aws_json_1_1(
|
|
53
|
-
data, message
|
|
53
|
+
data, message, response=response
|
|
54
54
|
)
|
|
55
55
|
case _:
|
|
56
56
|
raise UnknownServiceError(code=code, message=message, response=response)
|
|
@@ -35,19 +35,19 @@ def handle_error(response: zapros.Response) -> Never:
|
|
|
35
35
|
match code:
|
|
36
36
|
case "ActiveWaitingRequestsExceededException":
|
|
37
37
|
raise capo_redshift_data.errors.active_waiting_requests_exceeded_exception.ActiveWaitingRequestsExceededException.from_aws_json_1_1(
|
|
38
|
-
data, message
|
|
38
|
+
data, message, response=response
|
|
39
39
|
)
|
|
40
40
|
case "InternalServerException":
|
|
41
41
|
raise capo_redshift_data.errors.internal_server_exception.InternalServerException.from_aws_json_1_1(
|
|
42
|
-
data, message
|
|
42
|
+
data, message, response=response
|
|
43
43
|
)
|
|
44
44
|
case "ResourceNotFoundException":
|
|
45
45
|
raise capo_redshift_data.errors.resource_not_found_exception.ResourceNotFoundException.from_aws_json_1_1(
|
|
46
|
-
data, message
|
|
46
|
+
data, message, response=response
|
|
47
47
|
)
|
|
48
48
|
case "ValidationException":
|
|
49
49
|
raise capo_redshift_data.errors.validation_exception.ValidationException.from_aws_json_1_1(
|
|
50
|
-
data, message
|
|
50
|
+
data, message, response=response
|
|
51
51
|
)
|
|
52
52
|
case _:
|
|
53
53
|
raise UnknownServiceError(code=code, message=message, response=response)
|
|
@@ -35,23 +35,23 @@ def handle_error(response: zapros.Response) -> Never:
|
|
|
35
35
|
match code:
|
|
36
36
|
case "DatabaseConnectionException":
|
|
37
37
|
raise capo_redshift_data.errors.database_connection_exception.DatabaseConnectionException.from_aws_json_1_1(
|
|
38
|
-
data, message
|
|
38
|
+
data, message, response=response
|
|
39
39
|
)
|
|
40
40
|
case "InternalServerException":
|
|
41
41
|
raise capo_redshift_data.errors.internal_server_exception.InternalServerException.from_aws_json_1_1(
|
|
42
|
-
data, message
|
|
42
|
+
data, message, response=response
|
|
43
43
|
)
|
|
44
44
|
case "QueryTimeoutException":
|
|
45
45
|
raise capo_redshift_data.errors.query_timeout_exception.QueryTimeoutException.from_aws_json_1_1(
|
|
46
|
-
data, message
|
|
46
|
+
data, message, response=response
|
|
47
47
|
)
|
|
48
48
|
case "ResourceNotFoundException":
|
|
49
49
|
raise capo_redshift_data.errors.resource_not_found_exception.ResourceNotFoundException.from_aws_json_1_1(
|
|
50
|
-
data, message
|
|
50
|
+
data, message, response=response
|
|
51
51
|
)
|
|
52
52
|
case "ValidationException":
|
|
53
53
|
raise capo_redshift_data.errors.validation_exception.ValidationException.from_aws_json_1_1(
|
|
54
|
-
data, message
|
|
54
|
+
data, message, response=response
|
|
55
55
|
)
|
|
56
56
|
case _:
|
|
57
57
|
raise UnknownServiceError(code=code, message=message, response=response)
|
|
@@ -37,27 +37,27 @@ def handle_error(response: zapros.Response) -> Never:
|
|
|
37
37
|
match code:
|
|
38
38
|
case "ActiveSessionsExceededException":
|
|
39
39
|
raise capo_redshift_data.errors.active_sessions_exceeded_exception.ActiveSessionsExceededException.from_aws_json_1_1(
|
|
40
|
-
data, message
|
|
40
|
+
data, message, response=response
|
|
41
41
|
)
|
|
42
42
|
case "ActiveStatementsExceededException":
|
|
43
43
|
raise capo_redshift_data.errors.active_statements_exceeded_exception.ActiveStatementsExceededException.from_aws_json_1_1(
|
|
44
|
-
data, message
|
|
44
|
+
data, message, response=response
|
|
45
45
|
)
|
|
46
46
|
case "ExecuteStatementException":
|
|
47
47
|
raise capo_redshift_data.errors.execute_statement_exception.ExecuteStatementException.from_aws_json_1_1(
|
|
48
|
-
data, message
|
|
48
|
+
data, message, response=response
|
|
49
49
|
)
|
|
50
50
|
case "InternalServerException":
|
|
51
51
|
raise capo_redshift_data.errors.internal_server_exception.InternalServerException.from_aws_json_1_1(
|
|
52
|
-
data, message
|
|
52
|
+
data, message, response=response
|
|
53
53
|
)
|
|
54
54
|
case "ResourceNotFoundException":
|
|
55
55
|
raise capo_redshift_data.errors.resource_not_found_exception.ResourceNotFoundException.from_aws_json_1_1(
|
|
56
|
-
data, message
|
|
56
|
+
data, message, response=response
|
|
57
57
|
)
|
|
58
58
|
case "ValidationException":
|
|
59
59
|
raise capo_redshift_data.errors.validation_exception.ValidationException.from_aws_json_1_1(
|
|
60
|
-
data, message
|
|
60
|
+
data, message, response=response
|
|
61
61
|
)
|
|
62
62
|
case _:
|
|
63
63
|
raise UnknownServiceError(code=code, message=message, response=response)
|
|
@@ -35,19 +35,19 @@ def handle_error(response: zapros.Response) -> Never:
|
|
|
35
35
|
match code:
|
|
36
36
|
case "ActiveWaitingRequestsExceededException":
|
|
37
37
|
raise capo_redshift_data.errors.active_waiting_requests_exceeded_exception.ActiveWaitingRequestsExceededException.from_aws_json_1_1(
|
|
38
|
-
data, message
|
|
38
|
+
data, message, response=response
|
|
39
39
|
)
|
|
40
40
|
case "InternalServerException":
|
|
41
41
|
raise capo_redshift_data.errors.internal_server_exception.InternalServerException.from_aws_json_1_1(
|
|
42
|
-
data, message
|
|
42
|
+
data, message, response=response
|
|
43
43
|
)
|
|
44
44
|
case "ResourceNotFoundException":
|
|
45
45
|
raise capo_redshift_data.errors.resource_not_found_exception.ResourceNotFoundException.from_aws_json_1_1(
|
|
46
|
-
data, message
|
|
46
|
+
data, message, response=response
|
|
47
47
|
)
|
|
48
48
|
case "ValidationException":
|
|
49
49
|
raise capo_redshift_data.errors.validation_exception.ValidationException.from_aws_json_1_1(
|
|
50
|
-
data, message
|
|
50
|
+
data, message, response=response
|
|
51
51
|
)
|
|
52
52
|
case _:
|
|
53
53
|
raise UnknownServiceError(code=code, message=message, response=response)
|
|
@@ -35,19 +35,19 @@ def handle_error(response: zapros.Response) -> Never:
|
|
|
35
35
|
match code:
|
|
36
36
|
case "ActiveWaitingRequestsExceededException":
|
|
37
37
|
raise capo_redshift_data.errors.active_waiting_requests_exceeded_exception.ActiveWaitingRequestsExceededException.from_aws_json_1_1(
|
|
38
|
-
data, message
|
|
38
|
+
data, message, response=response
|
|
39
39
|
)
|
|
40
40
|
case "InternalServerException":
|
|
41
41
|
raise capo_redshift_data.errors.internal_server_exception.InternalServerException.from_aws_json_1_1(
|
|
42
|
-
data, message
|
|
42
|
+
data, message, response=response
|
|
43
43
|
)
|
|
44
44
|
case "ResourceNotFoundException":
|
|
45
45
|
raise capo_redshift_data.errors.resource_not_found_exception.ResourceNotFoundException.from_aws_json_1_1(
|
|
46
|
-
data, message
|
|
46
|
+
data, message, response=response
|
|
47
47
|
)
|
|
48
48
|
case "ValidationException":
|
|
49
49
|
raise capo_redshift_data.errors.validation_exception.ValidationException.from_aws_json_1_1(
|
|
50
|
-
data, message
|
|
50
|
+
data, message, response=response
|
|
51
51
|
)
|
|
52
52
|
case _:
|
|
53
53
|
raise UnknownServiceError(code=code, message=message, response=response)
|
|
@@ -35,23 +35,23 @@ def handle_error(response: zapros.Response) -> Never:
|
|
|
35
35
|
match code:
|
|
36
36
|
case "DatabaseConnectionException":
|
|
37
37
|
raise capo_redshift_data.errors.database_connection_exception.DatabaseConnectionException.from_aws_json_1_1(
|
|
38
|
-
data, message
|
|
38
|
+
data, message, response=response
|
|
39
39
|
)
|
|
40
40
|
case "InternalServerException":
|
|
41
41
|
raise capo_redshift_data.errors.internal_server_exception.InternalServerException.from_aws_json_1_1(
|
|
42
|
-
data, message
|
|
42
|
+
data, message, response=response
|
|
43
43
|
)
|
|
44
44
|
case "QueryTimeoutException":
|
|
45
45
|
raise capo_redshift_data.errors.query_timeout_exception.QueryTimeoutException.from_aws_json_1_1(
|
|
46
|
-
data, message
|
|
46
|
+
data, message, response=response
|
|
47
47
|
)
|
|
48
48
|
case "ResourceNotFoundException":
|
|
49
49
|
raise capo_redshift_data.errors.resource_not_found_exception.ResourceNotFoundException.from_aws_json_1_1(
|
|
50
|
-
data, message
|
|
50
|
+
data, message, response=response
|
|
51
51
|
)
|
|
52
52
|
case "ValidationException":
|
|
53
53
|
raise capo_redshift_data.errors.validation_exception.ValidationException.from_aws_json_1_1(
|
|
54
|
-
data, message
|
|
54
|
+
data, message, response=response
|
|
55
55
|
)
|
|
56
56
|
case _:
|
|
57
57
|
raise UnknownServiceError(code=code, message=message, response=response)
|
|
@@ -35,23 +35,23 @@ def handle_error(response: zapros.Response) -> Never:
|
|
|
35
35
|
match code:
|
|
36
36
|
case "DatabaseConnectionException":
|
|
37
37
|
raise capo_redshift_data.errors.database_connection_exception.DatabaseConnectionException.from_aws_json_1_1(
|
|
38
|
-
data, message
|
|
38
|
+
data, message, response=response
|
|
39
39
|
)
|
|
40
40
|
case "InternalServerException":
|
|
41
41
|
raise capo_redshift_data.errors.internal_server_exception.InternalServerException.from_aws_json_1_1(
|
|
42
|
-
data, message
|
|
42
|
+
data, message, response=response
|
|
43
43
|
)
|
|
44
44
|
case "QueryTimeoutException":
|
|
45
45
|
raise capo_redshift_data.errors.query_timeout_exception.QueryTimeoutException.from_aws_json_1_1(
|
|
46
|
-
data, message
|
|
46
|
+
data, message, response=response
|
|
47
47
|
)
|
|
48
48
|
case "ResourceNotFoundException":
|
|
49
49
|
raise capo_redshift_data.errors.resource_not_found_exception.ResourceNotFoundException.from_aws_json_1_1(
|
|
50
|
-
data, message
|
|
50
|
+
data, message, response=response
|
|
51
51
|
)
|
|
52
52
|
case "ValidationException":
|
|
53
53
|
raise capo_redshift_data.errors.validation_exception.ValidationException.from_aws_json_1_1(
|
|
54
|
-
data, message
|
|
54
|
+
data, message, response=response
|
|
55
55
|
)
|
|
56
56
|
case _:
|
|
57
57
|
raise UnknownServiceError(code=code, message=message, response=response)
|
|
@@ -33,15 +33,15 @@ def handle_error(response: zapros.Response) -> Never:
|
|
|
33
33
|
match code:
|
|
34
34
|
case "InternalServerException":
|
|
35
35
|
raise capo_redshift_data.errors.internal_server_exception.InternalServerException.from_aws_json_1_1(
|
|
36
|
-
data, message
|
|
36
|
+
data, message, response=response
|
|
37
37
|
)
|
|
38
38
|
case "ResourceNotFoundException":
|
|
39
39
|
raise capo_redshift_data.errors.resource_not_found_exception.ResourceNotFoundException.from_aws_json_1_1(
|
|
40
|
-
data, message
|
|
40
|
+
data, message, response=response
|
|
41
41
|
)
|
|
42
42
|
case "ValidationException":
|
|
43
43
|
raise capo_redshift_data.errors.validation_exception.ValidationException.from_aws_json_1_1(
|
|
44
|
-
data, message
|
|
44
|
+
data, message, response=response
|
|
45
45
|
)
|
|
46
46
|
case _:
|
|
47
47
|
raise UnknownServiceError(code=code, message=message, response=response)
|
|
@@ -33,15 +33,15 @@ def handle_error(response: zapros.Response) -> Never:
|
|
|
33
33
|
match code:
|
|
34
34
|
case "InternalServerException":
|
|
35
35
|
raise capo_redshift_data.errors.internal_server_exception.InternalServerException.from_aws_json_1_1(
|
|
36
|
-
data, message
|
|
36
|
+
data, message, response=response
|
|
37
37
|
)
|
|
38
38
|
case "ResourceNotFoundException":
|
|
39
39
|
raise capo_redshift_data.errors.resource_not_found_exception.ResourceNotFoundException.from_aws_json_1_1(
|
|
40
|
-
data, message
|
|
40
|
+
data, message, response=response
|
|
41
41
|
)
|
|
42
42
|
case "ValidationException":
|
|
43
43
|
raise capo_redshift_data.errors.validation_exception.ValidationException.from_aws_json_1_1(
|
|
44
|
-
data, message
|
|
44
|
+
data, message, response=response
|
|
45
45
|
)
|
|
46
46
|
case _:
|
|
47
47
|
raise UnknownServiceError(code=code, message=message, response=response)
|
|
@@ -35,23 +35,23 @@ def handle_error(response: zapros.Response) -> Never:
|
|
|
35
35
|
match code:
|
|
36
36
|
case "DatabaseConnectionException":
|
|
37
37
|
raise capo_redshift_data.errors.database_connection_exception.DatabaseConnectionException.from_aws_json_1_1(
|
|
38
|
-
data, message
|
|
38
|
+
data, message, response=response
|
|
39
39
|
)
|
|
40
40
|
case "InternalServerException":
|
|
41
41
|
raise capo_redshift_data.errors.internal_server_exception.InternalServerException.from_aws_json_1_1(
|
|
42
|
-
data, message
|
|
42
|
+
data, message, response=response
|
|
43
43
|
)
|
|
44
44
|
case "QueryTimeoutException":
|
|
45
45
|
raise capo_redshift_data.errors.query_timeout_exception.QueryTimeoutException.from_aws_json_1_1(
|
|
46
|
-
data, message
|
|
46
|
+
data, message, response=response
|
|
47
47
|
)
|
|
48
48
|
case "ResourceNotFoundException":
|
|
49
49
|
raise capo_redshift_data.errors.resource_not_found_exception.ResourceNotFoundException.from_aws_json_1_1(
|
|
50
|
-
data, message
|
|
50
|
+
data, message, response=response
|
|
51
51
|
)
|
|
52
52
|
case "ValidationException":
|
|
53
53
|
raise capo_redshift_data.errors.validation_exception.ValidationException.from_aws_json_1_1(
|
|
54
|
-
data, message
|
|
54
|
+
data, message, response=response
|
|
55
55
|
)
|
|
56
56
|
case _:
|
|
57
57
|
raise UnknownServiceError(code=code, message=message, response=response)
|