diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-04 12:23:44 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-04 12:23:44 +0300 |
commit | d0b36241bc1aab45c3239df3bd6f11df9bb5b1d4 (patch) | |
tree | c8f57bf2d3f0f64336b545192229c1c7d073c50b /contrib | |
parent | cc561ce981af0e033a5110b0762583481bed1e74 (diff) | |
download | ydb-d0b36241bc1aab45c3239df3bd6f11df9bb5b1d4.tar.gz |
intermediate changes
ref:6091b03c96df91885c21cb2b0c83051812a2af3d
Diffstat (limited to 'contrib')
11 files changed, 66 insertions, 42 deletions
diff --git a/contrib/python/boto3/py3/.dist-info/METADATA b/contrib/python/boto3/py3/.dist-info/METADATA index 25b2eff8cd..06331cc45d 100644 --- a/contrib/python/boto3/py3/.dist-info/METADATA +++ b/contrib/python/boto3/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: boto3 -Version: 1.23.4 +Version: 1.23.5 Summary: The AWS SDK for Python Home-page: https://github.com/boto/boto3 Author: Amazon Web Services @@ -22,7 +22,7 @@ Classifier: Programming Language :: Python :: 3.10 Requires-Python: >= 3.6 License-File: LICENSE License-File: NOTICE -Requires-Dist: botocore (<1.27.0,>=1.26.4) +Requires-Dist: botocore (<1.27.0,>=1.26.5) Requires-Dist: jmespath (<2.0.0,>=0.7.1) Requires-Dist: s3transfer (<0.6.0,>=0.5.0) Provides-Extra: crt diff --git a/contrib/python/boto3/py3/boto3/__init__.py b/contrib/python/boto3/py3/boto3/__init__.py index aec97326e5..7b864d58d1 100644 --- a/contrib/python/boto3/py3/boto3/__init__.py +++ b/contrib/python/boto3/py3/boto3/__init__.py @@ -17,7 +17,7 @@ from boto3.compat import _warn_deprecated_python from boto3.session import Session __author__ = 'Amazon Web Services' -__version__ = '1.23.4' +__version__ = '1.23.5' # The default Boto3 session; autoloaded when needed. diff --git a/contrib/python/botocore/py3/.dist-info/METADATA b/contrib/python/botocore/py3/.dist-info/METADATA index 9b63e59f1b..572f81b972 100644 --- a/contrib/python/botocore/py3/.dist-info/METADATA +++ b/contrib/python/botocore/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: botocore -Version: 1.26.4 +Version: 1.26.5 Summary: Low-level, data-driven core of boto 3. Home-page: https://github.com/boto/botocore Author: Amazon Web Services diff --git a/contrib/python/botocore/py3/botocore/__init__.py b/contrib/python/botocore/py3/botocore/__init__.py index 88917c4732..a177c8eeb9 100644 --- a/contrib/python/botocore/py3/botocore/__init__.py +++ b/contrib/python/botocore/py3/botocore/__init__.py @@ -16,7 +16,7 @@ import logging import os import re -__version__ = '1.26.4' +__version__ = '1.26.5' class NullHandler(logging.Handler): diff --git a/contrib/python/botocore/py3/botocore/auth.py b/contrib/python/botocore/py3/botocore/auth.py index a0ca43159f..f38713e34d 100644 --- a/contrib/python/botocore/py3/botocore/auth.py +++ b/contrib/python/botocore/py3/botocore/auth.py @@ -19,6 +19,7 @@ import hmac import json import logging import time +from collections.abc import Mapping from email.utils import formatdate from hashlib import sha1, sha256 from operator import itemgetter @@ -245,10 +246,11 @@ class SigV4Auth(BaseSigner): def _canonical_query_string_params(self, params): # [(key, value), (key2, value2)] key_val_pairs = [] - for key in params: - value = str(params[key]) + if isinstance(params, Mapping): + params = params.items() + for key, value in params: key_val_pairs.append( - (quote(key, safe='-_.~'), quote(value, safe='-_.~')) + (quote(key, safe='-_.~'), quote(str(value), safe='-_.~')) ) sorted_key_vals = [] # Sort by the URI-encoded key names, and in the case of diff --git a/contrib/python/botocore/py3/botocore/awsrequest.py b/contrib/python/botocore/py3/botocore/awsrequest.py index e9696a0b1c..8cbd83995c 100644 --- a/contrib/python/botocore/py3/botocore/awsrequest.py +++ b/contrib/python/botocore/py3/botocore/awsrequest.py @@ -13,6 +13,7 @@ # language governing permissions and limitations under the License. import functools import logging +from collections.abc import Mapping import urllib3.util from urllib3.connection import HTTPConnection, VerifiedHTTPSConnection @@ -367,7 +368,11 @@ class AWSRequestPreparer: if original.params: url_parts = urlparse(url) delim = '&' if url_parts.query else '?' - params = urlencode(list(original.params.items()), doseq=True) + if isinstance(original.params, Mapping): + params_to_encode = list(original.params.items()) + else: + params_to_encode = original.params + params = urlencode(params_to_encode, doseq=True) url = delim.join((url, params)) return url diff --git a/contrib/python/botocore/py3/botocore/data/comprehend/2017-11-27/service-2.json b/contrib/python/botocore/py3/botocore/data/comprehend/2017-11-27/service-2.json index 5f57959deb..2a3207f0ef 100644 --- a/contrib/python/botocore/py3/botocore/data/comprehend/2017-11-27/service-2.json +++ b/contrib/python/botocore/py3/botocore/data/comprehend/2017-11-27/service-2.json @@ -167,7 +167,7 @@ {"shape":"TooManyTagsException"}, {"shape":"InternalServerException"} ], - "documentation":"<p>Creates a model-specific endpoint for synchronous inference for a previously trained custom model </p>" + "documentation":"<p>Creates a model-specific endpoint for synchronous inference for a previously trained custom model For information about endpoints, see <a href=\"https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html\">Managing endpoints</a>.</p>" }, "CreateEntityRecognizer":{ "name":"CreateEntityRecognizer", @@ -222,7 +222,7 @@ {"shape":"TooManyRequestsException"}, {"shape":"InternalServerException"} ], - "documentation":"<p>Deletes a model-specific endpoint for a previously-trained custom model. All endpoints must be deleted in order for the model to be deleted.</p>" + "documentation":"<p>Deletes a model-specific endpoint for a previously-trained custom model. All endpoints must be deleted in order for the model to be deleted. For information about endpoints, see <a href=\"https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html\">Managing endpoints</a>.</p>" }, "DeleteEntityRecognizer":{ "name":"DeleteEntityRecognizer", @@ -319,7 +319,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"InternalServerException"} ], - "documentation":"<p>Gets the properties associated with a specific endpoint. Use this operation to get the status of an endpoint.</p>" + "documentation":"<p>Gets the properties associated with a specific endpoint. Use this operation to get the status of an endpoint. For information about endpoints, see <a href=\"https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html\">Managing endpoints</a>.</p>" }, "DescribeEntitiesDetectionJob":{ "name":"DescribeEntitiesDetectionJob", @@ -657,7 +657,7 @@ {"shape":"TooManyRequestsException"}, {"shape":"InternalServerException"} ], - "documentation":"<p>Gets a list of all existing endpoints that you've created.</p>" + "documentation":"<p>Gets a list of all existing endpoints that you've created. For information about endpoints, see <a href=\"https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html\">Managing endpoints</a>.</p>" }, "ListEntitiesDetectionJobs":{ "name":"ListEntitiesDetectionJobs", @@ -1077,7 +1077,7 @@ {"shape":"JobNotFoundException"}, {"shape":"InternalServerException"} ], - "documentation":"<p>Stops a sentiment detection job in progress.</p> <p>If the job state is <code>IN_PROGRESS</code> the job is marked for termination and put into the <code>STOP_REQUESTED</code> state. If the job completes before it can be stopped, it is put into the <code>COMPLETED</code> state; otherwise the job is be stopped and put into the <code>STOPPED</code> state.</p> <p>If the job is in the <code>COMPLETED</code> or <code>FAILED</code> state when you call the <code>StopDominantLanguageDetectionJob</code> operation, the operation returns a 400 Internal Request Exception. </p> <p>When a job is stopped, any documents already processed are written to the output location.</p>" + "documentation":"<p>Stops a sentiment detection job in progress.</p> <p>If the job state is <code>IN_PROGRESS</code>, the job is marked for termination and put into the <code>STOP_REQUESTED</code> state. If the job completes before it can be stopped, it is put into the <code>COMPLETED</code> state; otherwise the job is be stopped and put into the <code>STOPPED</code> state.</p> <p>If the job is in the <code>COMPLETED</code> or <code>FAILED</code> state when you call the <code>StopDominantLanguageDetectionJob</code> operation, the operation returns a 400 Internal Request Exception. </p> <p>When a job is stopped, any documents already processed are written to the output location.</p>" }, "StopTargetedSentimentDetectionJob":{ "name":"StopTargetedSentimentDetectionJob", @@ -1092,7 +1092,7 @@ {"shape":"JobNotFoundException"}, {"shape":"InternalServerException"} ], - "documentation":"<p>Stops a targeted sentiment detection job in progress.</p> <p>If the job state is <code>IN_PROGRESS</code> the job is marked for termination and put into the <code>STOP_REQUESTED</code> state. If the job completes before it can be stopped, it is put into the <code>COMPLETED</code> state; otherwise the job is be stopped and put into the <code>STOPPED</code> state.</p> <p>If the job is in the <code>COMPLETED</code> or <code>FAILED</code> state when you call the <code>StopDominantLanguageDetectionJob</code> operation, the operation returns a 400 Internal Request Exception. </p> <p>When a job is stopped, any documents already processed are written to the output location.</p>" + "documentation":"<p>Stops a targeted sentiment detection job in progress.</p> <p>If the job state is <code>IN_PROGRESS</code>, the job is marked for termination and put into the <code>STOP_REQUESTED</code> state. If the job completes before it can be stopped, it is put into the <code>COMPLETED</code> state; otherwise the job is be stopped and put into the <code>STOPPED</code> state.</p> <p>If the job is in the <code>COMPLETED</code> or <code>FAILED</code> state when you call the <code>StopDominantLanguageDetectionJob</code> operation, the operation returns a 400 Internal Request Exception. </p> <p>When a job is stopped, any documents already processed are written to the output location.</p>" }, "StopTrainingDocumentClassifier":{ "name":"StopTrainingDocumentClassifier", @@ -1177,7 +1177,7 @@ {"shape":"ResourceUnavailableException"}, {"shape":"InternalServerException"} ], - "documentation":"<p>Updates information about the specified endpoint.</p>" + "documentation":"<p>Updates information about the specified endpoint. For information about endpoints, see <a href=\"https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html\">Managing endpoints</a>.</p>" } }, "shapes":{ @@ -1347,7 +1347,7 @@ "members":{ "TextList":{ "shape":"CustomerInputStringList", - "documentation":"<p>A list containing the text of the input documents. The list can contain a maximum of 25 documents. Each document must contain fewer that 5,000 bytes of UTF-8 encoded characters.</p>" + "documentation":"<p>A list containing the text of the input documents. The list can contain a maximum of 25 documents. Each document must contain fewer than 5,000 bytes of UTF-8 encoded characters.</p>" }, "LanguageCode":{ "shape":"LanguageCode", @@ -1579,7 +1579,7 @@ }, "EndpointArn":{ "shape":"DocumentClassifierEndpointArn", - "documentation":"<p>The Amazon Resource Number (ARN) of the endpoint.</p>" + "documentation":"<p>The Amazon Resource Number (ARN) of the endpoint. For information about endpoints, see <a href=\"https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html\">Managing endpoints</a>.</p>" } } }, @@ -1649,7 +1649,7 @@ }, "LanguageCode":{ "shape":"LanguageCode", - "documentation":"<p>The language of the input documents.</p>" + "documentation":"<p>The language of the input documents. Currently, English is the only valid language.</p>" } } }, @@ -1852,6 +1852,7 @@ "CustomerInputStringList":{ "type":"list", "member":{"shape":"CustomerInputString"}, + "min":1, "sensitive":true }, "DeleteDocumentClassifierRequest":{ @@ -2208,7 +2209,7 @@ }, "EndpointArn":{ "shape":"EntityRecognizerEndpointArn", - "documentation":"<p>The Amazon Resource Name of an endpoint that is associated with a custom entity recognition model. Provide an endpoint if you want to detect entities by using your own custom model instead of the default model that is used by Amazon Comprehend.</p> <p>If you specify an endpoint, Amazon Comprehend uses the language of your custom model, and it ignores any language code that you provide in your request.</p>" + "documentation":"<p>The Amazon Resource Name of an endpoint that is associated with a custom entity recognition model. Provide an endpoint if you want to detect entities by using your own custom model instead of the default model that is used by Amazon Comprehend.</p> <p>If you specify an endpoint, Amazon Comprehend uses the language of your custom model, and it ignores any language code that you provide in your request.</p> <p>For information about endpoints, see <a href=\"https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html\">Managing endpoints</a>.</p>" } } }, @@ -2262,7 +2263,7 @@ }, "LanguageCode":{ "shape":"LanguageCode", - "documentation":"<p>The language of the input documents.</p>" + "documentation":"<p>The language of the input documents. Currently, English is the only valid language.</p>" } } }, @@ -2422,7 +2423,7 @@ }, "VpcConfig":{ "shape":"VpcConfig", - "documentation":"<p> Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your document classification job. For more information, see <a href=\"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html\">Amazon VPC</a>. </p>" + "documentation":"<p> Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your document classification job. For more information, see <a href=\"https://docs.aws.amazon.com/vppc/latest/userguide/what-is-amazon-vpc.html\">Amazon VPC</a>. </p>" } }, "documentation":"<p>Provides information about a document classification job.</p>" @@ -2498,7 +2499,7 @@ "documentation":"<p>A list of augmented manifest files that provide training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth.</p> <p>This parameter is required if you set <code>DataFormat</code> to <code>AUGMENTED_MANIFEST</code>.</p>" } }, - "documentation":"<p>The input properties for training a document classifier. </p> <p>For more information on how the input file is formatted, see <a>how-document-classification-training-data</a>. </p>" + "documentation":"<p>The input properties for training a document classifier. </p> <p>For more information on how the input file is formatted, see <a>prep-classifier-data</a>. </p>" }, "DocumentClassifierMode":{ "type":"string", @@ -2578,7 +2579,7 @@ }, "VpcConfig":{ "shape":"VpcConfig", - "documentation":"<p> Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier. For more information, see <a href=\"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html\">Amazon VPC</a>. </p>" + "documentation":"<p> Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier. For more information, see <a href=\"https://docs.aws.amazon.com/vppc/latest/userguide/what-is-amazon-vpc.html\">Amazon VPC</a>. </p>" }, "Mode":{ "shape":"DocumentClassifierMode", @@ -2853,7 +2854,7 @@ "documentation":"<p>Data access role ARN to use in case the new model is encrypted with a customer KMS key.</p>" } }, - "documentation":"<p>Specifies information about the specified endpoint.</p>" + "documentation":"<p>Specifies information about the specified endpoint. For information about endpoints, see <a href=\"https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html\">Managing endpoints</a>.</p>" }, "EndpointPropertiesList":{ "type":"list", @@ -4418,7 +4419,21 @@ "AWS_SECRET_KEY", "IP_ADDRESS", "MAC_ADDRESS", - "ALL" + "ALL", + "LICENSE_PLATE", + "VEHICLE_IDENTIFICATION_NUMBER", + "UK_NATIONAL_INSURANCE_NUMBER", + "CA_SOCIAL_INSURANCE_NUMBER", + "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER", + "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER", + "IN_PERMANENT_ACCOUNT_NUMBER", + "IN_NREGA", + "INTERNATIONAL_BANK_ACCOUNT_NUMBER", + "SWIFT_CODE", + "UK_NATIONAL_HEALTH_SERVICE_NUMBER", + "CA_HEALTH_NUMBER", + "IN_AADHAAR", + "IN_VOTER_NUMBER" ] }, "PiiOutputDataConfig":{ @@ -5023,7 +5038,7 @@ }, "LanguageCode":{ "shape":"LanguageCode", - "documentation":"<p>The language of the input documents.</p>" + "documentation":"<p>The language of the input documents. Currently, English is the only valid language.</p>" }, "ClientRequestToken":{ "shape":"ClientRequestTokenString", @@ -5142,7 +5157,7 @@ }, "LanguageCode":{ "shape":"LanguageCode", - "documentation":"<p>The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.</p>" + "documentation":"<p>The language of the input documents. Currently, English is the only valid language.</p>" }, "ClientRequestToken":{ "shape":"ClientRequestTokenString", diff --git a/contrib/python/botocore/py3/botocore/data/logs/2014-03-28/service-2.json b/contrib/python/botocore/py3/botocore/data/logs/2014-03-28/service-2.json index 0f80e7d740..724a788fbf 100644 --- a/contrib/python/botocore/py3/botocore/data/logs/2014-03-28/service-2.json +++ b/contrib/python/botocore/py3/botocore/data/logs/2014-03-28/service-2.json @@ -58,7 +58,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"ResourceAlreadyExistsException"} ], - "documentation":"<p>Creates an export task, which allows you to efficiently export data from a log group to an Amazon S3 bucket. When you perform a <code>CreateExportTask</code> operation, you must use credentials that have permission to write to the S3 bucket that you specify as the destination.</p> <p>This is an asynchronous call. If all the required information is provided, this operation initiates an export task and responds with the ID of the task. After the task has started, you can use <a href=\"https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeExportTasks.html\">DescribeExportTasks</a> to get the status of the export task. Each account can only have one active (<code>RUNNING</code> or <code>PENDING</code>) export task at a time. To cancel an export task, use <a href=\"https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CancelExportTask.html\">CancelExportTask</a>.</p> <p>You can export logs from multiple log groups or multiple time ranges to the same S3 bucket. To separate out log data for each export task, you can specify a prefix to be used as the Amazon S3 key prefix for all exported objects.</p> <p>Exporting to S3 buckets that are encrypted with AES-256 is supported. Exporting to S3 buckets encrypted with SSE-KMS is not supported. </p>" + "documentation":"<p>Creates an export task, which allows you to efficiently export data from a log group to an Amazon S3 bucket. When you perform a <code>CreateExportTask</code> operation, you must use credentials that have permission to write to the S3 bucket that you specify as the destination.</p> <important> <p>Exporting log data to Amazon S3 buckets that are encrypted by KMS is not supported. Exporting log data to Amazon S3 buckets that have S3 Object Lock enabled with a retention period is not supported.</p> <p>Exporting to S3 buckets that are encrypted with AES-256 is supported. </p> </important> <p>This is an asynchronous call. If all the required information is provided, this operation initiates an export task and responds with the ID of the task. After the task has started, you can use <a href=\"https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeExportTasks.html\">DescribeExportTasks</a> to get the status of the export task. Each account can only have one active (<code>RUNNING</code> or <code>PENDING</code>) export task at a time. To cancel an export task, use <a href=\"https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CancelExportTask.html\">CancelExportTask</a>.</p> <p>You can export logs from multiple log groups or multiple time ranges to the same S3 bucket. To separate out log data for each export task, you can specify a prefix to be used as the Amazon S3 key prefix for all exported objects.</p> <note> <p>Time-based sorting on chunks of log data inside an exported file is not guaranteed. You can sort the exported log fild data by using Linux utilities.</p> </note>" }, "CreateLogGroup":{ "name":"CreateLogGroup", @@ -703,7 +703,7 @@ }, "to":{ "shape":"Timestamp", - "documentation":"<p>The end time of the range for the request, expreswatchlogsdocused as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not exported.</p>" + "documentation":"<p>The end time of the range for the request, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not exported.</p>" }, "destination":{ "shape":"ExportDestinationBucket", @@ -769,7 +769,7 @@ }, "Days":{ "type":"integer", - "documentation":"<p>The number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.</p> <p>To set a log group to never have log events expire, use <a href=\"https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html\">DeleteRetentionPolicy</a>. </p>" + "documentation":"<p>The number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 2192, 2557, 2922, 3288, and 3653.</p> <p>To set a log group to never have log events expire, use <a href=\"https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html\">DeleteRetentionPolicy</a>. </p>" }, "DefaultValue":{"type":"double"}, "DeleteDestinationRequest":{ @@ -967,7 +967,7 @@ "members":{ "logGroups":{ "shape":"LogGroups", - "documentation":"<p>The log groups.</p> <p>If the <code>retentionInDays</code> value if not included for a log group, then that log group is set to have its events never expire.</p>" + "documentation":"<p>The log groups.</p> <p>If the <code>retentionInDays</code> value is not included for a log group, then that log group is set to have its events never expire.</p>" }, "nextToken":{"shape":"NextToken"} } @@ -1910,7 +1910,7 @@ "type":"structure", "members":{ }, - "documentation":"<p>Multiple requests to update the same resource were in conflict.</p>", + "documentation":"<p>Multiple concurrent requests to update the same resource were in conflict.</p>", "exception":true }, "OrderBy":{ diff --git a/contrib/python/botocore/py3/botocore/handlers.py b/contrib/python/botocore/py3/botocore/handlers.py index b5b8661922..1337d6a323 100644 --- a/contrib/python/botocore/py3/botocore/handlers.py +++ b/contrib/python/botocore/py3/botocore/handlers.py @@ -23,6 +23,7 @@ import os import re import uuid import warnings +from io import BytesIO import botocore import botocore.auth @@ -35,7 +36,6 @@ from botocore.compat import ( get_md5, json, quote, - six, unquote, unquote_str, urlsplit, @@ -226,9 +226,9 @@ def decode_console_output(parsed, **kwargs): # We're using 'replace' for errors because it is # possible that console output contains non string # chars we can't utf-8 decode. - value = base64.b64decode(six.b(parsed['Output'])).decode( - 'utf-8', 'replace' - ) + value = base64.b64decode( + bytes(parsed['Output'], 'latin-1') + ).decode('utf-8', 'replace') parsed['Output'] = value except (ValueError, TypeError, AttributeError): logger.debug('Error decoding base64', exc_info=True) @@ -685,7 +685,7 @@ def add_glacier_checksums(params, **kwargs): # so we can use the util functions to calculate the # checksums which assume file like objects. Note that # we're not actually changing the body in the request_dict. - body = six.BytesIO(body) + body = BytesIO(body) starting_position = body.tell() if 'x-amz-content-sha256' not in headers: headers['x-amz-content-sha256'] = utils.calculate_sha256( @@ -861,9 +861,9 @@ def _decode_list_object(top_level_keys, nested_keys, parsed, context): def convert_body_to_file_like_object(params, **kwargs): if 'Body' in params: if isinstance(params['Body'], str): - params['Body'] = six.BytesIO(ensure_bytes(params['Body'])) + params['Body'] = BytesIO(ensure_bytes(params['Body'])) elif isinstance(params['Body'], bytes): - params['Body'] = six.BytesIO(params['Body']) + params['Body'] = BytesIO(params['Body']) def _add_parameter_aliases(handler_list): diff --git a/contrib/python/botocore/py3/botocore/retries/throttling.py b/contrib/python/botocore/py3/botocore/retries/throttling.py index 8ad49ebe59..34ab417299 100644 --- a/contrib/python/botocore/py3/botocore/retries/throttling.py +++ b/contrib/python/botocore/py3/botocore/retries/throttling.py @@ -21,7 +21,8 @@ class CubicCalculator: self._last_fail = start_time def _calculate_zero_point(self): - k = ((self._w_max * (1 - self._beta)) / self._scale_constant) ** (1 / 3.0) + scaled_value = (self._w_max * (1 - self._beta)) / self._scale_constant + k = scaled_value ** (1 / 3.0) return k def success_received(self, timestamp): diff --git a/contrib/python/botocore/py3/botocore/utils.py b/contrib/python/botocore/py3/botocore/utils.py index 5f5493eeb4..1b7dc94341 100644 --- a/contrib/python/botocore/py3/botocore/utils.py +++ b/contrib/python/botocore/py3/botocore/utils.py @@ -657,7 +657,8 @@ class InstanceMetadataFetcher(IMDSFetcher): refresh_interval = self._config.get( "ec2_credential_refresh_window", 60 * 10 ) - refresh_interval_with_jitter = refresh_interval + random.randint(120, 600) + jitter = random.randint(120, 600) # Between 2 to 10 minutes + refresh_interval_with_jitter = refresh_interval + jitter current_time = datetime.datetime.utcnow() refresh_offset = datetime.timedelta( seconds=refresh_interval_with_jitter |