Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-aiobotocore for openSUSE:Factory checked in at 2021-08-02 15:41:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-aiobotocore (Old) and /work/SRC/openSUSE:Factory/.python-aiobotocore.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-aiobotocore" Mon Aug 2 15:41:01 2021 rev:8 rq:908600 version:1.3.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-aiobotocore/python-aiobotocore.changes 2021-06-16 20:37:05.475350588 +0200 +++ /work/SRC/openSUSE:Factory/.python-aiobotocore.new.1899/python-aiobotocore.changes 2021-08-02 15:41:03.611172586 +0200 @@ -1,0 +2,9 @@ +Tue Jul 27 09:59:24 UTC 2021 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- Update to 1.3.3 + * fix AioJSONParser #872 +- from version 1.3.2 + * Bump to botocore 1.20.106 +- Update BuildRequires and Requires from setup.py + +------------------------------------------------------------------- Old: ---- aiobotocore-1.3.1.tar.gz New: ---- aiobotocore-1.3.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-aiobotocore.spec ++++++ --- /var/tmp/diff_new_pack.PbTF47/_old 2021-08-02 15:41:04.107171887 +0200 +++ /var/tmp/diff_new_pack.PbTF47/_new 2021-08-02 15:41:04.111171881 +0200 @@ -21,7 +21,7 @@ %define skip_python2 1 %endif Name: python-aiobotocore -Version: 1.3.1 +Version: 1.3.3 Release: 0 Summary: Async client for aws services License: Apache-2.0 @@ -35,15 +35,15 @@ # SECTION test requirements BuildRequires: %{python_module aiohttp >= 3.3.1} BuildRequires: %{python_module aioitertools >= 0.5.1} -BuildRequires: %{python_module botocore >= 1.20.49} +BuildRequires: %{python_module botocore >= 1.20.106} BuildRequires: %{python_module wrapt >= 1.10.10} # /SECTION Requires: python-aiohttp >= 3.3.1 Requires: python-aioitertools >= 0.5.1 -Requires: python-botocore >= 1.20.49 +Requires: python-botocore >= 1.20.106 Requires: python-wrapt >= 1.10.10 -Recommends: aws-cli >= 1.19.49 -Recommends: python-boto3 >= 1.17.49 +Recommends: aws-cli >= 1.19.106 +Recommends: python-boto3 >= 1.17.106 BuildArch: noarch %python_subpackages ++++++ aiobotocore-1.3.1.tar.gz -> aiobotocore-1.3.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiobotocore-1.3.1/CHANGES.rst new/aiobotocore-1.3.3/CHANGES.rst --- old/aiobotocore-1.3.1/CHANGES.rst 2021-06-12 02:02:14.000000000 +0200 +++ new/aiobotocore-1.3.3/CHANGES.rst 2021-07-13 06:47:37.000000000 +0200 @@ -1,9 +1,17 @@ Changes ------- +1.3.3 (2021-07-12) +^^^^^^^^^^^^^^^^^^ +* fix AioJSONParser #872 + +1.3.2 (2021-07-07) +^^^^^^^^^^^^^^^^^^ +* Bump to botocore 1.20.106 + 1.3.1 (2021-06-11) ^^^^^^^^^^^^^^^^^^ * TCPConnector: change deprecated ssl_context to ssl -* fix non awaited generate presigned url calls # 868 +* fix non awaited generate presigned url calls #868 1.3.0 (2021-04-09) ^^^^^^^^^^^^^^^^^^ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiobotocore-1.3.1/PKG-INFO new/aiobotocore-1.3.3/PKG-INFO --- old/aiobotocore-1.3.1/PKG-INFO 2021-06-12 02:02:15.752863600 +0200 +++ new/aiobotocore-1.3.3/PKG-INFO 2021-07-13 06:47:38.729363000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: aiobotocore -Version: 1.3.1 +Version: 1.3.3 Summary: Async client for aws services using botocore and aiohttp Home-page: https://github.com/aio-libs/aiobotocore Author: Nikolay Novik @@ -209,10 +209,18 @@ Changes ------- + 1.3.3 (2021-07-12) + ^^^^^^^^^^^^^^^^^^ + * fix AioJSONParser #872 + + 1.3.2 (2021-07-07) + ^^^^^^^^^^^^^^^^^^ + * Bump to botocore 1.20.106 + 1.3.1 (2021-06-11) ^^^^^^^^^^^^^^^^^^ * TCPConnector: change deprecated ssl_context to ssl - * fix non awaited generate presigned url calls # 868 + * fix non awaited generate presigned url calls #868 1.3.0 (2021-04-09) ^^^^^^^^^^^^^^^^^^ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiobotocore-1.3.1/aiobotocore/__init__.py new/aiobotocore-1.3.3/aiobotocore/__init__.py --- old/aiobotocore-1.3.1/aiobotocore/__init__.py 2021-06-12 02:02:14.000000000 +0200 +++ new/aiobotocore-1.3.3/aiobotocore/__init__.py 2021-07-13 06:47:37.000000000 +0200 @@ -1,4 +1,4 @@ from .session import get_session, AioSession __all__ = ['get_session', 'AioSession'] -__version__ = '1.3.1' +__version__ = '1.3.3' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiobotocore-1.3.1/aiobotocore/client.py new/aiobotocore-1.3.3/aiobotocore/client.py --- old/aiobotocore-1.3.1/aiobotocore/client.py 2021-06-12 02:02:14.000000000 +0200 +++ new/aiobotocore-1.3.3/aiobotocore/client.py 2021-07-13 06:47:37.000000000 +0200 @@ -43,6 +43,7 @@ self._register_endpoint_discovery( service_client, endpoint_url, client_config ) + self._register_lazy_block_unknown_fips_pseudo_regions(service_client) return service_client async def _create_client_class(self, service_name, service_model): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiobotocore-1.3.1/aiobotocore/endpoint.py new/aiobotocore-1.3.3/aiobotocore/endpoint.py --- old/aiobotocore-1.3.1/aiobotocore/endpoint.py 2021-06-12 02:02:14.000000000 +0200 +++ new/aiobotocore-1.3.3/aiobotocore/endpoint.py 2021-07-13 06:47:37.000000000 +0200 @@ -2,7 +2,9 @@ import asyncio import io import pathlib +import os import ssl +import sys import aiohttp.http_exceptions from aiohttp.client import URL from botocore.endpoint import EndpointCreator, Endpoint, DEFAULT_TIMEOUT, \ @@ -177,16 +179,41 @@ protocol = operation_model.metadata['protocol'] parser = self._response_parser_factory.create_parser(protocol) - parsed_response = parser.parse( - response_dict, operation_model.output_shape) + + if asyncio.iscoroutinefunction(parser.parse): + parsed_response = await parser.parse( + response_dict, operation_model.output_shape) + else: + parsed_response = parser.parse( + response_dict, operation_model.output_shape) + if http_response.status_code >= 300: - self._add_modeled_error_fields( + await self._add_modeled_error_fields( response_dict, parsed_response, operation_model, parser, ) history_recorder.record('PARSED_RESPONSE', parsed_response) return (http_response, parsed_response), None + async def _add_modeled_error_fields( + self, response_dict, parsed_response, + operation_model, parser, + ): + error_code = parsed_response.get("Error", {}).get("Code") + if error_code is None: + return + service_model = operation_model.service_model + error_shape = service_model.shape_for_error_code(error_code) + if error_shape is None: + return + + if asyncio.iscoroutinefunction(parser.parse): + modeled_parse = await parser.parse(response_dict, error_shape) + else: + modeled_parse = parser.parse(response_dict, error_shape) + # TODO: avoid naming conflicts with ResponseMetadata and Error + parsed_response.update(modeled_parse) + # NOTE: The only line changed here changing time.sleep to asyncio.sleep async def _needs_retry(self, attempts, operation_model, request_dict, response=None, caught_exception=None): @@ -305,6 +332,14 @@ ssl_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH, cafile=str(verify)) + if ssl_context: + # Enable logging of TLS session keys via defacto standard environment variable # noqa: E501 + # 'SSLKEYLOGFILE', if the feature is available (Python 3.8+). Skip empty values. # noqa: E501 + if hasattr(ssl_context, 'keylog_filename'): + keylogfile = os.environ.get('SSLKEYLOGFILE') + if keylogfile and not sys.flags.ignore_environment: + ssl_context.keylog_filename = keylogfile + # TODO: add support for proxies_config connector = aiohttp.TCPConnector( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiobotocore-1.3.1/aiobotocore/eventstream.py new/aiobotocore-1.3.3/aiobotocore/eventstream.py --- old/aiobotocore-1.3.1/aiobotocore/eventstream.py 2021-06-12 02:02:14.000000000 +0200 +++ new/aiobotocore-1.3.3/aiobotocore/eventstream.py 2021-07-13 06:47:37.000000000 +0200 @@ -1,4 +1,4 @@ -from botocore.eventstream import EventStream, EventStreamBuffer +from botocore.eventstream import EventStream, EventStreamBuffer, NoInitialResponseError class AioEventStream(EventStream): @@ -20,3 +20,15 @@ parsed_event = self._parse_event(event) if parsed_event: yield parsed_event + + async def get_initial_response(self): + try: + async for event in self._event_generator: + event_type = event.headers.get(':event-type') + if event_type == 'initial-response': + return event + + break + except StopIteration: + pass + raise NoInitialResponseError() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiobotocore-1.3.1/aiobotocore/parsers.py new/aiobotocore-1.3.3/aiobotocore/parsers.py --- old/aiobotocore-1.3.1/aiobotocore/parsers.py 2021-06-12 02:02:14.000000000 +0200 +++ new/aiobotocore-1.3.3/aiobotocore/parsers.py 2021-07-13 06:47:37.000000000 +0200 @@ -1,5 +1,6 @@ from botocore.parsers import ResponseParserFactory, RestXMLParser, \ - RestJSONParser, JSONParser, QueryParser, EC2QueryParser + RestJSONParser, JSONParser, QueryParser, EC2QueryParser, \ + NoInitialResponseError, ResponseParserError, LOG, lowercase_dict from .eventstream import AioEventStream @@ -25,11 +26,68 @@ class AioJSONParser(JSONParser): + async def _do_parse(self, response, shape): + parsed = {} + if shape is not None: + event_name = shape.event_stream_name + if event_name: + parsed = await self._handle_event_stream(response, shape, event_name) + else: + parsed = self._handle_json_body(response['body'], shape) + self._inject_response_metadata(parsed, response['headers']) + return parsed + def _create_event_stream(self, response, shape): parser = self._event_stream_parser name = response['context'].get('operation_name') return AioEventStream(response['body'], shape, parser, name) + async def _handle_event_stream(self, response, shape, event_name): + event_stream_shape = shape.members[event_name] + event_stream = self._create_event_stream(response, event_stream_shape) + try: + event = await event_stream.get_initial_response() + except NoInitialResponseError: + error_msg = 'First event was not of type initial-response' + raise ResponseParserError(error_msg) + parsed = self._handle_json_body(event.payload, shape) + parsed[event_name] = event_stream + return parsed + + # this is actually from ResponseParser however for now JSONParser is the + # only class that needs this async + async def parse(self, response, shape): + LOG.debug('Response headers: %s', response['headers']) + LOG.debug('Response body:\n%s', response['body']) + if response['status_code'] >= 301: + if self._is_generic_error_response(response): + parsed = self._do_generic_error_parse(response) + elif self._is_modeled_error_shape(shape): + parsed = self._do_modeled_error_parse(response, shape) + # We don't want to decorate the modeled fields with metadata + return parsed + else: + parsed = self._do_error_parse(response, shape) + else: + parsed = await self._do_parse(response, shape) + + # We don't want to decorate event stream responses with metadata + if shape and shape.serialization.get('eventstream'): + return parsed + + # Add ResponseMetadata if it doesn't exist and inject the HTTP + # status code and headers from the response. + if isinstance(parsed, dict): + response_metadata = parsed.get('ResponseMetadata', {}) + response_metadata['HTTPStatusCode'] = response['status_code'] + # Ensure that the http header keys are all lower cased. Older + # versions of urllib3 (< 1.11) would unintentionally do this for us + # (see urllib3#633). We need to do this conversion manually now. + headers = response['headers'] + response_metadata['HTTPHeaders'] = lowercase_dict(headers) + parsed['ResponseMetadata'] = response_metadata + return parsed + class AioRestJSONParser(RestJSONParser): def _create_event_stream(self, response, shape): @@ -51,3 +109,7 @@ def create_parser(self, protocol_name): parser_cls = PROTOCOL_PARSERS[protocol_name] return parser_cls(**self._defaults) + + +def create_parser(protocol): + return AioResponseParserFactory().create_parser(protocol) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiobotocore-1.3.1/aiobotocore/response.py new/aiobotocore-1.3.3/aiobotocore/response.py --- old/aiobotocore-1.3.1/aiobotocore/response.py 2021-06-12 02:02:14.000000000 +0200 +++ new/aiobotocore-1.3.3/aiobotocore/response.py 2021-07-13 06:47:37.000000000 +0200 @@ -2,6 +2,7 @@ import wrapt from botocore.exceptions import IncompleteReadError, ReadTimeoutError +from aiobotocore import parsers class AioReadTimeoutError(ReadTimeoutError, asyncio.TimeoutError): @@ -109,3 +110,30 @@ raise IncompleteReadError( actual_bytes=self._self_amount_read, expected_bytes=int(self._self_content_length)) + + +async def get_response(operation_model, http_response): + protocol = operation_model.metadata['protocol'] + response_dict = { + 'headers': http_response.headers, + 'status_code': http_response.status_code, + } + # TODO: Unfortunately, we have to have error logic here. + # If it looks like an error, in the streaming response case we + # need to actually grab the contents. + if response_dict['status_code'] >= 300: + response_dict['body'] = http_response.content + elif operation_model.has_streaming_output: + response_dict['body'] = StreamingBody( + http_response.raw, response_dict['headers'].get('content-length')) + else: + response_dict['body'] = http_response.content + + parser = parsers.create_parser(protocol) + if asyncio.iscoroutinefunction(parser.parse): + parsed = await parser.parse( + response_dict, operation_model.output_shape) + else: + parsed = parser.parse( + response_dict, operation_model.output_shape) + return http_response, parsed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiobotocore-1.3.1/aiobotocore.egg-info/PKG-INFO new/aiobotocore-1.3.3/aiobotocore.egg-info/PKG-INFO --- old/aiobotocore-1.3.1/aiobotocore.egg-info/PKG-INFO 2021-06-12 02:02:15.000000000 +0200 +++ new/aiobotocore-1.3.3/aiobotocore.egg-info/PKG-INFO 2021-07-13 06:47:38.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: aiobotocore -Version: 1.3.1 +Version: 1.3.3 Summary: Async client for aws services using botocore and aiohttp Home-page: https://github.com/aio-libs/aiobotocore Author: Nikolay Novik @@ -209,10 +209,18 @@ Changes ------- + 1.3.3 (2021-07-12) + ^^^^^^^^^^^^^^^^^^ + * fix AioJSONParser #872 + + 1.3.2 (2021-07-07) + ^^^^^^^^^^^^^^^^^^ + * Bump to botocore 1.20.106 + 1.3.1 (2021-06-11) ^^^^^^^^^^^^^^^^^^ * TCPConnector: change deprecated ssl_context to ssl - * fix non awaited generate presigned url calls # 868 + * fix non awaited generate presigned url calls #868 1.3.0 (2021-04-09) ^^^^^^^^^^^^^^^^^^ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiobotocore-1.3.1/aiobotocore.egg-info/requires.txt new/aiobotocore-1.3.3/aiobotocore.egg-info/requires.txt --- old/aiobotocore-1.3.1/aiobotocore.egg-info/requires.txt 2021-06-12 02:02:15.000000000 +0200 +++ new/aiobotocore-1.3.3/aiobotocore.egg-info/requires.txt 2021-07-13 06:47:38.000000000 +0200 @@ -1,10 +1,10 @@ -botocore<1.20.50,>=1.20.49 +botocore<1.20.107,>=1.20.106 aiohttp>=3.3.1 wrapt>=1.10.10 aioitertools>=0.5.1 [awscli] -awscli==1.19.49 +awscli<1.19.107,>=1.19.106 [boto3] -boto3==1.17.49 +boto3<1.17.107,>=1.17.106 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aiobotocore-1.3.1/setup.py new/aiobotocore-1.3.3/setup.py --- old/aiobotocore-1.3.1/setup.py 2021-06-12 02:02:14.000000000 +0200 +++ new/aiobotocore-1.3.3/setup.py 2021-07-13 06:47:37.000000000 +0200 @@ -7,7 +7,7 @@ # NOTE: When updating botocore make sure to update awscli/boto3 versions below install_requires = [ # pegged to also match items in `extras_require` - 'botocore>=1.20.49,<1.20.50', + 'botocore>=1.20.106,<1.20.107', 'aiohttp>=3.3.1', 'wrapt>=1.10.10', 'aioitertools>=0.5.1', @@ -19,8 +19,8 @@ extras_require = { - 'awscli': ['awscli==1.19.49'], - 'boto3': ['boto3==1.17.49'], + 'awscli': ['awscli>=1.19.106,<1.19.107'], + 'boto3': ['boto3>=1.17.106,<1.17.107'], }