+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.12.3-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-aiobotocore-2.12.3-2.fc37.x86_64/usr/lib/python3.10/site-packages + /usr/bin/pytest -ra -m 'not network' -m moto --deselect tests/test_lambda.py::test_run_lambda ============================= test session starts ============================== platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0 cachedir: /tmp/pytest_aiobotocore_cache rootdir: /home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3 configfile: pyproject.toml plugins: asyncio-0.23.6 asyncio: mode=auto collected 207 items / 23 deselected / 184 selected tests/boto_tests/test_credentials.py .................................. [ 18%] tests/boto_tests/test_signers.py . [ 19%] tests/boto_tests/test_utils.py ........ [ 23%] tests/python3.8/boto_tests/test_credentials.py ............... [ 31%] tests/python3.8/boto_tests/test_signers.py ........ [ 35%] tests/python3.8/boto_tests/test_tokens.py .................... [ 46%] tests/python3.8/boto_tests/test_utils.py ........................ [ 59%] tests/test_basic_s3.py FF.EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEExx [ 72%] tests/test_batch.py F [ 73%] tests/test_config.py ...... [ 76%] tests/test_dynamodb.py EEFEEFFF [ 79%] tests/test_ec2.py F [ 80%] tests/test_eventstreams.py .. [ 81%] tests/test_monitor.py F [ 82%] tests/test_patches.py .F [ 83%] tests/test_response.py ............... [ 91%] tests/test_session.py ... [ 92%] tests/test_sns.py EEEEEEFF [ 95%] tests/test_sqs.py EEEE [ 97%] tests/test_stubber.py .. [ 98%] tests/test_version.py . [ 99%] tests/test_waiter.py F [100%] ==================================== ERRORS ==================================== ________________ ERROR at setup of test_can_get_bucket_location ________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 40783) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 40783) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 40783) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 40783) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:40783 ssl:default [Connect call failed ('127.0.0.1', 40783)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f36958985e0>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f36965e7ac0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f3695898670> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:40783/jvgriakcqosbpwutmndfhyezxl" aiobotocore/httpsession.py:268: EndpointConnectionError ______________ ERROR at teardown of test_can_get_bucket_location _______________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 40783) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 40783) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 40783) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 40783) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:40783 ssl:default [Connect call failed ('127.0.0.1', 40783)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:40783/jvgriakcqosbpwutmndfhyezxl?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError _____________ ERROR at setup of test_can_delete_urlencoded_object ______________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 37947) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 37947) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 37947) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 37947) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:37947 ssl:default [Connect call failed ('127.0.0.1', 37947)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f36960c2c20>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3696b76710> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36960c2cb0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:37947/sizdvfhjltqxbourpcweymagkn" aiobotocore/httpsession.py:268: EndpointConnectionError ____________ ERROR at teardown of test_can_delete_urlencoded_object ____________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 37947) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 37947) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 37947) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 37947) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:37947 ssl:default [Connect call failed ('127.0.0.1', 37947)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:37947/sizdvfhjltqxbourpcweymagkn?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError _____________________ ERROR at setup of test_can_paginate ______________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 46199) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 46199) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 46199) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 46199) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:46199 ssl:default [Connect call failed ('127.0.0.1', 46199)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f36958fdc60>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3696b76680> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36958fdcf0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:46199/hwenzlxdkosyjqauvrictmbfgp" aiobotocore/httpsession.py:268: EndpointConnectionError ____________________ ERROR at teardown of test_can_paginate ____________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 46199) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 46199) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 46199) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 46199) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:46199 ssl:default [Connect call failed ('127.0.0.1', 46199)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:46199/hwenzlxdkosyjqauvrictmbfgp?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError ______________ ERROR at setup of test_can_paginate_with_page_size ______________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 44659) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 44659) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 44659) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 44659) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:44659 ssl:default [Connect call failed ('127.0.0.1', 44659)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f36958fe3b0>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f369589bac0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36958fe4d0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:44659/ugmovxyarphjfbnezlidwcqskt" aiobotocore/httpsession.py:268: EndpointConnectionError ____________ ERROR at teardown of test_can_paginate_with_page_size _____________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 44659) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 44659) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 44659) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 44659) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:44659 ssl:default [Connect call failed ('127.0.0.1', 44659)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:44659/ugmovxyarphjfbnezlidwcqskt?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError __________________ ERROR at setup of test_can_search_paginate __________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 55757) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 55757) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 55757) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 55757) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:55757 ssl:default [Connect call failed ('127.0.0.1', 55757)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f36958fd750>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f36958983a0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36958fd120> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:55757/apsndofxubvewgitklcqjzmhyr" aiobotocore/httpsession.py:268: EndpointConnectionError ________________ ERROR at teardown of test_can_search_paginate _________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 55757) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 55757) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 55757) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 55757) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:55757 ssl:default [Connect call failed ('127.0.0.1', 55757)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:55757/apsndofxubvewgitklcqjzmhyr?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError _________________ ERROR at setup of test_can_paginate_iterator _________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 59043) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 59043) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 59043) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 59043) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:59043 ssl:default [Connect call failed ('127.0.0.1', 59043)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f3694358940>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f36960c2dd0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36943589d0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:59043/vdcwiultkpbomenrhyqjsfagxz" aiobotocore/httpsession.py:268: EndpointConnectionError _______________ ERROR at teardown of test_can_paginate_iterator ________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 59043) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 59043) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 59043) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 59043) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:59043 ssl:default [Connect call failed ('127.0.0.1', 59043)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:59043/vdcwiultkpbomenrhyqjsfagxz?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError ___________________ ERROR at setup of test_result_key_iters ____________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 36019) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 36019) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 36019) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 36019) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:36019 ssl:default [Connect call failed ('127.0.0.1', 36019)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f3694359750>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f36960c2b00> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f3694359990> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:36019/yfwtxrnbeumidzhglskoqvpcja" aiobotocore/httpsession.py:268: EndpointConnectionError __________________ ERROR at teardown of test_result_key_iters __________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 36019) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 36019) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 36019) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 36019) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:36019 ssl:default [Connect call failed ('127.0.0.1', 36019)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:36019/yfwtxrnbeumidzhglskoqvpcja?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError ________________ ERROR at setup of test_can_get_and_put_object _________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 35871) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 35871) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 35871) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 35871) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:35871 ssl:default [Connect call failed ('127.0.0.1', 35871)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f36958ff880>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f36958fc280> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36958ff7f0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:35871/ikrxtvlufpenodcwgzmjqhsaby" aiobotocore/httpsession.py:268: EndpointConnectionError _______________ ERROR at teardown of test_can_get_and_put_object _______________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 35871) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 35871) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 35871) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 35871) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:35871 ssl:default [Connect call failed ('127.0.0.1', 35871)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:35871/ikrxtvlufpenodcwgzmjqhsaby?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError ____________________ ERROR at setup of test_adaptive_retry _____________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 49603) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 49603) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 49603) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 49603) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:49603 ssl:default [Connect call failed ('127.0.0.1', 49603)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f369684dea0>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f36958fc5e0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f369684df30> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:131: in _send_request raise exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:49603/iykgafmtxocwpsqebdnhrvlzju" aiobotocore/httpsession.py:268: EndpointConnectionError ___________________ ERROR at teardown of test_adaptive_retry ___________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 49603) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 49603) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 49603) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 49603) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:49603 ssl:default [Connect call failed ('127.0.0.1', 49603)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:131: in _send_request raise exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:49603/iykgafmtxocwpsqebdnhrvlzju?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError _______________ ERROR at setup of test_get_object_stream_wrapper _______________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 47107) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 47107) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 47107) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 47107) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:47107 ssl:default [Connect call failed ('127.0.0.1', 47107)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f3696b74940>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3694358820> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f3696b74310> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:47107/fqxoltbenhzjmipcakgwyurvds" aiobotocore/httpsession.py:268: EndpointConnectionError _____________ ERROR at teardown of test_get_object_stream_wrapper ______________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 47107) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 47107) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 47107) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 47107) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:47107 ssl:default [Connect call failed ('127.0.0.1', 47107)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:47107/fqxoltbenhzjmipcakgwyurvds?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError _______________ ERROR at setup of test_get_object_stream_context _______________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 58191) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 58191) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 58191) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 58191) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:58191 ssl:default [Connect call failed ('127.0.0.1', 58191)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f369684f880>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f369435ba30> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f369684f7f0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:58191/cqfehvgidmwokapujltxybzrns" aiobotocore/httpsession.py:268: EndpointConnectionError _____________ ERROR at teardown of test_get_object_stream_context ______________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 58191) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 58191) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 58191) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 58191) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:58191 ssl:default [Connect call failed ('127.0.0.1', 58191)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:58191/cqfehvgidmwokapujltxybzrns?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError __________________ ERROR at setup of test_paginate_max_items ___________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 48751) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 48751) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 48751) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 48751) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:48751 ssl:default [Connect call failed ('127.0.0.1', 48751)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f3696b77130>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3694358c10> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f3696b76950> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:48751/jsgiuxtkmfaphwdrvoqceynzlb" aiobotocore/httpsession.py:268: EndpointConnectionError _________________ ERROR at teardown of test_paginate_max_items _________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 48751) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 48751) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 48751) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 48751) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:48751 ssl:default [Connect call failed ('127.0.0.1', 48751)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:48751/jsgiuxtkmfaphwdrvoqceynzlb?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError ____________ ERROR at setup of test_paginate_within_page_boundaries ____________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 39349) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 39349) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 39349) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 39349) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:39349 ssl:default [Connect call failed ('127.0.0.1', 39349)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f36958fcaf0>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3696b76b00> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36958fc9d0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:39349/nuwsbheltvxocgymzadipkqfjr" aiobotocore/httpsession.py:268: EndpointConnectionError __________ ERROR at teardown of test_paginate_within_page_boundaries ___________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 39349) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 39349) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 39349) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 39349) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:39349 ssl:default [Connect call failed ('127.0.0.1', 39349)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:39349/nuwsbheltvxocgymzadipkqfjr?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError _______________ ERROR at setup of test_non_normalized_key_paths ________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 58755) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 58755) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 58755) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 58755) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:58755 ssl:default [Connect call failed ('127.0.0.1', 58755)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f36958fe200>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f369684c4c0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36958fdf30> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:58755/ailtqpkgsdfvxebwcuzjmnrhoy" aiobotocore/httpsession.py:268: EndpointConnectionError ______________ ERROR at teardown of test_non_normalized_key_paths ______________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 58755) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 58755) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 58755) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 58755) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:58755 ssl:default [Connect call failed ('127.0.0.1', 58755)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:58755/ailtqpkgsdfvxebwcuzjmnrhoy?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError _________________ ERROR at setup of test_copy_with_quoted_char _________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 52503) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 52503) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 52503) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 52503) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:52503 ssl:default [Connect call failed ('127.0.0.1', 52503)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f3695fca200>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3696b740d0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f3695fcb010> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:52503/ujxtzbicvnhgpmefdwsalyokrq" aiobotocore/httpsession.py:268: EndpointConnectionError _______________ ERROR at teardown of test_copy_with_quoted_char ________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 52503) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 52503) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 52503) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 52503) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:52503 ssl:default [Connect call failed ('127.0.0.1', 52503)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:52503/ujxtzbicvnhgpmefdwsalyokrq?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError ________________ ERROR at setup of test_copy_with_query_string _________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 58955) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 58955) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 58955) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 58955) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:58955 ssl:default [Connect call failed ('127.0.0.1', 58955)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f36958ff130>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3696b764d0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36958feb90> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:58955/tbdghcaifspunxjkwerlqmyvzo" aiobotocore/httpsession.py:268: EndpointConnectionError _______________ ERROR at teardown of test_copy_with_query_string _______________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 58955) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 58955) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 58955) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 58955) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:58955 ssl:default [Connect call failed ('127.0.0.1', 58955)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:58955/tbdghcaifspunxjkwerlqmyvzo?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError ________________ ERROR at setup of test_can_copy_with_dict_form ________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 47843) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 47843) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 47843) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 47843) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:47843 ssl:default [Connect call failed ('127.0.0.1', 47843)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f36958fd000>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3696b77880> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36958fe830> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:47843/oxkiqfvwyzumjahdcrneglbpts" aiobotocore/httpsession.py:268: EndpointConnectionError ______________ ERROR at teardown of test_can_copy_with_dict_form _______________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 47843) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 47843) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 47843) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 47843) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:47843 ssl:default [Connect call failed ('127.0.0.1', 47843)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:47843/oxkiqfvwyzumjahdcrneglbpts?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError _________ ERROR at setup of test_can_copy_with_dict_form_with_version __________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 58689) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 58689) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 58689) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 58689) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:58689 ssl:default [Connect call failed ('127.0.0.1', 58689)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f369684e0e0>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3695fcae60> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f369684e5f0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:58689/upchxsakdmzvrgwyqjbleiontf" aiobotocore/httpsession.py:268: EndpointConnectionError ________ ERROR at teardown of test_can_copy_with_dict_form_with_version ________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 58689) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 58689) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 58689) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 58689) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:58689 ssl:default [Connect call failed ('127.0.0.1', 58689)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:58689/upchxsakdmzvrgwyqjbleiontf?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError _________________ ERROR at setup of test_copy_with_s3_metadata _________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 37279) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 37279) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 37279) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 37279) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:37279 ssl:default [Connect call failed ('127.0.0.1', 37279)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f3695b7c280>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3695fc8940> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f3695b7c310> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:37279/sapekxndblotjgvuirzmyhqcwf" aiobotocore/httpsession.py:268: EndpointConnectionError _______________ ERROR at teardown of test_copy_with_s3_metadata ________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 37279) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 37279) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 37279) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 37279) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:37279 ssl:default [Connect call failed ('127.0.0.1', 37279)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:37279/sapekxndblotjgvuirzmyhqcwf?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError ________________ ERROR at setup of test_head_object_keys[s3v4] _________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 36505) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 36505) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 36505) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 36505) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:36505 ssl:default [Connect call failed ('127.0.0.1', 36505)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f3695b7c940>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f36965e6cb0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f3695b7c4c0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:36505/hqzaneogipxjdtvrkblycfuswm" aiobotocore/httpsession.py:268: EndpointConnectionError _______________ ERROR at teardown of test_head_object_keys[s3v4] _______________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 36505) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 36505) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 36505) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 36505) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:36505 ssl:default [Connect call failed ('127.0.0.1', 36505)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:36505/hqzaneogipxjdtvrkblycfuswm?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError _____________________ ERROR at setup of test_get_item[v4] ______________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 49559) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 49559) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 49559) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 49559) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:49559 ssl:default [Connect call failed ('127.0.0.1', 49559)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_table': ._f at 0x7f36957c0b80>} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f369684dea0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36957c0c10> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:384: in table_name name = await create_table() tests/conftest.py:442: in _f response = await dynamodb_client.create_table(**table_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:49559/" aiobotocore/httpsession.py:268: EndpointConnectionError ____________________ ERROR at teardown of test_get_item[v4] ____________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 49559) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 49559) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 49559) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 49559) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:49559 ssl:default [Connect call failed ('127.0.0.1', 49559)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:452: in create_table await delete_table(dynamodb_client, _table_name) tests/conftest.py:456: in delete_table response = await dynamodb_client.delete_table(TableName=table_name) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:49559/" aiobotocore/httpsession.py:268: EndpointConnectionError _________________ ERROR at setup of test_batch_write_scan[v4] __________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 54513) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 54513) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 54513) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 54513) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:54513 ssl:default [Connect call failed ('127.0.0.1', 54513)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_table': ._f at 0x7f3696312290>} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3696b931c0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f3696312cb0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:384: in table_name name = await create_table() tests/conftest.py:442: in _f response = await dynamodb_client.create_table(**table_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:54513/" aiobotocore/httpsession.py:268: EndpointConnectionError ________________ ERROR at teardown of test_batch_write_scan[v4] ________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 54513) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 54513) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 54513) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 54513) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:54513 ssl:default [Connect call failed ('127.0.0.1', 54513)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:452: in create_table await delete_table(dynamodb_client, _table_name) tests/conftest.py:456: in delete_table response = await dynamodb_client.delete_table(TableName=table_name) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:54513/" aiobotocore/httpsession.py:268: EndpointConnectionError ___________________ ERROR at setup of test_topic_attributes ____________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 44885) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 44885) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 44885) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 44885) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:44885 ssl:default [Connect call failed ('127.0.0.1', 44885)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: region = 'us-east-1' create_topic = ._f at 0x7f3696818310> sns_client = event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> @pytest.fixture def topic_arn(region, create_topic, sns_client, event_loop): > arn = event_loop.run_until_complete(create_topic()) tests/conftest.py:534: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() tests/conftest.py:549: in _f response = await sns_client.create_topic(Name=random_name()) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:44885/" aiobotocore/httpsession.py:268: EndpointConnectionError __________________ ERROR at teardown of test_topic_attributes __________________ def fin(): > event_loop.run_until_complete(delete_topic(sns_client, _topic_arn)) tests/conftest.py:555: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() tests/conftest.py:539: in delete_topic response = await sns_client.delete_topic(TopicArn=topic_arn) aiobotocore/client.py:361: in _make_api_call request_dict = await self._convert_to_request_dict( aiobotocore/client.py:439: in _convert_to_request_dict request_dict = self._serializer.serialize_to_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = parameters = {'TopicArn': None} operation_model = OperationModel(name=DeleteTopic) def serialize_to_request(self, parameters, operation_model): input_shape = operation_model.input_shape if input_shape is not None: report = self._param_validator.validate( parameters, operation_model.input_shape ) if report.has_errors(): > raise ParamValidationError(report=report.generate_report()) E botocore.exceptions.ParamValidationError: Parameter validation failed: E Invalid type for parameter TopicArn, value: None, type: , valid types: /usr/lib/python3.10/site-packages/botocore/validate.py:381: ParamValidationError _________________ ERROR at setup of test_creating_subscription _________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 46183) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 46183) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 46183) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 46183) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:46183 ssl:default [Connect call failed ('127.0.0.1', 46183)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: region = 'us-east-1' create_topic = ._f at 0x7f369681b640> sns_client = event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> @pytest.fixture def topic_arn(region, create_topic, sns_client, event_loop): > arn = event_loop.run_until_complete(create_topic()) tests/conftest.py:534: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() tests/conftest.py:549: in _f response = await sns_client.create_topic(Name=random_name()) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:46183/" aiobotocore/httpsession.py:268: EndpointConnectionError _______________ ERROR at teardown of test_creating_subscription ________________ def fin(): > event_loop.run_until_complete(delete_topic(sns_client, _topic_arn)) tests/conftest.py:555: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() tests/conftest.py:539: in delete_topic response = await sns_client.delete_topic(TopicArn=topic_arn) aiobotocore/client.py:361: in _make_api_call request_dict = await self._convert_to_request_dict( aiobotocore/client.py:439: in _convert_to_request_dict request_dict = self._serializer.serialize_to_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = parameters = {'TopicArn': None} operation_model = OperationModel(name=DeleteTopic) def serialize_to_request(self, parameters, operation_model): input_shape = operation_model.input_shape if input_shape is not None: report = self._param_validator.validate( parameters, operation_model.input_shape ) if report.has_errors(): > raise ParamValidationError(report=report.generate_report()) E botocore.exceptions.ParamValidationError: Parameter validation failed: E Invalid type for parameter TopicArn, value: None, type: , valid types: /usr/lib/python3.10/site-packages/botocore/validate.py:381: ParamValidationError ____________________ ERROR at setup of test_publish_to_http ____________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 47497) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 47497) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 47497) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 47497) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:47497 ssl:default [Connect call failed ('127.0.0.1', 47497)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: region = 'us-east-1' create_topic = ._f at 0x7f369681bbe0> sns_client = event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> @pytest.fixture def topic_arn(region, create_topic, sns_client, event_loop): > arn = event_loop.run_until_complete(create_topic()) tests/conftest.py:534: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() tests/conftest.py:549: in _f response = await sns_client.create_topic(Name=random_name()) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:47497/" aiobotocore/httpsession.py:268: EndpointConnectionError __________________ ERROR at teardown of test_publish_to_http ___________________ def fin(): > event_loop.run_until_complete(delete_topic(sns_client, _topic_arn)) tests/conftest.py:555: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() tests/conftest.py:539: in delete_topic response = await sns_client.delete_topic(TopicArn=topic_arn) aiobotocore/client.py:361: in _make_api_call request_dict = await self._convert_to_request_dict( aiobotocore/client.py:439: in _convert_to_request_dict request_dict = self._serializer.serialize_to_request( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = parameters = {'TopicArn': None} operation_model = OperationModel(name=DeleteTopic) def serialize_to_request(self, parameters, operation_model): input_shape = operation_model.input_shape if input_shape is not None: report = self._param_validator.validate( parameters, operation_model.input_shape ) if report.has_errors(): > raise ParamValidationError(report=report.generate_report()) E botocore.exceptions.ParamValidationError: Parameter validation failed: E Invalid type for parameter TopicArn, value: None, type: , valid types: /usr/lib/python3.10/site-packages/botocore/validate.py:381: ParamValidationError ______________________ ERROR at setup of test_list_queues ______________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 44541) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 44541) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 44541) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 44541) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:44541 ssl:default [Connect call failed ('127.0.0.1', 44541)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'sqs_client': } unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f36959191b0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f3695919120> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:563: in sqs_queue_url response = await sqs_client.create_queue(QueueName=random_name()) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:44541/" aiobotocore/httpsession.py:268: EndpointConnectionError ____________________ ERROR at setup of test_get_queue_name _____________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 57641) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 57641) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 57641) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 57641) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:57641 ssl:default [Connect call failed ('127.0.0.1', 57641)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'sqs_client': } unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3696b93be0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36968e65f0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:563: in sqs_queue_url response = await sqs_client.create_queue(QueueName=random_name()) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:57641/" aiobotocore/httpsession.py:268: EndpointConnectionError _________________ ERROR at setup of test_put_pull_delete_test __________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 57891) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 57891) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 57891) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 57891) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:57891 ssl:default [Connect call failed ('127.0.0.1', 57891)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'sqs_client': } unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f369681b010> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36968e6f80> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:563: in sqs_queue_url response = await sqs_client.create_queue(QueueName=random_name()) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:57891/" aiobotocore/httpsession.py:268: EndpointConnectionError _____________________ ERROR at setup of test_put_pull_wait _____________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 59953) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 59953) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 59953) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 59953) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:59953 ssl:default [Connect call failed ('127.0.0.1', 59953)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'sqs_client': } unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3696b93880> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f36968e6ef0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:563: in sqs_queue_url response = await sqs_client.create_queue(QueueName=random_name()) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:59953/" aiobotocore/httpsession.py:268: EndpointConnectionError =================================== FAILURES =================================== ____________________________ test_can_make_request _____________________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 39083) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 39083) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 39083) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 39083) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:39083 ssl:default [Connect call failed ('127.0.0.1', 39083)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: s3_client = @pytest.mark.moto @pytest.mark.asyncio async def test_can_make_request(s3_client): # Basic smoke test to ensure we can talk to s3. > result = await s3_client.list_buckets() tests/test_basic_s3.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:39083/" aiobotocore/httpsession.py:268: EndpointConnectionError ____________________ test_can_make_request_no_verify[False] ____________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 58127) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 58127) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 58127) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 58127) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:58127 ssl:default [Connect call failed ('127.0.0.1', 58127)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: s3_client = @pytest.mark.moto @pytest.mark.parametrize('s3_verify', [False]) @pytest.mark.asyncio async def test_can_make_request_no_verify(s3_client): # Basic smoke test to ensure we can talk to s3. > result = await s3_client.list_buckets() tests/test_basic_s3.py:37: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:58127/" aiobotocore/httpsession.py:268: EndpointConnectionError __________________________________ test_batch __________________________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 56355) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 56355) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 56355) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 56355) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:56355 ssl:default [Connect call failed ('127.0.0.1', 56355)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: batch_client = @pytest.mark.moto @pytest.mark.asyncio async def test_batch(batch_client): > job_queues = await batch_client.describe_job_queues() tests/test_batch.py:7: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:56355/v1/describejobqueues" aiobotocore/httpsession.py:268: EndpointConnectionError ____________________________ test_create_waiter[v4] ____________________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 43035) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 43035) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 43035) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 43035) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:43035 ssl:default [Connect call failed ('127.0.0.1', 43035)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: dynamodb_client = dynamodb_table_def = {'AttributeDefinitions': [{'AttributeName': 'testKey', 'AttributeType': 'N'}], 'KeySchema': [{'AttributeName': 'testKe...nedThroughput': {'ReadCapacityUnits': 1, 'WriteCapacityUnits': 1}, 'TableName': 'ca37a87a-a7ec-49de-b48b-f643408cef2a'} @pytest.mark.moto @pytest.mark.parametrize('signature_version', ['v4']) @pytest.mark.asyncio async def test_create_waiter(dynamodb_client, dynamodb_table_def): table_name = dynamodb_table_def['TableName'] > response = await dynamodb_client.create_table(**dynamodb_table_def) tests/test_dynamodb.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:43035/" aiobotocore/httpsession.py:268: EndpointConnectionError ____________________________ test_delete_table[v4] _____________________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 45827) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 45827) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 45827) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 45827) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:45827 ssl:default [Connect call failed ('127.0.0.1', 45827)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: dynamodb_client = dynamodb_table_def = {'AttributeDefinitions': [{'AttributeName': 'testKey', 'AttributeType': 'N'}], 'KeySchema': [{'AttributeName': 'testKe...nedThroughput': {'ReadCapacityUnits': 1, 'WriteCapacityUnits': 1}, 'TableName': '290d4d58-f870-48e5-a0da-998b486cba6d'} @pytest.mark.moto @pytest.mark.parametrize('signature_version', ['v4']) @pytest.mark.asyncio async def test_delete_table(dynamodb_client, dynamodb_table_def): table_name = dynamodb_table_def['TableName'] > await dynamodb_client.create_table(**dynamodb_table_def) tests/test_dynamodb.py:98: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:45827/" aiobotocore/httpsession.py:268: EndpointConnectionError _____________________ test_waiter_table_exists_failure[v4] _____________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 50647) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 50647) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 50647) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 50647) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:50647 ssl:default [Connect call failed ('127.0.0.1', 50647)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: dynamodb_client = @pytest.mark.moto @pytest.mark.parametrize('signature_version', ['v4']) @pytest.mark.asyncio async def test_waiter_table_exists_failure(dynamodb_client): waiter = dynamodb_client.get_waiter('table_exists') with pytest.raises( WaiterError, match='Waiter TableExists failed: Max attempts exceeded' ): > await waiter.wait( TableName='unknown', WaiterConfig=dict(Delay=1, MaxAttempts=1) ) tests/test_dynamodb.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ aiobotocore/waiter.py:49: in wait return await AIOWaiter.wait(self, **kwargs) aiobotocore/waiter.py:94: in wait response = await self._operation_method(**kwargs) aiobotocore/waiter.py:77: in __call__ return await self._client_method(**kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:50647/" aiobotocore/httpsession.py:268: EndpointConnectionError _________________________ test_waiter_table_exists[v4] _________________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 48703) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 48703) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 48703) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 48703) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:48703 ssl:default [Connect call failed ('127.0.0.1', 48703)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> dynamodb_client = dynamodb_table_def = {'AttributeDefinitions': [{'AttributeName': 'testKey', 'AttributeType': 'N'}], 'KeySchema': [{'AttributeName': 'testKe...nedThroughput': {'ReadCapacityUnits': 1, 'WriteCapacityUnits': 1}, 'TableName': '57aa3d64-c056-45ff-b731-f6c264aa925b'} @pytest.mark.moto @pytest.mark.parametrize('signature_version', ['v4']) @pytest.mark.asyncio async def test_waiter_table_exists( event_loop, dynamodb_client, dynamodb_table_def ): table_name = dynamodb_table_def['TableName'] async def _create_table(): await asyncio.sleep(2) await dynamodb_client.create_table(**dynamodb_table_def) task = event_loop.create_task(_create_table()) assert not task.done() waiter = dynamodb_client.get_waiter('table_exists') > await waiter.wait( TableName=table_name, WaiterConfig=dict(Delay=1, MaxAttempts=5) ) tests/test_dynamodb.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ aiobotocore/waiter.py:49: in wait return await AIOWaiter.wait(self, **kwargs) aiobotocore/waiter.py:94: in wait response = await self._operation_method(**kwargs) aiobotocore/waiter.py:77: in __call__ return await self._client_method(**kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:48703/" aiobotocore/httpsession.py:268: EndpointConnectionError ______________________________ test_ec2_snapshot _______________________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 48393) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 48393) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 48393) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 48393) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:48393 ssl:default [Connect call failed ('127.0.0.1', 48393)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: ec2_client = @pytest.mark.moto @pytest.mark.asyncio async def test_ec2_snapshot(ec2_client): # TODO: this needs to somehow validate the presigned url sent because moto is not > volume_response = await ec2_client.create_volume( AvailabilityZone="us-east-1", Size=10 ) tests/test_ec2.py:8: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:48393/" aiobotocore/httpsession.py:268: EndpointConnectionError ________________________ test_monitor_response_received ________________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 45367) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 45367) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 45367) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 45367) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:45367 ssl:default [Connect call failed ('127.0.0.1', 45367)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: session = s3_client = @pytest.mark.moto @pytest.mark.asyncio async def test_monitor_response_received(session: AioSession, s3_client): # Basic smoke test to ensure we can talk to s3. handler_kwargs = {} def handler(**kwargs): nonlocal handler_kwargs handler_kwargs = kwargs s3_client.meta.events.register('response-received.s3.ListBuckets', handler) > result = await s3_client.list_buckets() tests/test_monitor.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:45367/" aiobotocore/httpsession.py:268: EndpointConnectionError _________________________________ test_patches _________________________________ @pytest.mark.moto def test_patches(): print(f"Botocore version: {botocore.__version__}") success = True for obj, digests in _API_DIGESTS.items(): try: source = getsource(obj) except TypeError: obj = obj.fget source = getsource(obj) digest = hashlib.sha1(source.encode('utf-8')).hexdigest() if digest not in digests: print( "Digest of {}:{} not found in: {}".format( obj.__qualname__, digest, digests ) ) success = False > assert success E assert False tests/test_patches.py:727: AssertionError ----------------------------- Captured stdout call ----------------------------- Botocore version: 1.34.84 Digest of ClientCreator._register_s3_events:4ab15da7cb36fa795f64154581a970b0966fdf50 not found in: {'5659a5312caeb3ea97d663d837d6d201f08824f2'} Digest of RequestSigner.sign:2f1f45a6fcfcca1be2c5e292c9e1b80453e7fa57 not found in: {'8b6ca96055e5546a6572ad790d5af74a23bc0b52'} Digest of RequestSigner.get_auth_instance:b78756b9d4f7a5bce9630195d761bab557677225 not found in: {'dcd41ea686506dcf056d8252ccf73acd501efd2b'} _____________________ test_get_missing_endpoint_attributes _____________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 43045) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 43045) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 43045) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 43045) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:43045 ssl:default [Connect call failed ('127.0.0.1', 43045)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: sns_client = @pytest.mark.moto @pytest.mark.asyncio async def test_get_missing_endpoint_attributes(sns_client): with pytest.raises(botocore.exceptions.ClientError): > await sns_client.get_endpoint_attributes(EndpointArn="arn1") tests/test_sns.py:97: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:43045/" aiobotocore/httpsession.py:268: EndpointConnectionError __________________________ test_platform_applications __________________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 38995) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 38995) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 38995) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 38995) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:38995 ssl:default [Connect call failed ('127.0.0.1', 38995)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: sns_client = @pytest.mark.moto @pytest.mark.asyncio async def test_platform_applications(sns_client): > await sns_client.create_platform_application( Name="app1", Platform="APNS", Attributes={}, ) tests/test_sns.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:38995/" aiobotocore/httpsession.py:268: EndpointConnectionError ___________________________________ test_sqs ___________________________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 52043) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 52043) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 52043) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 52043) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:52043 ssl:default [Connect call failed ('127.0.0.1', 52043)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: cloudformation_client = @pytest.mark.moto @pytest.mark.asyncio async def test_sqs(cloudformation_client): cloudformation_template = """{ "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "queue1": { "Type": "AWS::SQS::Queue", "Properties": { "QueueName": "my-queue" } } } }""" # Create stack > resp = await cloudformation_client.create_stack( StackName='my-stack', TemplateBody=cloudformation_template ) tests/test_waiter.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:52043/" aiobotocore/httpsession.py:268: EndpointConnectionError ================================== XFAILURES =================================== _____________________ test_put_object_sha256[False-https] ______________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 47347) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fut = None sock = address = ('127.0.0.1', 47347) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 47347) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=False debug=False>), '127.0.0.1', 47347) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:47347 ssl:default [Connect call failed ('127.0.0.1', 47347)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: request = > kwargs = {'create_bucket': ._f at 0x7f3696311e10>, 'region': 'us-east-1'} unittest = False, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f3696c8a050> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f3696311ea0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper(request: FixtureRequest, **kwargs: Any): unittest = False if pytest.version_tuple >= (8, 2) else fixturedef.unittest func = _perhaps_rebind_fixture_func(fixture, request.instance, unittest) event_loop = kwargs.pop(event_loop_fixture_id) gen_obj = func( **_add_kwargs(func, kwargs, event_loop_fixture_id, event_loop, request) ) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:320: in setup res = await gen_obj.__anext__() tests/conftest.py:378: in bucket_name name = await create_bucket(region) tests/conftest.py:402: in _f response = await s3_client.create_bucket(**bucket_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "https://127.0.0.1:47347/nzpeyltsocimrfavbkudhwjxgq" aiobotocore/httpsession.py:268: EndpointConnectionError _____________________ test_put_object_sha256[False-https] ______________________ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 47347) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): > return await self._loop.create_connection(*args, **kwargs) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:992: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:1076: in create_connection raise exceptions[0] /usr/lib64/python3.10/asyncio/base_events.py:1060: in create_connection sock = await self._connect_sock( /usr/lib64/python3.10/asyncio/base_events.py:969: in _connect_sock await self.sock_connect(sock, address) /usr/lib64/python3.10/asyncio/selector_events.py:501: in sock_connect return await fut _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> fut = None sock = address = ('127.0.0.1', 47347) def _sock_connect_cb(self, fut, sock, address): if fut.done(): return try: err = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: # Jump to any except clause below. > raise OSError(err, f'Connect call failed {address}') E ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 47347) /usr/lib64/python3.10/asyncio/selector_events.py:541: ConnectionRefusedError The above exception was the direct cause of the following exception: self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) > response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) aiobotocore/httpsession.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/site-packages/aiohttp/client.py:578: in _request conn = await self._connector.connect( /usr/lib64/python3.10/site-packages/aiohttp/connector.py:544: in connect proto = await self._create_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:911: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1235: in _create_direct_connection raise last_exc /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1204: in _create_direct_connection transp, proto = await self._wrap_create_connection( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = req = timeout = ClientTimeout(total=None, connect=None, sock_read=5, sock_connect=5, ceil_threshold=5) client_error = args = (functools.partial(, loop=<_UnixSelectorEventLoop running=False closed=True debug=False>), '127.0.0.1', 47347) kwargs = {'family': 0, 'flags': 0, 'local_addr': None, 'proto': 0, ...} async def _wrap_create_connection( self, *args: Any, req: ClientRequest, timeout: "ClientTimeout", client_error: Type[Exception] = ClientConnectorError, **kwargs: Any, ) -> Tuple[asyncio.Transport, ResponseHandler]: try: async with ceil_timeout( timeout.sock_connect, ceil_threshold=timeout.ceil_threshold ): return await self._loop.create_connection(*args, **kwargs) except cert_errors as exc: raise ClientConnectorCertificateError(req.connection_key, exc) from exc except ssl_errors as exc: raise ClientConnectorSSLError(req.connection_key, exc) from exc except OSError as exc: if exc.errno is None and isinstance(exc, asyncio.TimeoutError): raise > raise client_error(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:47347 ssl:default [Connect call failed ('127.0.0.1', 47347)] /usr/lib64/python3.10/site-packages/aiohttp/connector.py:1000: ClientConnectorError During handling of the above exception, another exception occurred: def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) > event_loop.run_until_complete(async_finalizer()) /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/base_events.py:649: in run_until_complete return future.result() /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:328: in async_finalizer await gen_obj.__anext__() tests/conftest.py:412: in create_bucket await recursive_delete(s3_client, _bucket_name) tests/conftest.py:359: in recursive_delete async for n in paginator.paginate(Bucket=bucket_name, Prefix=''): aiobotocore/paginate.py:30: in __anext__ response = await self._make_request(current_kwargs) aiobotocore/client.py:388: in _make_api_call http, parsed_response = await self._make_request( aiobotocore/client.py:416: in _make_request return await self._endpoint.make_request( aiobotocore/endpoint.py:102: in _send_request while await self._needs_retry( aiobotocore/endpoint.py:264: in _needs_retry responses = await self._event_emitter.emit( aiobotocore/hooks.py:66: in _emit response = await resolve_awaitable(handler(**kwargs)) aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:107: in _call if await resolve_awaitable(self._checker(**checker_kwargs)): aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:126: in _call should_retry = await self._should_retry( aiobotocore/retryhandler.py:165: in _should_retry return await resolve_awaitable( aiobotocore/_helpers.py:15: in resolve_awaitable return await obj aiobotocore/retryhandler.py:174: in _call checker(attempt_number, response, caught_exception) /usr/lib/python3.10/site-packages/botocore/retryhandler.py:247: in __call__ return self._check_caught_exception( /usr/lib/python3.10/site-packages/botocore/retryhandler.py:416: in _check_caught_exception raise caught_exception aiobotocore/endpoint.py:183: in _do_get_response http_response = await self._send(request) aiobotocore/endpoint.py:287: in _send return await self.http_session.send(request) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = request = async def send(self, request): try: proxy_url = self._proxy_config.proxy_url_for(request.url) proxy_headers = self._proxy_config.proxy_headers_for(request.url) url = request.url headers = request.headers data = request.body if ensure_boolean( os.environ.get('BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADER', '') ): # This is currently an "experimental" feature which provides # no guarantees of backwards compatibility. It may be subject # to change or removal in any patch version. Anyone opting in # to this feature should strictly pin botocore. host = urlparse(request.url).hostname proxy_headers['host'] = host headers_ = CIMultiDict( (z[0], _text(z[1], encoding='utf-8')) for z in headers.items() ) # https://github.com/boto/botocore/issues/1255 headers_['Accept-Encoding'] = 'identity' if isinstance(data, io.IOBase): data = _IOBaseWrapper(data) url = URL(url, encoded=True) session = await self._get_session(proxy_url) response = await session.request( request.method, url=url, chunked=self._chunked(headers_), headers=headers_, data=data, proxy=proxy_url, proxy_headers=proxy_headers, ) http_response = aiobotocore.awsrequest.AioAWSResponse( str(response.url), response.status, response.headers, response ) if not request.stream_output: # Cause the raw stream to be exhausted immediately. We do it # this way instead of using preload_content because # preload_content will never buffer chunked responses await http_response.content return http_response except ClientSSLError as e: raise SSLError(endpoint_url=request.url, error=e) except (ClientProxyConnectionError, ClientHttpProxyError) as e: raise ProxyConnectionError( proxy_url=mask_proxy_url(proxy_url), error=e ) except ( ServerDisconnectedError, aiohttp.ClientPayloadError, aiohttp.http_exceptions.BadStatusLine, ) as e: raise ConnectionClosedError( error=e, request=request, endpoint_url=request.url ) except ServerTimeoutError as e: if str(e).lower().startswith('connect'): raise ConnectTimeoutError(endpoint_url=request.url, error=e) else: raise ReadTimeoutError(endpoint_url=request.url, error=e) except ( ClientConnectorError, ClientConnectionError, socket.gaierror, ) as e: > raise EndpointConnectionError(endpoint_url=request.url, error=e) E botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "https://127.0.0.1:47347/nzpeyltsocimrfavbkudhwjxgq?versions&prefix=&encoding-type=url" aiobotocore/httpsession.py:268: EndpointConnectionError =============================== warnings summary =============================== tests/test_dynamodb.py:123 tests/test_dynamodb.py:123: PytestDeprecationWarning: test_waiter_table_exists[v4] is asynchronous and explicitly requests the "event_loop" fixture. Asynchronous fixtures and test functions should use "asyncio.get_running_loop()" instead. @pytest.mark.moto tests/boto_tests/test_signers.py::test_signers_generate_db_auth_token /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-1 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/python3.8/boto_tests/test_credentials.py::test_refreshablecredentials_get_credentials_set /usr/lib/python3.10/site-packages/pluggy/_callers.py:86: RuntimeWarning: coroutine 'fake_aiohttp_session..FakeAioHttpSession.FakeResponse._content' was never awaited wrapper_gen = cast(Generator[None, Result[object], None], res) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/python3.8/boto_tests/test_credentials.py::test_refreshablecredentials_get_credentials_set /usr/lib/python3.10/site-packages/pluggy/_callers.py:86: RuntimeWarning: coroutine 'fake_aiohttp_session..FakeAioHttpSession.FakeResponse._text' was never awaited wrapper_gen = cast(Generator[None, Result[object], None], res) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/python3.8/boto_tests/test_utils.py::test_containermetadatafetcher_retrieve_url_bad_status /usr/lib64/python3.10/unittest/mock.py:2181: RuntimeWarning: coroutine 'fake_aiohttp_session..FakeAioHttpSession.FakeResponse._text' was never awaited self.name = name Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/test_basic_s3.py::test_can_make_request /usr/lib64/python3.10/inspect.py:2969: RuntimeWarning: coroutine 'fake_aiohttp_session..FakeAioHttpSession.FakeResponse._text' was never awaited params = OrderedDict((param.name, param) for param in parameters) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/test_basic_s3.py::test_can_make_request /usr/lib64/python3.10/json/decoder.py:353: RuntimeWarning: coroutine 'fake_aiohttp_session..FakeAioHttpSession.FakeResponse._text' was never awaited obj, end = self.scan_once(s, idx) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. tests/test_basic_s3.py::test_can_make_request /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-2 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_can_make_request_no_verify[False] /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-3 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_can_make_request_no_verify[False] tests/test_basic_s3.py::test_put_object_sha256[False-https] /home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/aiobotocore/httpsession.py:167: DeprecationWarning: verify_ssl is deprecated, use ssl=False instead return aiohttp.TCPConnector( tests/test_basic_s3.py::test_fail_proxy_request /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-4 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_can_get_bucket_location /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-5 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_can_delete_urlencoded_object /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-6 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_can_paginate /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-7 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_can_paginate_with_page_size /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-8 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_can_search_paginate /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-9 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_can_paginate_iterator /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-10 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_result_key_iters /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-11 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_can_get_and_put_object /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-12 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_adaptive_retry /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-13 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_get_object_stream_wrapper /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-14 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_get_object_stream_context /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-15 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_paginate_max_items /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-16 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_paginate_within_page_boundaries /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-17 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_non_normalized_key_paths /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-18 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_copy_with_quoted_char /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-19 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_copy_with_query_string /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-20 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_can_copy_with_dict_form /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-21 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_can_copy_with_dict_form_with_version /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-22 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_copy_with_s3_metadata /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-23 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_head_object_keys[s3v4] /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-24 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_basic_s3.py::test_put_object_sha256[False-https] /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-25 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_batch.py::test_batch /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-26 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_dynamodb.py::test_get_item[v4] /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-27 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_dynamodb.py::test_create_waiter[v4] /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-28 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_dynamodb.py::test_batch_write_scan[v4] /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-29 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_dynamodb.py::test_delete_table[v4] /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-30 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_dynamodb.py::test_waiter_table_exists_failure[v4] /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-31 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_dynamodb.py::test_waiter_table_exists[v4] /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-32 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_ec2.py::test_ec2_snapshot /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-33 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_eventstreams.py::test_eventstream_chunking /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-34 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_eventstreams.py::test_eventstream_no_iter /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-35 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_monitor.py::test_monitor_response_received /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-36 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_sns.py::test_topic_attributes /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-37 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_sns.py::test_creating_subscription /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-38 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_sns.py::test_publish_to_http /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-39 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_sns.py::test_get_missing_endpoint_attributes /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-40 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_sns.py::test_platform_applications /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-41 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_sqs.py::test_list_queues /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-42 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_sqs.py::test_get_queue_name /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-43 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_sqs.py::test_put_pull_delete_test /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-44 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_sqs.py::test_put_pull_wait /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-45 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) tests/test_version.py::test_release_versions /home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/test_version.py:35: DeprecationWarning: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later. settings = docutils.frontend.OptionParser( tests/test_version.py: 69 warnings /usr/lib64/python3.10/optparse.py:1000: DeprecationWarning: The frontend.Option class will be removed in Docutils 0.21 or later. option = self.option_class(*args, **kwargs) tests/test_waiter.py::test_sqs /usr/lib/python3.10/site-packages/_pytest/threadexception.py:77: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-46 (_server_entry) Traceback (most recent call last): File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/lib64/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/aiobotocore-2.12.3/tests/moto_server.py", line 97, in _server_entry self._main_app = moto.server.DomainDispatcherApplication( TypeError: DomainDispatcherApplication.__init__() got an unexpected keyword argument 'service' warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ XFAIL tests/test_basic_s3.py::test_put_object_sha256[False-https] - moto does not yet support Checksum: https://github.com/spulec/moto/issues/5719 XFAIL tests/test_basic_s3.py::test_put_object_sha256[False-https] - moto does not yet support Checksum: https://github.com/spulec/moto/issues/5719 ERROR tests/test_basic_s3.py::test_can_get_bucket_location - botocore.excepti... ERROR tests/test_basic_s3.py::test_can_get_bucket_location - botocore.excepti... ERROR tests/test_basic_s3.py::test_can_delete_urlencoded_object - botocore.ex... ERROR tests/test_basic_s3.py::test_can_delete_urlencoded_object - botocore.ex... ERROR tests/test_basic_s3.py::test_can_paginate - botocore.exceptions.Endpoin... ERROR tests/test_basic_s3.py::test_can_paginate - botocore.exceptions.Endpoin... ERROR tests/test_basic_s3.py::test_can_paginate_with_page_size - botocore.exc... ERROR tests/test_basic_s3.py::test_can_paginate_with_page_size - botocore.exc... ERROR tests/test_basic_s3.py::test_can_search_paginate - botocore.exceptions.... ERROR tests/test_basic_s3.py::test_can_search_paginate - botocore.exceptions.... ERROR tests/test_basic_s3.py::test_can_paginate_iterator - botocore.exception... ERROR tests/test_basic_s3.py::test_can_paginate_iterator - botocore.exception... ERROR tests/test_basic_s3.py::test_result_key_iters - botocore.exceptions.End... ERROR tests/test_basic_s3.py::test_result_key_iters - botocore.exceptions.End... ERROR tests/test_basic_s3.py::test_can_get_and_put_object - botocore.exceptio... ERROR tests/test_basic_s3.py::test_can_get_and_put_object - botocore.exceptio... ERROR tests/test_basic_s3.py::test_adaptive_retry - botocore.exceptions.Endpo... ERROR tests/test_basic_s3.py::test_adaptive_retry - botocore.exceptions.Endpo... ERROR tests/test_basic_s3.py::test_get_object_stream_wrapper - botocore.excep... ERROR tests/test_basic_s3.py::test_get_object_stream_wrapper - botocore.excep... ERROR tests/test_basic_s3.py::test_get_object_stream_context - botocore.excep... ERROR tests/test_basic_s3.py::test_get_object_stream_context - botocore.excep... ERROR tests/test_basic_s3.py::test_paginate_max_items - botocore.exceptions.E... ERROR tests/test_basic_s3.py::test_paginate_max_items - botocore.exceptions.E... ERROR tests/test_basic_s3.py::test_paginate_within_page_boundaries - botocore... ERROR tests/test_basic_s3.py::test_paginate_within_page_boundaries - botocore... ERROR tests/test_basic_s3.py::test_non_normalized_key_paths - botocore.except... ERROR tests/test_basic_s3.py::test_non_normalized_key_paths - botocore.except... ERROR tests/test_basic_s3.py::test_copy_with_quoted_char - botocore.exception... ERROR tests/test_basic_s3.py::test_copy_with_quoted_char - botocore.exception... ERROR tests/test_basic_s3.py::test_copy_with_query_string - botocore.exceptio... ERROR tests/test_basic_s3.py::test_copy_with_query_string - botocore.exceptio... ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form - botocore.excepti... ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form - botocore.excepti... ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form_with_version - bot... ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form_with_version - bot... ERROR tests/test_basic_s3.py::test_copy_with_s3_metadata - botocore.exception... ERROR tests/test_basic_s3.py::test_copy_with_s3_metadata - botocore.exception... ERROR tests/test_basic_s3.py::test_head_object_keys[s3v4] - botocore.exceptio... ERROR tests/test_basic_s3.py::test_head_object_keys[s3v4] - botocore.exceptio... ERROR tests/test_dynamodb.py::test_get_item[v4] - botocore.exceptions.Endpoin... ERROR tests/test_dynamodb.py::test_get_item[v4] - botocore.exceptions.Endpoin... ERROR tests/test_dynamodb.py::test_batch_write_scan[v4] - botocore.exceptions... ERROR tests/test_dynamodb.py::test_batch_write_scan[v4] - botocore.exceptions... ERROR tests/test_sns.py::test_topic_attributes - botocore.exceptions.Endpoint... ERROR tests/test_sns.py::test_topic_attributes - botocore.exceptions.ParamVal... ERROR tests/test_sns.py::test_creating_subscription - botocore.exceptions.End... ERROR tests/test_sns.py::test_creating_subscription - botocore.exceptions.Par... ERROR tests/test_sns.py::test_publish_to_http - botocore.exceptions.EndpointC... ERROR tests/test_sns.py::test_publish_to_http - botocore.exceptions.ParamVali... ERROR tests/test_sqs.py::test_list_queues - botocore.exceptions.EndpointConne... ERROR tests/test_sqs.py::test_get_queue_name - botocore.exceptions.EndpointCo... ERROR tests/test_sqs.py::test_put_pull_delete_test - botocore.exceptions.Endp... ERROR tests/test_sqs.py::test_put_pull_wait - botocore.exceptions.EndpointCon... FAILED tests/test_basic_s3.py::test_can_make_request - botocore.exceptions.En... FAILED tests/test_basic_s3.py::test_can_make_request_no_verify[False] - botoc... FAILED tests/test_batch.py::test_batch - botocore.exceptions.EndpointConnecti... FAILED tests/test_dynamodb.py::test_create_waiter[v4] - botocore.exceptions.E... FAILED tests/test_dynamodb.py::test_delete_table[v4] - botocore.exceptions.En... FAILED tests/test_dynamodb.py::test_waiter_table_exists_failure[v4] - botocor... FAILED tests/test_dynamodb.py::test_waiter_table_exists[v4] - botocore.except... FAILED tests/test_ec2.py::test_ec2_snapshot - botocore.exceptions.EndpointCon... FAILED tests/test_monitor.py::test_monitor_response_received - botocore.excep... FAILED tests/test_patches.py::test_patches - assert False FAILED tests/test_sns.py::test_get_missing_endpoint_attributes - botocore.exc... FAILED tests/test_sns.py::test_platform_applications - botocore.exceptions.En... FAILED tests/test_waiter.py::test_sqs - botocore.exceptions.EndpointConnectio... = 13 failed, 141 passed, 23 deselected, 2 xfailed, 124 warnings, 54 errors in 689.97s (0:11:29) =