-
-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.12.3: pytest fails #1108
Comments
Something should be started on localhost before start testing? 🤔 Here is pytest summary output:================================================================================== 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.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:58557/ybtodjnqwzlaichpefvxsumgkr"
ERROR tests/test_basic_s3.py::test_can_get_bucket_location - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:58557/ybtodjnqwzlaichpefvxsumgkr?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_can_delete_urlencoded_object - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:34151/ohmfxlgawkruqzipnejybdvcst"
ERROR tests/test_basic_s3.py::test_can_delete_urlencoded_object - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:34151/ohmfxlgawkruqzipnejybdvcst?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_can_paginate - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:50193/cakuiyqdfvpbwghlzmeosrnxtj"
ERROR tests/test_basic_s3.py::test_can_paginate - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:50193/cakuiyqdfvpbwghlzmeosrnxtj?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_can_paginate_with_page_size - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:42695/eljwkdtgorpymhnzcvfquxsbai"
ERROR tests/test_basic_s3.py::test_can_paginate_with_page_size - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:42695/eljwkdtgorpymhnzcvfquxsbai?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_can_search_paginate - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:44009/ybwrvqdtnfazjimhkcpoxlsueg"
ERROR tests/test_basic_s3.py::test_can_search_paginate - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:44009/ybwrvqdtnfazjimhkcpoxlsueg?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_can_paginate_iterator - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:48513/dczrubqnwetoyiskvmghpxjalf"
ERROR tests/test_basic_s3.py::test_can_paginate_iterator - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:48513/dczrubqnwetoyiskvmghpxjalf?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_result_key_iters - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:42873/cxdybsrfqtapvehjunkiglwmoz"
ERROR tests/test_basic_s3.py::test_result_key_iters - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:42873/cxdybsrfqtapvehjunkiglwmoz?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_can_get_and_put_object - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:53283/huwprtjdaqxigolsezbfncmvky"
ERROR tests/test_basic_s3.py::test_can_get_and_put_object - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:53283/huwprtjdaqxigolsezbfncmvky?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_adaptive_retry - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:55537/yiphswuqmjaonefbxzcvdrtklg"
ERROR tests/test_basic_s3.py::test_adaptive_retry - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:55537/yiphswuqmjaonefbxzcvdrtklg?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_get_object_stream_wrapper - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:38019/keucinvgxbjosatzqdrhwpylmf"
ERROR tests/test_basic_s3.py::test_get_object_stream_wrapper - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:38019/keucinvgxbjosatzqdrhwpylmf?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_get_object_stream_context - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:40089/hsdptiynbwumrflcvxgakeozjq"
ERROR tests/test_basic_s3.py::test_get_object_stream_context - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:40089/hsdptiynbwumrflcvxgakeozjq?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_paginate_max_items - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:39889/jatxezksfcdwunqlyvhrobmipg"
ERROR tests/test_basic_s3.py::test_paginate_max_items - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:39889/jatxezksfcdwunqlyvhrobmipg?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_paginate_within_page_boundaries - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:39313/xdytrasozkmgivbnlqufhpcejw"
ERROR tests/test_basic_s3.py::test_paginate_within_page_boundaries - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:39313/xdytrasozkmgivbnlqufhpcejw?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_non_normalized_key_paths - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:40289/ciqtwpluxjbrvzefhymgsnakod"
ERROR tests/test_basic_s3.py::test_non_normalized_key_paths - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:40289/ciqtwpluxjbrvzefhymgsnakod?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_copy_with_quoted_char - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:52523/thsozalrnxicfejqywmpudbkvg"
ERROR tests/test_basic_s3.py::test_copy_with_quoted_char - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:52523/thsozalrnxicfejqywmpudbkvg?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_copy_with_query_string - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:53915/lqtjnpdfuowigkmvyrsbcahzex"
ERROR tests/test_basic_s3.py::test_copy_with_query_string - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:53915/lqtjnpdfuowigkmvyrsbcahzex?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:44801/nxkaotfjqwdyvbrzmhcilgeups"
ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:44801/nxkaotfjqwdyvbrzmhcilgeups?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form_with_version - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:53651/yshgivkjlnprwequtzfcdambox"
ERROR tests/test_basic_s3.py::test_can_copy_with_dict_form_with_version - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:53651/yshgivkjlnprwequtzfcdambox?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_copy_with_s3_metadata - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:50131/nrcphykoiutdsvgzfwqxjaelbm"
ERROR tests/test_basic_s3.py::test_copy_with_s3_metadata - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:50131/nrcphykoiutdsvgzfwqxjaelbm?versions&prefix=&encoding-type=url"
ERROR tests/test_basic_s3.py::test_head_object_keys[s3v4] - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:57279/hknxbczrgtyiwsomluqejpadfv"
ERROR tests/test_basic_s3.py::test_head_object_keys[s3v4] - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:57279/hknxbczrgtyiwsomluqejpadfv?versions&prefix=&encoding-type=url"
ERROR tests/test_dynamodb.py::test_get_item[v4] - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:37679/"
ERROR tests/test_dynamodb.py::test_get_item[v4] - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:37679/"
ERROR tests/test_dynamodb.py::test_batch_write_scan[v4] - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:39433/"
ERROR tests/test_dynamodb.py::test_batch_write_scan[v4] - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:39433/"
ERROR tests/test_sns.py::test_topic_attributes - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:36799/"
ERROR tests/test_sns.py::test_topic_attributes - botocore.exceptions.ParamValidationError: Parameter validation failed:
ERROR tests/test_sns.py::test_creating_subscription - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:47047/"
ERROR tests/test_sns.py::test_creating_subscription - botocore.exceptions.ParamValidationError: Parameter validation failed:
ERROR tests/test_sns.py::test_publish_to_http - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:43591/"
ERROR tests/test_sns.py::test_publish_to_http - botocore.exceptions.ParamValidationError: Parameter validation failed:
ERROR tests/test_sqs.py::test_list_queues - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:36499/"
ERROR tests/test_sqs.py::test_get_queue_name - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:33881/"
ERROR tests/test_sqs.py::test_put_pull_delete_test - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:48055/"
ERROR tests/test_sqs.py::test_put_pull_wait - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:47327/"
FAILED tests/test_basic_s3.py::test_can_make_request - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:41419/"
FAILED tests/test_basic_s3.py::test_can_make_request_no_verify[False] - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:40971/"
FAILED tests/test_batch.py::test_batch - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:57597/v1/describejobqueues"
FAILED tests/test_dynamodb.py::test_create_waiter[v4] - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:39859/"
FAILED tests/test_dynamodb.py::test_delete_table[v4] - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:40409/"
FAILED tests/test_dynamodb.py::test_waiter_table_exists_failure[v4] - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:53991/"
FAILED tests/test_dynamodb.py::test_waiter_table_exists[v4] - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:43203/"
FAILED tests/test_ec2.py::test_ec2_snapshot - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:60839/"
FAILED tests/test_lambda.py::test_run_lambda - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:48791/"
FAILED tests/test_monitor.py::test_monitor_response_received - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:53401/"
FAILED tests/test_patches.py::test_patches - assert False
FAILED tests/test_sns.py::test_get_missing_endpoint_attributes - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:46935/"
FAILED tests/test_sns.py::test_platform_applications - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:53159/"
FAILED tests/test_waiter.py::test_sqs - botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:35737/"
=============================================== 14 failed, 141 passed, 22 deselected, 2 xfailed, 126 warnings, 54 errors in 702.50s (0:11:42) =============================================== And in attachment ful pytest output python-aiobotocore.FAIL.txt |
I got similar test failures. It seems the actual error is here:
The |
It seems moto 5.x only allows auto detection of used AWS services from URLs (see diff --git a/tests/moto_server.py b/tests/moto_server.py
index 7807401..8ce738a 100644
--- a/tests/moto_server.py
+++ b/tests/moto_server.py
@@ -28,6 +28,17 @@ def get_free_tcp_port(release_socket: bool = False):
return sckt, port
+class DomainDispatcherApplication(moto.server.DomainDispatcherApplication):
+ def __init__(self, create_app, service):
+ super().__init__(create_app)
+ self.service = service
+
+ def get_backend_for_host(self, host):
+ if self.service:
+ return self.service
+
+ return super().get_backend_for_host(host)
+
class MotoService:
"""Will Create MotoService.
Service is ref-counted so there will only be one per process. Real Service will
@@ -94,7 +105,7 @@ class MotoService:
await self._stop()
def _server_entry(self):
- self._main_app = moto.server.DomainDispatcherApplication(
+ self._main_app = DomainDispatcherApplication(
moto.server.create_backend_app, service=self._service_name
)
self._main_app.debug = True |
Looks like there is some progress with moto 5.x 1b66a7a. Thank you! |
ya there are a bunch of errors still to go through. if you have time help appreciated! |
Here is pytest output for 3.10.8:+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-aiohttp-3.10.8-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-aiohttp-3.10.8-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ /usr/bin/pytest -ra -m 'not network' -p no:randomly -m 'not dev_mode' --ignore tests/autobahn/test_autobahn.py
============================= test session starts ==============================
platform linux -- Python 3.10.14, pytest-8.2.2, pluggy-1.5.0
rootdir: /home/tkloczko/rpmbuild/BUILD/aiohttp-3.10.8
configfile: setup.cfg
testpaths: tests/
plugins: mock-3.14.0
collected 3325 items / 6 deselected / 3319 selected
tests/test_base_protocol.py .................... [ 0%]
tests/test_circular_imports.py FFFF..................................... [ 1%]
........ [ 2%]
tests/test_classbasedview.py .... [ 2%]
tests/test_client_connection.py ......... [ 2%]
tests/test_client_exceptions.py ............................... [ 3%]
tests/test_client_fingerprint.py ............ [ 3%]
tests/test_client_functional.py ........................................ [ 4%]
........................................................................ [ 7%]
............x........................................................... [ 9%]
................................................ [ 10%]
tests/test_client_proto.py ........... [ 11%]
tests/test_client_request.py ..............................F............ [ 12%]
........................................................................ [ 14%]
..........s.............. [ 15%]
tests/test_client_response.py .......................................... [ 16%]
............... [ 17%]
tests/test_client_session.py ........................................... [ 18%]
........s................... [ 19%]
tests/test_client_ws.py ................................ [ 20%]
tests/test_client_ws_functional.py ..................................... [ 21%]
.. [ 21%]
tests/test_connector.py ....x........................................... [ 22%]
.................................................................sss.... [ 24%]
.......s............... [ 25%]
tests/test_cookiejar.py ................................................ [ 27%]
....... [ 27%]
tests/test_flowcontrol_streams.py ............. [ 27%]
tests/test_formdata.py ........... [ 27%]
tests/test_helpers.py ................................................ss [ 29%]
.................................................................. [ 31%]
tests/test_http_exceptions.py ................... [ 32%]
tests/test_http_parser.py .............................................. [ 33%]
...........................x............................................ [ 35%]
........................................................................ [ 37%]
........................................................................ [ 39%]
........................................................................ [ 42%]
...............................................x........................ [ 44%]
........................................................................ [ 46%]
.............................................x.......................... [ 48%]
. [ 48%]
tests/test_http_writer.py ..................... [ 49%]
tests/test_imports.py ..F [ 49%]
tests/test_locks.py ... [ 49%]
tests/test_loop.py ..... [ 49%]
tests/test_multipart.py ................................................ [ 51%]
............................................................... [ 52%]
tests/test_multipart_helpers.py ...............s........................ [ 54%]
.........................ss......ss............................ [ 56%]
tests/test_payload.py .............. [ 56%]
tests/test_proxy.py ................. [ 57%]
tests/test_proxy_functional.py ssss..........ss........ [ 57%]
tests/test_pytest_plugin.py .... [ 57%]
tests/test_resolver.py ...................s [ 58%]
tests/test_route_def.py ...................... [ 59%]
tests/test_run_app.py .................................................. [ 60%]
...... [ 60%]
tests/test_streams.py .................................................. [ 62%]
.............................................................. [ 64%]
tests/test_tcp_helpers.py ...... [ 64%]
tests/test_test_utils.py ............................................... [ 65%]
..... [ 65%]
tests/test_tracing.py ................... [ 66%]
tests/test_urldispatch.py .............................................. [ 67%]
........................................................................ [ 70%]
............................. [ 70%]
tests/test_web_app.py ............................s............ [ 72%]
tests/test_web_cli.py .......... [ 72%]
tests/test_web_exceptions.py ....................... [ 73%]
tests/test_web_functional.py ..........s.....................x.......... [ 74%]
........................................................................ [ 76%]
.......... [ 76%]
tests/test_web_log.py ........... [ 77%]
tests/test_web_middleware.py ........................................... [ 78%]
........................................................................ [ 80%]
[ 80%]
tests/test_web_request.py .............................................. [ 82%]
.............................................................. [ 83%]
tests/test_web_request_handler.py .... [ 84%]
tests/test_web_response.py ............................................. [ 85%]
........................................................................ [ 87%]
....................................... [ 88%]
tests/test_web_runner.py ..........ss....... [ 89%]
tests/test_web_sendfile.py ..... [ 89%]
tests/test_web_sendfile_functional.py .................................. [ 90%]
....................................................................... [ 92%]
tests/test_web_server.py ........... [ 93%]
tests/test_web_urldispatcher.py ........................................ [ 94%]
........... [ 94%]
tests/test_web_websocket.py ............................................ [ 95%]
........ [ 96%]
tests/test_web_websocket_functional.py ................................. [ 97%]
... [ 97%]
tests/test_websocket_handshake.py .................... [ 97%]
tests/test_websocket_parser.py ......................................... [ 99%]
. [ 99%]
tests/test_websocket_writer.py ........FF.... [ 99%]
tests/test_worker.py ................. [100%]
=================================== FAILURES ===================================
______________________ test_no_warnings[aiohttp._helpers] ______________________
import_path = 'aiohttp._helpers'
@pytest.mark.parametrize(
"import_path",
_mark_aiohttp_worker_for_skipping(_find_all_importables(aiohttp)),
)
def test_no_warnings(import_path: str) -> None:
"""Verify that exploding importables doesn't explode.
This is seeking for any import errors including ones caused
by circular imports.
"""
imp_cmd = (
# fmt: off
sys.executable,
"-W", "error",
# The following deprecation warning is triggered by importing
# `gunicorn.util`. Hopefully, it'll get fixed in the future. See
# https://github.com/benoitc/gunicorn/issues/2840 for detail.
"-W", "ignore:module 'sre_constants' is "
"deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing",
# Also caused by `gunicorn.util` importing `pkg_resources`:
"-W", "ignore:Creating a LegacyVersion has been deprecated and "
"will be removed in the next major release:"
"DeprecationWarning:",
# Deprecation warning emitted by setuptools v67.5.0+ triggered by importing
# `gunicorn.util`.
"-W", "ignore:pkg_resources is deprecated as an API:"
"DeprecationWarning",
"-c", f"import {import_path!s}",
# fmt: on
)
> subprocess.check_call(imp_cmd)
imp_cmd = ('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...)
import_path = 'aiohttp._helpers'
tests/test_circular_imports.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = (('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...),)
kwargs = {}, retcode = 1
cmd = ('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...)
def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.
The arguments are the same as for the call function. Example:
check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E subprocess.CalledProcessError: Command '('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', 'ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning:', '-W', 'ignore:pkg_resources is deprecated as an API:DeprecationWarning', '-c', 'import aiohttp._helpers')' returned non-zero exit status 1.
cmd = ('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...)
kwargs = {}
popenargs = (('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...),)
retcode = 1
/usr/lib64/python3.10/subprocess.py:369: CalledProcessError
----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'aiohttp._helpers'
____________________ test_no_warnings[aiohttp._http_parser] ____________________
import_path = 'aiohttp._http_parser'
@pytest.mark.parametrize(
"import_path",
_mark_aiohttp_worker_for_skipping(_find_all_importables(aiohttp)),
)
def test_no_warnings(import_path: str) -> None:
"""Verify that exploding importables doesn't explode.
This is seeking for any import errors including ones caused
by circular imports.
"""
imp_cmd = (
# fmt: off
sys.executable,
"-W", "error",
# The following deprecation warning is triggered by importing
# `gunicorn.util`. Hopefully, it'll get fixed in the future. See
# https://github.com/benoitc/gunicorn/issues/2840 for detail.
"-W", "ignore:module 'sre_constants' is "
"deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing",
# Also caused by `gunicorn.util` importing `pkg_resources`:
"-W", "ignore:Creating a LegacyVersion has been deprecated and "
"will be removed in the next major release:"
"DeprecationWarning:",
# Deprecation warning emitted by setuptools v67.5.0+ triggered by importing
# `gunicorn.util`.
"-W", "ignore:pkg_resources is deprecated as an API:"
"DeprecationWarning",
"-c", f"import {import_path!s}",
# fmt: on
)
> subprocess.check_call(imp_cmd)
imp_cmd = ('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...)
import_path = 'aiohttp._http_parser'
tests/test_circular_imports.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = (('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...),)
kwargs = {}, retcode = 1
cmd = ('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...)
def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.
The arguments are the same as for the call function. Example:
check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E subprocess.CalledProcessError: Command '('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', 'ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning:', '-W', 'ignore:pkg_resources is deprecated as an API:DeprecationWarning', '-c', 'import aiohttp._http_parser')' returned non-zero exit status 1.
cmd = ('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...)
kwargs = {}
popenargs = (('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...),)
retcode = 1
/usr/lib64/python3.10/subprocess.py:369: CalledProcessError
----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'aiohttp._http_parser'
____________________ test_no_warnings[aiohttp._http_writer] ____________________
import_path = 'aiohttp._http_writer'
@pytest.mark.parametrize(
"import_path",
_mark_aiohttp_worker_for_skipping(_find_all_importables(aiohttp)),
)
def test_no_warnings(import_path: str) -> None:
"""Verify that exploding importables doesn't explode.
This is seeking for any import errors including ones caused
by circular imports.
"""
imp_cmd = (
# fmt: off
sys.executable,
"-W", "error",
# The following deprecation warning is triggered by importing
# `gunicorn.util`. Hopefully, it'll get fixed in the future. See
# https://github.com/benoitc/gunicorn/issues/2840 for detail.
"-W", "ignore:module 'sre_constants' is "
"deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing",
# Also caused by `gunicorn.util` importing `pkg_resources`:
"-W", "ignore:Creating a LegacyVersion has been deprecated and "
"will be removed in the next major release:"
"DeprecationWarning:",
# Deprecation warning emitted by setuptools v67.5.0+ triggered by importing
# `gunicorn.util`.
"-W", "ignore:pkg_resources is deprecated as an API:"
"DeprecationWarning",
"-c", f"import {import_path!s}",
# fmt: on
)
> subprocess.check_call(imp_cmd)
imp_cmd = ('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...)
import_path = 'aiohttp._http_writer'
tests/test_circular_imports.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = (('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...),)
kwargs = {}, retcode = 1
cmd = ('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...)
def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.
The arguments are the same as for the call function. Example:
check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E subprocess.CalledProcessError: Command '('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', 'ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning:', '-W', 'ignore:pkg_resources is deprecated as an API:DeprecationWarning', '-c', 'import aiohttp._http_writer')' returned non-zero exit status 1.
cmd = ('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...)
kwargs = {}
popenargs = (('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...),)
retcode = 1
/usr/lib64/python3.10/subprocess.py:369: CalledProcessError
----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'aiohttp._http_writer'
_____________________ test_no_warnings[aiohttp._websocket] _____________________
import_path = 'aiohttp._websocket'
@pytest.mark.parametrize(
"import_path",
_mark_aiohttp_worker_for_skipping(_find_all_importables(aiohttp)),
)
def test_no_warnings(import_path: str) -> None:
"""Verify that exploding importables doesn't explode.
This is seeking for any import errors including ones caused
by circular imports.
"""
imp_cmd = (
# fmt: off
sys.executable,
"-W", "error",
# The following deprecation warning is triggered by importing
# `gunicorn.util`. Hopefully, it'll get fixed in the future. See
# https://github.com/benoitc/gunicorn/issues/2840 for detail.
"-W", "ignore:module 'sre_constants' is "
"deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing",
# Also caused by `gunicorn.util` importing `pkg_resources`:
"-W", "ignore:Creating a LegacyVersion has been deprecated and "
"will be removed in the next major release:"
"DeprecationWarning:",
# Deprecation warning emitted by setuptools v67.5.0+ triggered by importing
# `gunicorn.util`.
"-W", "ignore:pkg_resources is deprecated as an API:"
"DeprecationWarning",
"-c", f"import {import_path!s}",
# fmt: on
)
> subprocess.check_call(imp_cmd)
imp_cmd = ('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...)
import_path = 'aiohttp._websocket'
tests/test_circular_imports.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = (('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...),)
kwargs = {}, retcode = 1
cmd = ('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...)
def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.
The arguments are the same as for the call function. Example:
check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E subprocess.CalledProcessError: Command '('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', 'ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning:', '-W', 'ignore:pkg_resources is deprecated as an API:DeprecationWarning', '-c', 'import aiohttp._websocket')' returned non-zero exit status 1.
cmd = ('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...)
kwargs = {}
popenargs = (('/usr/bin/python3', '-W', 'error', '-W', "ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing", '-W', ...),)
retcode = 1
/usr/lib64/python3.10/subprocess.py:369: CalledProcessError
----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'aiohttp._websocket'
______________________ test_host_header_ipv6[pyloop-True] ______________________
make_request = <function make_request.<locals>.maker at 0x7fa7c2e4e7a0>
yarl_supports_host_subcomponent = True
@pytest.mark.parametrize("yarl_supports_host_subcomponent", [True, False])
def test_host_header_ipv6(make_request, yarl_supports_host_subcomponent: bool) -> None:
# Ensure the old path is tested for old yarl versions
with mock.patch.object(
client_reqrep,
"_YARL_SUPPORTS_HOST_SUBCOMPONENT",
yarl_supports_host_subcomponent,
):
> req = make_request("get", "http://[::2]")
make_request = <function make_request.<locals>.maker at 0x7fa7c2e4e7a0>
yarl_supports_host_subcomponent = True
tests/test_client_request.py:291:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_client_request.py:47: in maker
request = ClientRequest(method, URL(url), *args, loop=loop, **kwargs)
args = ()
kwargs = {}
loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
method = 'get'
request = None
url = 'http://[::2]'
../../BUILDROOT/python-aiohttp-3.10.8-2.fc37.x86_64/usr/lib64/python3.10/site-packages/aiohttp/client_reqrep.py:331: in __init__
self.update_headers(headers)
auth = None
chunked = None
compress = None
cookies = None
data = None
expect100 = False
headers = None
loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
match = None
method = 'get'
params = None
proxy = None
proxy_auth = None
proxy_headers = None
real_response_class = <class 'aiohttp.client_reqrep.ClientResponse'>
response_class = None
self = <aiohttp.client_reqrep.ClientRequest object at 0x7fa7c281d600>
server_hostname = None
session = None
skip_auto_headers = None
ssl = True
timer = None
traces = None
trust_env = False
url = URL('http://::2')
version = HttpVersion(major=1, minor=1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.client_reqrep.ClientRequest object at 0x7fa7c281d600>
headers = None
def update_headers(self, headers: Optional[LooseHeaders]) -> None:
"""Update request headers."""
self.headers: CIMultiDict[str] = CIMultiDict()
# add host
if _YARL_SUPPORTS_HOST_SUBCOMPONENT:
> netloc = self.url.host_subcomponent
E AttributeError: 'URL' object has no attribute 'host_subcomponent'
headers = None
self = <aiohttp.client_reqrep.ClientRequest object at 0x7fa7c281d600>
../../BUILDROOT/python-aiohttp-3.10.8-2.fc37.x86_64/usr/lib64/python3.10/site-packages/aiohttp/client_reqrep.py:437: AttributeError
_______________________________ test_import_time _______________________________
pytester = <Pytester PosixPath('/tmp/pytest-of-tkloczko/pytest-468/test_import_time0')>
@pytest.mark.internal
@pytest.mark.skipif(
not sys.platform.startswith("linux") or platform.python_implementation() == "PyPy",
reason="Timing is more reliable on Linux",
)
def test_import_time(pytester: pytest.Pytester) -> None:
"""Check that importing aiohttp doesn't take too long.
Obviously, the time may vary on different machines and may need to be adjusted
from time to time, but this should provide an early warning if something is
added that significantly increases import time.
"""
root = Path(__file__).parent.parent
old_path = os.environ.get("PYTHONPATH")
os.environ["PYTHONPATH"] = os.pathsep.join([str(root)] + sys.path)
best_time_ms = 1000
cmd = "import timeit; print(int(timeit.timeit('import aiohttp', number=1) * 1000))"
try:
for _ in range(3):
r = pytester.run(sys.executable, "-We", "-c", cmd)
assert not r.stderr.str()
runtime_ms = int(r.stdout.str())
if runtime_ms < best_time_ms:
best_time_ms = runtime_ms
finally:
if old_path is None:
os.environ.pop("PYTHONPATH")
else:
os.environ["PYTHONPATH"] = old_path
expected_time = _TARGET_TIMINGS_BY_PYTHON_VERSION.get(
f"{sys.version_info.major}.{sys.version_info.minor}", 200
)
> assert best_time_ms < expected_time
E assert 237 < 200
_ = 2
best_time_ms = 237
cmd = "import timeit; print(int(timeit.timeit('import aiohttp', number=1) * 1000))"
expected_time = 200
old_path = '/home/tkloczko/rpmbuild/BUILDROOT/python-aiohttp-3.10.8-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-aiohttp-3.10.8-2.fc37.x86_64/usr/lib/python3.10/site-packages'
pytester = <Pytester PosixPath('/tmp/pytest-of-tkloczko/pytest-468/test_import_time0')>
r = <RunResult ret=ExitCode.OK len(stdout.lines)=1 len(stderr.lines)=0 duration=0.29s>
root = PosixPath('/home/tkloczko/rpmbuild/BUILD/aiohttp-3.10.8')
runtime_ms = 237
/home/tkloczko/rpmbuild/BUILD/aiohttp-3.10.8/tests/test_imports.py:71: AssertionError
----------------------------- Captured stdout call -----------------------------
running: /usr/bin/python3 -We -c import timeit; print(int(timeit.timeit('import aiohttp', number=1) * 1000))
in: /tmp/pytest-of-tkloczko/pytest-468/test_import_time0
248
running: /usr/bin/python3 -We -c import timeit; print(int(timeit.timeit('import aiohttp', number=1) * 1000))
in: /tmp/pytest-of-tkloczko/pytest-468/test_import_time0
237
running: /usr/bin/python3 -We -c import timeit; print(int(timeit.timeit('import aiohttp', number=1) * 1000))
in: /tmp/pytest-of-tkloczko/pytest-468/test_import_time0
237
___________________________ test_send_compress_text ____________________________
self = <Mock name='mock.write' id='140358463703216'>
args = (b'\xc1\x05*\x01b\x00\x00',), kwargs = {}
expected = call(b'\xc1\x05*\x01b\x00\x00')
actual = call(b'\xc1\x04\x02a\x00\x00')
_error_message = <function NonCallableMock.assert_called_with.<locals>._error_message at 0x7fa7c03d7910>
cause = None
def assert_called_with(self, /, *args, **kwargs):
"""assert that the last call was made with the specified arguments.
Raises an AssertionError if the args and keyword args passed in are
different to the last call to the mock."""
if self.call_args is None:
expected = self._format_mock_call_signature(args, kwargs)
actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\nActual: %s'
% (expected, actual))
raise AssertionError(error_message)
def _error_message():
msg = self._format_mock_failure_message(args, kwargs)
return msg
expected = self._call_matcher(_Call((args, kwargs), two=True))
actual = self._call_matcher(self.call_args)
if actual != expected:
cause = expected if isinstance(expected, Exception) else None
> raise AssertionError(_error_message()) from cause
E AssertionError: expected call not found.
E Expected: write(b'\xc1\x05*\x01b\x00\x00')
E Actual: write(b'\xc1\x04\x02a\x00\x00')
_error_message = <function NonCallableMock.assert_called_with.<locals>._error_message at 0x7fa7c03d7910>
actual = call(b'\xc1\x04\x02a\x00\x00')
args = (b'\xc1\x05*\x01b\x00\x00',)
cause = None
expected = call(b'\xc1\x05*\x01b\x00\x00')
kwargs = {}
self = <Mock name='mock.write' id='140358463703216'>
/usr/lib64/python3.10/unittest/mock.py:929: AssertionError
During handling of the above exception, another exception occurred:
protocol = <Mock id='140358463705328'>, transport = <Mock id='140358463712000'>
async def test_send_compress_text(protocol, transport) -> None:
writer = WebSocketWriter(protocol, transport, compress=15)
await writer.send(b"text")
writer.transport.write.assert_called_with(b"\xc1\x06*I\xad(\x01\x00")
await writer.send(b"text")
> writer.transport.write.assert_called_with(b"\xc1\x05*\x01b\x00\x00")
E AssertionError: expected call not found.
E Expected: write(b'\xc1\x05*\x01b\x00\x00')
E Actual: write(b'\xc1\x04\x02a\x00\x00')
E
E pytest introspection follows:
E
E Args:
E assert (b'\xc1\x04\x02a\x00\x00',) == (b'\xc1\x05*\x01b\x00\x00',)
E
E At index 0 diff: b'\xc1\x04\x02a\x00\x00' != b'\xc1\x05*\x01b\x00\x00'
E Use -v to get more diff
protocol = <Mock id='140358463705328'>
transport = <Mock id='140358463712000'>
writer = <aiohttp.http_websocket.WebSocketWriter object at 0x7fa7c05ed000>
tests/test_websocket_writer.py:91: AssertionError
______________________ test_send_compress_text_notakeover ______________________
cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x7fa7c03d7370>
when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: Callable[[], TResult],
when: Literal["collect", "setup", "call", "teardown"],
reraise: Optional[
Union[Type[BaseException], Tuple[Type[BaseException], ...]]
] = None,
) -> "CallInfo[TResult]":
"""Call func, wrapping the result in a CallInfo.
:param func:
The function to call. Called without arguments.
:param when:
The phase in which the function is called.
:param reraise:
Exception or exceptions that shall propagate if raised by the
function, instead of being wrapped in the CallInfo.
"""
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
> result: Optional[TResult] = func()
cls = <class '_pytest.runner.CallInfo'>
duration = 0.06388543802313507
excinfo = <ExceptionInfo PytestUnraisableExceptionWarning('Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_U...rning: unclosed <socket.socket fd=13, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n') tblen=11>
func = <function call_and_report.<locals>.<lambda> at 0x7fa7c03d7370>
precise_start = 841142.975150013
precise_stop = 841143.039035451
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
result = None
start = 1727684123.4530954
stop = 1727684123.516982
when = 'call'
/usr/lib/python3.10/site-packages/_pytest/runner.py:341:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/site-packages/_pytest/runner.py:241: in <lambda>
lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
item = <Function test_send_compress_text_notakeover>
kwds = {}
runtest_hook = <HookCaller 'pytest_runtest_call'>
/usr/lib/python3.10/site-packages/pluggy/_hooks.py:513: in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
firstresult = False
kwargs = {'item': <Function test_send_compress_text_notakeover>}
self = <HookCaller 'pytest_runtest_call'>
/usr/lib/python3.10/site-packages/pluggy/_manager.py:120: in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
firstresult = False
hook_name = 'pytest_runtest_call'
kwargs = {'item': <Function test_send_compress_text_notakeover>}
methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.10/site-packages/_pytest/runne...ption', plugin=<module '_pytest.threadexception' from '/usr/lib/python3.10/site-packages/_pytest/threadexception.py'>>]
self = <_pytest.config.PytestPluginManager object at 0x7fa7c5943f70>
/usr/lib/python3.10/site-packages/_pytest/threadexception.py:87: in pytest_runtest_call
yield from thread_exception_runtest_hook()
/usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook
yield
cm = <_pytest.threadexception.catch_threading_exception object at 0x7fa7c0127d60>
/usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:90: in pytest_runtest_call
yield from unraisable_exception_runtest_hook()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def unraisable_exception_runtest_hook() -> Generator[None, None, None]:
with catch_unraisable_exception() as cm:
try:
yield
finally:
if cm.unraisable:
if cm.unraisable.err_msg is not None:
err_msg = cm.unraisable.err_msg
else:
err_msg = "Exception ignored in"
msg = f"{err_msg}: {cm.unraisable.object!r}\n\n"
msg += "".join(
traceback.format_exception(
cm.unraisable.exc_type,
cm.unraisable.exc_value,
cm.unraisable.exc_traceback,
)
)
> warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
E
E Traceback (most recent call last):
E File "/home/tkloczko/rpmbuild/BUILDROOT/python-aiohttp-3.10.8-2.fc37.x86_64/usr/lib64/python3.10/site-packages/aiohttp/test_utils.py", line 590, in teardown_test_loop
E gc.collect()
E ResourceWarning: unclosed <socket.socket fd=13, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fa7c0124b20>
err_msg = 'Exception ignored in'
msg = 'Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n\nTr...nResourceWarning: unclosed <socket.socket fd=13, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n'
/usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:80: PytestUnraisableExceptionWarning
================================== XFAILURES ===================================
________________________ test_broken_connection[pyloop] ________________________
aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fa7c2386290>
@pytest.mark.xfail
async def test_broken_connection(aiohttp_client) -> None:
async def handler(request):
request.transport.close()
return web.Response(text="answer" * 1000)
app = web.Application()
app.router.add_get("/", handler)
client = await aiohttp_client(app)
with pytest.raises(aiohttp.ClientResponseError):
> await client.get("/")
aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fa7c2386290>
app = <Application 0x7fa7c34ac7f0>
client = <aiohttp.test_utils.TestClient object at 0x7fa7c34ac910>
handler = <function test_broken_connection.<locals>.handler at 0x7fa7c2e4e320>
tests/test_client_functional.py:2521:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../BUILDROOT/python-aiohttp-3.10.8-2.fc37.x86_64/usr/lib64/python3.10/site-packages/aiohttp/test_utils.py:319: in _request
resp = await self._session.request(method, self.make_url(path), **kwargs)
kwargs = {}
method = 'GET'
path = '/'
self = <aiohttp.test_utils.TestClient object at 0x7fa7c34ac910>
../../BUILDROOT/python-aiohttp-3.10.8-2.fc37.x86_64/usr/lib64/python3.10/site-packages/aiohttp/client.py:686: in _request
await resp.start(conn)
all_cookies = <SimpleCookie: >
allow_redirects = True
auth = None
auth_from_url = None
auto_decompress = True
chunked = None
compress = None
conn = Connection<ConnectionKey(host='127.0.0.1', port=45055, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=None)>
cookies = None
data = None
expect100 = False
fingerprint = None
handle = None
headers = <CIMultiDict()>
history = []
json = None
max_field_size = 8190
max_line_size = 8190
max_redirects = 10
method = 'GET'
params = {}
proxy = None
proxy_auth = None
proxy_headers = <CIMultiDict()>
raise_for_status = None
read_bufsize = 65536
read_until_eof = True
real_timeout = ClientTimeout(total=300, connect=None, sock_read=None, sock_connect=None, ceil_threshold=5)
redirects = 0
req = <aiohttp.client_reqrep.ClientRequest object at 0x7fa7c2c3b490>
resp = <ClientResponse(http://127.0.0.1:45055/) [None None]>
None
retry_persistent_connection = False
self = <aiohttp.client.ClientSession object at 0x7fa7c2296440>
server_hostname = None
skip_auto_headers = None
skip_headers = set()
ssl = True
ssl_context = None
str_or_url = URL('http://127.0.0.1:45055/')
timeout = <_SENTINEL.sentinel: 1>
timer = <aiohttp.helpers.TimerContext object at 0x7fa7c2c38af0>
tm = <aiohttp.helpers.TimeoutHandle object at 0x7fa7c2c39f90>
trace_request_ctx = None
traces = []
url = URL('http://127.0.0.1:45055/')
verify_ssl = None
version = HttpVersion(major=1, minor=1)
../../BUILDROOT/python-aiohttp-3.10.8-2.fc37.x86_64/usr/lib64/python3.10/site-packages/aiohttp/client_reqrep.py:1022: in start
message, payload = await protocol.read() # type: ignore[union-attr]
connection = Connection<ConnectionKey(host='127.0.0.1', port=45055, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=None)>
protocol = <aiohttp.client_proto.ResponseHandler object at 0x7fa7c22cb520>
self = <ClientResponse(http://127.0.0.1:45055/) [None None]>
None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <aiohttp.client_proto.ResponseHandler object at 0x7fa7c22cb520>
async def read(self) -> _T:
if not self._buffer and not self._eof:
assert not self._waiter
self._waiter = self._loop.create_future()
try:
> await self._waiter
E aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected
self = <aiohttp.client_proto.ResponseHandler object at 0x7fa7c22cb520>
../../BUILDROOT/python-aiohttp-3.10.8-2.fc37.x86_64/usr/lib64/python3.10/site-packages/aiohttp/streams.py:643: ServerDisconnectedError
___________________ test_del_with_scheduled_cleanup[pyloop] ____________________
self = <Mock id='140358494984448'>
args = (<_UnixSelectorEventLoop running=False closed=False debug=True>, {'connector': <ANY>, 'message': 'Unclosed connector', 'source_traceback': <ANY>})
kwargs = {}
expected = call(<_UnixSelectorEventLoop running=False closed=False debug=True>, {'connector': <ANY>, 'message': 'Unclosed connector', 'source_traceback': <ANY>})
actual = call(<_UnixSelectorEventLoop running=False closed=False debug=True>, {'connector': <aiohttp.connector.BaseConnector ob...e /home/tkloczko/rpmbuild/BUILD/aiohttp-3.10.8/tests/test_connector.py, line 193 in test_del_with_scheduled_cleanup>]})
_error_message = <function NonCallableMock.assert_called_with.<locals>._error_message at 0x7fa7c0ae76d0>
cause = None
def assert_called_with(self, /, *args, **kwargs):
"""assert that the last call was made with the specified arguments.
Raises an AssertionError if the args and keyword args passed in are
different to the last call to the mock."""
if self.call_args is None:
expected = self._format_mock_call_signature(args, kwargs)
actual = 'not called.'
error_message = ('expected call not found.\nExpected: %s\nActual: %s'
% (expected, actual))
raise AssertionError(error_message)
def _error_message():
msg = self._format_mock_failure_message(args, kwargs)
return msg
expected = self._call_matcher(_Call((args, kwargs), two=True))
actual = self._call_matcher(self.call_args)
if actual != expected:
cause = expected if isinstance(expected, Exception) else None
> raise AssertionError(_error_message()) from cause
E AssertionError: expected call not found.
E Expected: mock(<_UnixSelectorEventLoop running=True closed=False debug=True>, {'connector': <ANY>, 'message': 'Unclosed connector', 'source_traceback': <ANY>})
E Actual: mock(<_UnixSelectorEventLoop running=True closed=False debug=True>, {'connector': <aiohttp.connector.BaseConnector object at 0x7fa7c23c2d70>, 'connections': ["[(<Mock id='140358494978448'>, 123)]"], 'message': 'Unclosed connector', 'source_traceback': [<FrameSummary file /usr/bin/pytest, line 8 in <module>>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/config/__init__.py, line 206 in console_main>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/config/__init__.py, line 178 in main>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_hooks.py, line 513 in __call__>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_manager.py, line 120 in _hookexec>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_callers.py, line 103 in _multicall>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/main.py, line 339 in pytest_cmdline_main>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/main.py, line 292 in wrap_session>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/main.py, line 346 in _main>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_hooks.py, line 513 in __call__>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_manager.py, line 120 in _hookexec>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_callers.py, line 103 in _multicall>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/main.py, line 371 in pytest_runtestloop>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_hooks.py, line 513 in __call__>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_manager.py, line 120 in _hookexec>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_callers.py, line 103 in _multicall>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/runner.py, line 116 in pytest_runtest_protocol>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/runner.py, line 135 in runtestprotocol>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/runner.py, line 240 in call_and_report>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/runner.py, line 341 in from_call>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/runner.py, line 241 in <lambda>>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_hooks.py, line 513 in __call__>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_manager.py, line 120 in _hookexec>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_callers.py, line 103 in _multicall>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/runner.py, line 173 in pytest_runtest_call>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/python.py, line 1632 in runtest>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_hooks.py, line 513 in __call__>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_manager.py, line 120 in _hookexec>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_callers.py, line 103 in _multicall>, <FrameSummary file /home/tkloczko/rpmbuild/BUILDROOT/python-aiohttp-3.10.8-2.fc37.x86_64/usr/lib64/python3.10/site-packages/aiohttp/pytest_plugin.py, line 210 in pytest_pyfunc_call>, <FrameSummary file /usr/lib64/python3.10/asyncio/base_events.py, line 636 in run_until_complete>, <FrameSummary file /usr/lib64/python3.10/asyncio/base_events.py, line 603 in run_forever>, <FrameSummary file /usr/lib64/python3.10/asyncio/base_events.py, line 1909 in _run_once>, <FrameSummary file /usr/lib64/python3.10/asyncio/events.py, line 80 in _run>, <FrameSummary file /home/tkloczko/rpmbuild/BUILD/aiohttp-3.10.8/tests/test_connector.py, line 193 in test_del_with_scheduled_cleanup>]})
_error_message = <function NonCallableMock.assert_called_with.<locals>._error_message at 0x7fa7c0ae76d0>
actual = call(<_UnixSelectorEventLoop running=False closed=False debug=True>, {'connector': <aiohttp.connector.BaseConnector ob...e /home/tkloczko/rpmbuild/BUILD/aiohttp-3.10.8/tests/test_connector.py, line 193 in test_del_with_scheduled_cleanup>]})
args = (<_UnixSelectorEventLoop running=False closed=False debug=True>, {'connector': <ANY>, 'message': 'Unclosed connector', 'source_traceback': <ANY>})
cause = None
expected = call(<_UnixSelectorEventLoop running=False closed=False debug=True>, {'connector': <ANY>, 'message': 'Unclosed connector', 'source_traceback': <ANY>})
kwargs = {}
self = <Mock id='140358494984448'>
/usr/lib64/python3.10/unittest/mock.py:929: AssertionError
During handling of the above exception, another exception occurred:
loop = <_UnixSelectorEventLoop running=False closed=False debug=True>
@pytest.mark.xfail
async def test_del_with_scheduled_cleanup(loop) -> None:
loop.set_debug(True)
conn = aiohttp.BaseConnector(loop=loop, keepalive_timeout=0.01)
transp = mock.Mock()
conn._conns["a"] = [(transp, 123)]
conns_impl = conn._conns
exc_handler = mock.Mock()
loop.set_exception_handler(exc_handler)
with pytest.warns(ResourceWarning):
# obviously doesn't deletion because loop has a strong
# reference to connector's instance method, isn't it?
del conn
await asyncio.sleep(0.01)
gc.collect()
assert not conns_impl
transp.close.assert_called_with()
msg = {"connector": mock.ANY, "message": "Unclosed connector"} # conn was deleted
if loop.get_debug():
msg["source_traceback"] = mock.ANY
> exc_handler.assert_called_with(loop, msg)
E AssertionError: expected call not found.
E Expected: mock(<_UnixSelectorEventLoop running=True closed=False debug=True>, {'connector': <ANY>, 'message': 'Unclosed connector', 'source_traceback': <ANY>})
E Actual: mock(<_UnixSelectorEventLoop running=True closed=False debug=True>, {'connector': <aiohttp.connector.BaseConnector object at 0x7fa7c23c2d70>, 'connections': ["[(<Mock id='140358494978448'>, 123)]"], 'message': 'Unclosed connector', 'source_traceback': [<FrameSummary file /usr/bin/pytest, line 8 in <module>>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/config/__init__.py, line 206 in console_main>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/config/__init__.py, line 178 in main>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_hooks.py, line 513 in __call__>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_manager.py, line 120 in _hookexec>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_callers.py, line 103 in _multicall>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/main.py, line 339 in pytest_cmdline_main>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/main.py, line 292 in wrap_session>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/main.py, line 346 in _main>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_hooks.py, line 513 in __call__>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_manager.py, line 120 in _hookexec>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_callers.py, line 103 in _multicall>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/main.py, line 371 in pytest_runtestloop>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_hooks.py, line 513 in __call__>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_manager.py, line 120 in _hookexec>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_callers.py, line 103 in _multicall>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/runner.py, line 116 in pytest_runtest_protocol>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/runner.py, line 135 in runtestprotocol>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/runner.py, line 240 in call_and_report>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/runner.py, line 341 in from_call>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/runner.py, line 241 in <lambda>>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_hooks.py, line 513 in __call__>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_manager.py, line 120 in _hookexec>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_callers.py, line 103 in _multicall>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/runner.py, line 173 in pytest_runtest_call>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/python.py, line 1632 in runtest>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_hooks.py, line 513 in __call__>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_manager.py, line 120 in _hookexec>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_callers.py, line 103 in _multicall>, <FrameSummary file /home/tkloczko/rpmbuild/BUILDROOT/python-aiohttp-3.10.8-2.fc37.x86_64/usr/lib64/python3.10/site-packages/aiohttp/pytest_plugin.py, line 210 in pytest_pyfunc_call>, <FrameSummary file /usr/lib64/python3.10/asyncio/base_events.py, line 636 in run_until_complete>, <FrameSummary file /usr/lib64/python3.10/asyncio/base_events.py, line 603 in run_forever>, <FrameSummary file /usr/lib64/python3.10/asyncio/base_events.py, line 1909 in _run_once>, <FrameSummary file /usr/lib64/python3.10/asyncio/events.py, line 80 in _run>, <FrameSummary file /home/tkloczko/rpmbuild/BUILD/aiohttp-3.10.8/tests/test_connector.py, line 193 in test_del_with_scheduled_cleanup>]})
E
E pytest introspection follows:
E
E Args:
E assert (<_UnixSelect...ed_cleanup>]}) == (<_UnixSelect...back': <ANY>})
E
E At index 1 diff: {'connector': <aiohttp.connector.BaseConnector object at 0x7fa7c23c2d70>, 'connections': ["[(<Mock id='140358494978448'>, 123)]"], 'message': 'Unclosed connector', 'source_traceback': [<FrameSummary file /usr/bin/pytest, line 8 in <module>>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/config/__init__.py, line 206 in console_main>, <FrameSummary file /usr/lib/python3.10/site-packages/_pytest/config/__init__.py, line 178 in main>, <FrameSummary file /usr/lib/python3.10/site-packages/pluggy/_hooks.py, line 513 in __call__>, <FrameSummary f...
E
E ...Full output truncated (2 lines hidden), use '-vv' to show
conns_impl = {}
exc_handler = <Mock id='140358494984448'>
loop = <_UnixSelectorEventLoop running=False closed=False debug=True>
msg = {'connector': <ANY>, 'message': 'Unclosed connector', 'source_traceback': <ANY>}
transp = <Mock id='140358494978448'>
tests/test_connector.py:213: AssertionError
_______________ test_parse_unusual_request_line[c-parser-pyloop] _______________
parser = <aiohttp._http_parser.HttpRequestParser object at 0x7fa7c305b0d0>
@pytest.mark.usefixtures("xfail_c_parser_status")
def test_parse_unusual_request_line(parser) -> None:
text = b"#smol //a HTTP/1.3\r\n\r\n"
> messages, upgrade, tail = parser.feed_data(text)
parser = <aiohttp._http_parser.HttpRequestParser object at 0x7fa7c305b0d0>
text = b'#smol //a HTTP/1.3\r\n\r\n'
tests/test_http_parser.py:314:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> raise ex
E aiohttp.http_exceptions.BadStatusLine: 400, message:
E Invalid method encountered:
E
E b'#smol //a HTTP/1.3'
E ^
aiohttp/_http_parser.pyx:563: BadStatusLine
_________ test_http_request_parser_utf8_request_line[c-parser-pyloop] __________
parser = <aiohttp._http_parser.HttpRequestParser object at 0x7fa7c305b0d0>
@pytest.mark.usefixtures("xfail_c_parser_url")
def test_http_request_parser_utf8_request_line(parser) -> None:
> messages, upgrade, tail = parser.feed_data(
# note the truncated unicode sequence
b"GET /P\xc3\xbcnktchen\xa0\xef\xb7 HTTP/1.1\r\n" +
# for easier grep: ASCII 0xA0 more commonly known as non-breaking space
# note the leading and trailing spaces
"sTeP: \N{latin small letter sharp s}nek\t\N{no-break space} "
"\r\n\r\n".encode()
)
parser = <aiohttp._http_parser.HttpRequestParser object at 0x7fa7c305b0d0>
tests/test_http_parser.py:887:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> raise ex
E aiohttp.http_exceptions.InvalidURLError: 400, message:
E Invalid char in url path:
E
E b'GET /P\xc3\xbcnktchen\xa0\xef\xb7 HTTP/1.1'
E ^
aiohttp/_http_parser.pyx:563: InvalidURLError
_____________________ test_parse_uri_utf8[c-parser-pyloop] _____________________
parser = <aiohttp._http_parser.HttpRequestParser object at 0x7fa7c305b0d0>
def test_parse_uri_utf8(parser) -> None:
if not isinstance(parser, HttpRequestParserPy):
> pytest.xfail("Not valid HTTP. Maybe update py-parser to reject later.")
E _pytest.outcomes.XFailed: Not valid HTTP. Maybe update py-parser to reject later.
parser = <aiohttp._http_parser.HttpRequestParser object at 0x7fa7c305b0d0>
tests/test_http_parser.py:1519: XFailed
____________________ test_http10_keep_alive_default[pyloop] ____________________
aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fa7c0b88ee0>
@pytest.mark.xfail
async def test_http10_keep_alive_default(aiohttp_client) -> None:
async def handler(request):
return web.Response()
app = web.Application()
app.router.add_get("/", handler)
client = await aiohttp_client(app, version=HttpVersion10)
resp = await client.get("/")
assert 200 == resp.status
assert resp.version == HttpVersion10
> assert resp.headers["Connection"] == "keep-alive"
E KeyError: 'Connection'
aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fa7c0b88ee0>
app = <Application 0x7fa7c0a98b50>
client = <aiohttp.test_utils.TestClient object at 0x7fa7c0a98940>
handler = <function test_http10_keep_alive_default.<locals>.handler at 0x7fa7c0b883a0>
resp = <ClientResponse(http://127.0.0.1:46763/) [200 OK]>
<CIMultiDictProxy('Content-Length': '0', 'Date': 'Mon, 30 Sep 2024 08:14:30 GMT', 'Server': 'Python/3.10 aiohttp/3.10.8')>
tests/test_web_functional.py:711: KeyError
============================= slowest 10 durations =============================
9.53s call tests/test_run_app.py::TestShutdown::test_shutdown_new_conn_rejected
4.02s call tests/test_run_app.py::TestShutdown::test_shutdown_pending_handler_responds
3.00s call tests/test_web_request.py::test_ctor
2.96s call tests/test_web_request.py::test_base_ctor
2.51s call tests/test_run_app.py::TestShutdown::test_shutdown_wait_for_handler
2.41s call tests/test_run_app.py::TestShutdown::test_shutdown_handler_cancellation_suppressed
2.01s call tests/test_client_functional.py::test_read_timeout_between_chunks[pyloop]
2.00s call tests/test_client_functional.py::test_set_cookies_max_age[pyloop]
1.61s call tests/test_run_app.py::TestShutdown::test_shutdown_timeout_handler
1.52s call tests/test_run_app.py::TestShutdown::test_shutdown_timeout_not_reached
=========================== short test summary info ============================
SKIPPED [1] tests/test_client_request.py:1224: Needs Task.cancelling()
SKIPPED [1] tests/test_client_session.py:902: The check is applied in DEBUG mode only
SKIPPED [1] tests/test_connector.py:2294: Proactor Event loop present only in Windows
SKIPPED [1] tests/test_connector.py:2302: Proactor Event loop present only in Windows
SKIPPED [1] tests/test_connector.py:2313: Proactor Event loop present only in Windows
SKIPPED [1] tests/test_connector.py:2505: Proactor Event loop present only in Windows
SKIPPED [1] tests/test_helpers.py:400: Python 3.11+ is required for .cancelling()
SKIPPED [1] tests/test_helpers.py:419: Python 3.11+ is required for .cancelling()
SKIPPED [1] tests/test_multipart_helpers.py:99: need more smart parser which respects quoted text
SKIPPED [1] tests/test_multipart_helpers.py:446: should raise decoding error: %82 is invalid for latin1
SKIPPED [1] tests/test_multipart_helpers.py:455: should raise decoding error: %E4 is invalid for utf-8
SKIPPED [1] tests/test_multipart_helpers.py:510: urllib.parse.unquote is tolerate to standalone % chars
SKIPPED [1] tests/test_multipart_helpers.py:519: urllib.parse.unquote is tolerate to standalone % chars
SKIPPED [4] tests/test_proxy_functional.py:93: asyncio on this python does not support TLS in TLS
SKIPPED [1] tests/test_proxy_functional.py:390: we need to reconsider how we test this
SKIPPED [1] tests/test_proxy_functional.py:411: we need to reconsider how we test this
SKIPPED [1] tests/test_resolver.py:353: aiodns <3.2.0 required
SKIPPED [1] tests/test_web_app.py:365: The check is applied in DEBUG mode only
SKIPPED [1] tests/test_web_functional.py:192: Needs Task.cancelling()
SKIPPED [1] tests/test_web_runner.py:121: Proactor Event loop present only in Windows
SKIPPED [1] tests/test_web_runner.py:133: Proactor Event loop present only in Windows
XFAIL tests/test_client_functional.py::test_broken_connection[pyloop]
XFAIL tests/test_connector.py::test_del_with_scheduled_cleanup[pyloop]
XFAIL tests/test_http_parser.py::test_parse_unusual_request_line[c-parser-pyloop] - Regression test for Py parser. May match C behaviour later.
XFAIL tests/test_http_parser.py::test_http_request_parser_utf8_request_line[c-parser-pyloop] - Regression test for Py parser. May match C behaviour later.
XFAIL tests/test_http_parser.py::test_parse_uri_utf8[c-parser-pyloop] - reason: Not valid HTTP. Maybe update py-parser to reject later.
XFAIL tests/test_web_functional.py::test_http10_keep_alive_default[pyloop]
FAILED tests/test_circular_imports.py::test_no_warnings[aiohttp._helpers] - s...
FAILED tests/test_circular_imports.py::test_no_warnings[aiohttp._http_parser]
FAILED tests/test_circular_imports.py::test_no_warnings[aiohttp._http_writer]
FAILED tests/test_circular_imports.py::test_no_warnings[aiohttp._websocket]
FAILED tests/test_client_request.py::test_host_header_ipv6[pyloop-True] - Att...
FAILED tests/test_imports.py::test_import_time - assert 237 < 200
FAILED tests/test_websocket_writer.py::test_send_compress_text - AssertionErr...
FAILED tests/test_websocket_writer.py::test_send_compress_text_notakeover - p...
= 8 failed, 3281 passed, 24 skipped, 6 deselected, 6 xfailed in 200.65s (0:03:20) =
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-6787b94c-080e-4104-94af-84c66e14b1df/test_static_directory_without_0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_static_directory_without_0'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-6787b94c-080e-4104-94af-84c66e14b1df/test_static_directory_without_1
<class 'OSError'>: [Errno 39] Directory not empty: 'test_static_directory_without_1'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-6787b94c-080e-4104-94af-84c66e14b1df
<class 'OSError'>: [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-6787b94c-080e-4104-94af-84c66e14b1df'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-637d6ce5-2d4c-4955-b573-b49b414e1c05/test_static_directory_without_0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_static_directory_without_0'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-637d6ce5-2d4c-4955-b573-b49b414e1c05/test_static_directory_without_1
<class 'OSError'>: [Errno 39] Directory not empty: 'test_static_directory_without_1'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-637d6ce5-2d4c-4955-b573-b49b414e1c05
<class 'OSError'>: [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-637d6ce5-2d4c-4955-b573-b49b414e1c05'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-e11b7bb7-d626-4aa2-ba98-6057b1bc7a0d/test_static_directory_without_0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_static_directory_without_0'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-e11b7bb7-d626-4aa2-ba98-6057b1bc7a0d/test_static_directory_without_1
<class 'OSError'>: [Errno 39] Directory not empty: 'test_static_directory_without_1'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-e11b7bb7-d626-4aa2-ba98-6057b1bc7a0d
<class 'OSError'>: [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-e11b7bb7-d626-4aa2-ba98-6057b1bc7a0d'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-943f1cc8-8d89-4fda-b770-5c60f322022b/test_static_directory_without_0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_static_directory_without_0'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-943f1cc8-8d89-4fda-b770-5c60f322022b/test_static_directory_without_1
<class 'OSError'>: [Errno 39] Directory not empty: 'test_static_directory_without_1'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-943f1cc8-8d89-4fda-b770-5c60f322022b
<class 'OSError'>: [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-943f1cc8-8d89-4fda-b770-5c60f322022b'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-edc16228-6185-4668-8703-a098f8ea5bd6/test_static_directory_without_0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_static_directory_without_0'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-edc16228-6185-4668-8703-a098f8ea5bd6/test_static_directory_without_1
<class 'OSError'>: [Errno 39] Directory not empty: 'test_static_directory_without_1'
warnings.warn(
/usr/lib/python3.10/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-edc16228-6185-4668-8703-a098f8ea5bd6
<class 'OSError'>: [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-edc16228-6185-4668-8703-a098f8ea5bd6'
warnings.warn( |
Describe the bug
A clear and concise description of what the bug is.
Checklist
pip check
passes without errorspip freeze
resultsI'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesinstaller
modulecut off from access to the public network
(pytest is executed with-m "not network"
)List of installed modules in build env:
Please let me know if you need more details or want me to perform some diagnostics.
The text was updated successfully, but these errors were encountered: