aio-libs / aiohttp

Asynchronous HTTP client/server framework for asyncio and Python
https://docs.aiohttp.org
Other
15.12k stars 2.02k forks source link

3.8.1: pytest is failing #6897

Closed kloczek closed 2 years ago

kloczek commented 2 years ago

Describe the bug

pytest is failing in 7 units.

To Reproduce

As I'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.

Expected behavior

pytest should not fail.

Logs/tracebacks

Will include in next comment.

Python Version

3.8.13

aiohttp Version

3.8.1

multidict Version

6.0.2

yarl Version

1.8.1

OS

Linux x86/64

Additional context

Here is list of installed modules in build env

```console Package Version ------------------------------ ----------------- aiosignal 1.2.0 alabaster 0.7.12 apeye 1.2.0 appdirs 1.4.4 asttokens 2.0.5 async-generator 1.10 async-timeout 4.0.2 attrs 22.1.0 autodocsumm 0.2.9 Babel 2.10.2 backcall 0.2.0 beautifulsoup4 4.11.1 bleach 5.0.0 Brlapi 0.8.3 Brotli 1.0.9 build 0.8.0 CacheControl 0.12.11 charset-normalizer 2.1.0 click 8.1.3 codespell 2.1.0 coincidence 0.6.2 consolekit 1.4.1 coverage 6.4.4 cssselect 1.1.0 cssutils 2.6.0 Cython 0.29.32 debugpy 1.6.3 decorator 5.1.1 defusedxml 0.7.1 deprecation 2.1.0 deprecation-alias 0.3.1 dict2css 0.3.0 dist-meta 0.5.0 distro 1.7.0 docutils 0.18.1 dom_toml 0.6.0 domdf-python-tools 3.2.2.post1 entrypoints 0.4 executing 0.8.3 extras 1.0.0 extras-require 0.4.3 Faker 14.1.0 fastjsonschema 2.16.1 fixtures 4.0.0 freezegun 1.2.1 frozenlist 1.3.1 funcy 1.17 gpg 1.17.1-unknown handy-archives 0.1.2 html5lib 1.1 idna 3.3 imagesize 1.4.1 importlib-metadata 4.12.0 importlib-resources 5.9.0 iniconfig 1.1.1 ipykernel 6.15.1 ipython 8.4.0 ipython-genutils 0.2.0 ipywidgets 7.7.0 jedi 0.18.1 Jinja2 3.1.1 jsonschema 4.13.0 jupyter_client 7.3.5 jupyter_core 4.11.1 jupyterlab-pygments 0.1.2 jupytext 1.14.1 latexcodec 2.0.1 libcomps 0.1.18 lockfile 0.12.2 louis 3.22.0 lxml 4.9.1 markdown-it-py 2.1.0 MarkupSafe 2.1.1 matplotlib-inline 0.1.5 mdit-py-plugins 0.3.0 mdurl 0.1.1 mistletoe 0.9.0 mistune 2.0.3 msgpack 1.0.4 multidict 6.0.2 natsort 8.0.2 nbclient 0.6.7 nbconvert 7.0.0 nbformat 5.4.0 nest-asyncio 1.5.5 numpy 1.23.1 packaging 21.3 pandas 1.4.2 pandocfilters 1.5.0 parso 0.8.3 pbr 5.9.0 pep517 0.12.0 pexpect 4.8.0 pickleshare 0.7.5 pip 22.2.1 pkgutil_resolve_name 1.3.10 platformdirs 2.5.2 pluggy 1.0.0 prompt-toolkit 3.0.29 psutil 5.9.0 ptyprocess 0.7.0 pure-eval 0.2.2 py 1.11.0 pybtex 0.24.0 pybtex-docutils 1.0.2 Pygments 2.13.0 PyGObject 3.42.2 pyparsing 3.0.9 pyrsistent 0.18.1 pytest 7.1.2 pytest-cov 3.0.0 pytest-datadir 1.3.1 pytest-mock 3.8.2 pytest-regressions 2.3.1 pytest-timeout 2.1.0 python-dateutil 2.8.2 pytz 2022.1 PyYAML 6.0 pyzmq 23.2.0 re-assert 1.1.0 regex 2022.6.2 requests 2.28.1 rpm 4.17.0 ruamel.yaml 0.17.21 ruamel.yaml.clib 0.2.6 scour 0.38.2 setuptools 65.3.0 shippinglabel 1.4.1 six 1.16.0 snowballstemmer 2.2.0 soupsieve 2.3.2.post1 Sphinx 5.1.1 sphinx-autodoc-typehints 1.19.2 sphinx-codeautolink 0.10.0 sphinx-gallery 0.11.1 sphinx-jinja2-compat 0.1.2 sphinx-last-updated-by-git 0.3.3 sphinx-prompt 1.4.0 sphinx-pyproject 0.1.0 sphinx-tabs 3.4.1 sphinx-toolbox 3.1.2 sphinxcontrib-applehelp 1.0.2.dev20220730 sphinxcontrib-asyncio 0.3.0 sphinxcontrib-bibtex 2.5.0 sphinxcontrib-devhelp 1.0.2.dev20220730 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-jsmath 1.0.1.dev20220730 sphinxcontrib-qthelp 1.0.3.dev20220730 sphinxcontrib-serializinghtml 1.1.5 sphinxcontrib-svg2pdfconverter 1.2.0 stack-data 0.4.0 tabulate 0.8.9 testtools 2.5.0 tinycss2 1.1.1 toml 0.10.2 tomli 2.0.1 tornado 6.2 traitlets 5.3.0 typing_extensions 4.2.0 urllib3 1.26.12 wcwidth 0.2.5 webencodings 0.5.1 wheel 0.37.1 widgetsnbextension 4.0.2 yarl 1.8.1 zipp 3.8.1 ```

Code of Conduct

kloczek commented 2 years ago

Here is pytest output

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -q -p no:randomly --ignore tests/test_proxy_functional.py =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/aiohttp-3.8.1, configfile: setup.cfg, testpaths: tests/ plugins: datadir-1.3.1, regressions-2.3.1, timeout-2.1.0, Faker-14.1.0, cov-3.0.0, mock-3.8.2 collected 2510 items / 2 skipped tests/test___all__.py .. [ 0%] tests/test_base_protocol.py .............. [ 0%] tests/test_classbasedview.py .... [ 0%] tests/test_client_connection.py ......... [ 1%] tests/test_client_exceptions.py ........................... [ 2%] tests/test_client_fingerprint.py ............ [ 2%] tests/test_client_functional.py ...............xxx....................................................................................x...................xxxFFF.... [ 7%] .x..............x.......... [ 9%] tests/test_client_proto.py .......... [ 9%] tests/test_client_request.py .....................................................................................................................x.... [ 14%] tests/test_client_response.py ........................................................ [ 16%] tests/test_client_session.py ..........................................s...FF...... [ 18%] tests/test_client_ws.py ........................... [ 19%] tests/test_client_ws_functional.py ............................... [ 20%] tests/test_connector.py ....x..................................................................................................sss..xx..s........... [ 25%] tests/test_cookiejar.py ........................................... [ 27%] tests/test_flowcontrol_streams.py ............. [ 28%] tests/test_formdata.py .......... [ 28%] tests/test_helpers.py ................................................................................................... [ 32%] tests/test_http_exceptions.py ................... [ 33%] tests/test_http_parser.py .......................................................................................................................................... [ 38%] ............................................. [ 40%] tests/test_http_writer.py .................... [ 41%] tests/test_locks.py ... [ 41%] tests/test_loop.py ..... [ 41%] tests/test_multipart.py ........................................................................................................ [ 45%] tests/test_multipart_helpers.py ...............s.................................................ss......ss............................ [ 49%] tests/test_payload.py .............. [ 50%] tests/test_proxy.py .......s........ [ 51%] tests/test_pytest_plugin.py .... [ 51%] tests/test_resolver.py ssssssss.....s.sss.. [ 52%] tests/test_route_def.py ..................... [ 52%] tests/test_run_app.py ............................................... [ 54%] tests/test_streams.py ....................................................................................................... [ 58%] tests/test_tcp_helpers.py ...... [ 59%] tests/test_test_utils.py ............................................... [ 60%] tests/test_tracing.py ................... [ 61%] tests/test_urldispatch.py .......................................................................................................................................... [ 67%] .. [ 67%] tests/test_web_app.py .......................s........... [ 68%] tests/test_web_cli.py .......... [ 69%] tests/test_web_exceptions.py ................. [ 69%] tests/test_web_functional.py ...........................x................................................................................... [ 74%] tests/test_web_log.py ......... [ 74%] tests/test_web_middleware.py ................................................................................................................... [ 79%] tests/test_web_request.py ..........................................................................s............................ [ 83%] tests/test_web_request_handler.py .... [ 83%] tests/test_web_response.py ................................................................................................................................... [ 88%] tests/test_web_runner.py ..........ss.. [ 89%] tests/test_web_sendfile.py ..... [ 89%] tests/test_web_sendfile_functional.py ................................................x..................................... [ 92%] tests/test_web_server.py ........ [ 93%] tests/test_web_urldispatcher.py ...........................xxx [ 94%] tests/test_web_websocket.py ............................................ [ 96%] tests/test_web_websocket_functional.py ......................... [ 97%] tests/test_websocket_handshake.py .................... [ 97%] tests/test_websocket_parser.py .......................................... [ 99%] tests/test_websocket_writer.py ........FF. [100%] ================================================================================= FAILURES ================================================================================= _________________________________________________________________________ test_async_with_session __________________________________________________________________________ async def test_async_with_session() -> None: > with pytest.warns(None) as cm: tests/test_client_functional.py:2431: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = WarningsChecker(record=True), expected_warning = None, match_expr = None def __init__( self, expected_warning: Optional[ Union[Type[Warning], Tuple[Type[Warning], ...]] ] = Warning, match_expr: Optional[Union[str, Pattern[str]]] = None, *, _ispytest: bool = False, ) -> None: check_ispytest(_ispytest) super().__init__(_ispytest=True) msg = "exceptions must be derived from Warning, not %s" if expected_warning is None: > warnings.warn(WARNS_NONE_ARG, stacklevel=4) E pytest.PytestRemovedIn8Warning: Passing None has been deprecated. E See https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests for alternatives in common use cases. __class__ = _ispytest = True expected_warning = None match_expr = None msg = 'exceptions must be derived from Warning, not %s' self = WarningsChecker(record=True) /usr/lib/python3.8/site-packages/_pytest/recwarn.py:246: PytestRemovedIn8Warning _______________________________________________________________________ test_session_close_awaitable _______________________________________________________________________ async def test_session_close_awaitable() -> None: session = aiohttp.ClientSession() > with pytest.warns(None) as cm: session = tests/test_client_functional.py:2441: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/_pytest/recwarn.py:246: in __init__ warnings.warn(WARNS_NONE_ARG, stacklevel=4) __class__ = _ispytest = True expected_warning = None match_expr = None msg = 'exceptions must be derived from Warning, not %s' self = WarningsChecker(record=True) /usr/lib/python3.8/site-packages/_pytest/runner.py:338: in from_call result: Optional[TResult] = func() cls = duration = 0.0005759038031101227 excinfo = func = . at 0x7fe442eb8af0> precise_start = 7261740.117630785 precise_stop = 7261740.118206689 reraise = (, ) result = None start = 1661610472.2424803 stop = 1661610472.2430575 when = 'call' /usr/lib/python3.8/site-packages/_pytest/runner.py:259: in lambda: ihook(item=item, **kwds), when=when, reraise=reraise ihook = <_HookCaller 'pytest_runtest_call'> item = kwds = {} /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265: in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) argname = 'item' args = () firstresult = False kwargs = {'item': } self = <_HookCaller 'pytest_runtest_call'> /usr/lib/python3.8/site-packages/pluggy/_manager.py:80: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_call' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fe446c1bfa0> /usr/lib/python3.8/site-packages/_pytest/runner.py:174: in pytest_runtest_call raise e item = /usr/lib/python3.8/site-packages/_pytest/runner.py:166: in pytest_runtest_call item.runtest() item = /usr/lib/python3.8/site-packages/_pytest/python.py:1767: in runtest self.ihook.pytest_pyfunc_call(pyfuncitem=self) self = /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265: in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) argname = 'pyfuncitem' args = () firstresult = True kwargs = {'pyfuncitem': } self = <_HookCaller 'pytest_pyfunc_call'> /usr/lib/python3.8/site-packages/pluggy/_manager.py:80: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_pyfunc_call' kwargs = {'pyfuncitem': } methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fe446c1bfa0> ../../BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib64/python3.8/site-packages/aiohttp/pytest_plugin.py:186: in pytest_pyfunc_call _loop.run_until_complete(pyfuncitem.obj(**testargs)) _loop = <_UnixSelectorEventLoop running=False closed=False debug=False> existing_loop = None fast = False pyfuncitem = testargs = {} /usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result() future = new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> tests/test_client_functional.py:2431: in test_async_with_session with pytest.warns(None) as cm: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = WarningsChecker(record=True), expected_warning = None, match_expr = None def __init__( self, expected_warning: Optional[ Union[Type[Warning], Tuple[Type[Warning], ...]] ] = Warning, match_expr: Optional[Union[str, Pattern[str]]] = None, *, _ispytest: bool = False, ) -> None: check_ispytest(_ispytest) super().__init__(_ispytest=True) msg = "exceptions must be derived from Warning, not %s" if expected_warning is None: > warnings.warn(WARNS_NONE_ARG, stacklevel=4) E pytest.PytestRemovedIn8Warning: Passing None has been deprecated. E See https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests for alternatives in common use cases. __class__ = _ispytest = True expected_warning = None match_expr = None msg = 'exceptions must be derived from Warning, not %s' self = WarningsChecker(record=True) /usr/lib/python3.8/site-packages/_pytest/recwarn.py:246: PytestRemovedIn8Warning _______________________________________________________________ test_close_run_until_complete_not_deprecated _______________________________________________________________ async def test_close_run_until_complete_not_deprecated() -> None: session = aiohttp.ClientSession() > with pytest.warns(None) as cm: session = tests/test_client_functional.py:2451: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/_pytest/recwarn.py:246: in __init__ warnings.warn(WARNS_NONE_ARG, stacklevel=4) __class__ = _ispytest = True expected_warning = None match_expr = None msg = 'exceptions must be derived from Warning, not %s' self = WarningsChecker(record=True) /usr/lib/python3.8/site-packages/_pytest/runner.py:338: in from_call result: Optional[TResult] = func() cls = duration = 0.0007045837119221687 excinfo = func = . at 0x7fe446c36dc0> precise_start = 7261740.200884248 precise_stop = 7261740.201588832 reraise = (, ) result = None start = 1661610472.325734 stop = 1661610472.3264394 when = 'call' /usr/lib/python3.8/site-packages/_pytest/runner.py:259: in lambda: ihook(item=item, **kwds), when=when, reraise=reraise ihook = <_HookCaller 'pytest_runtest_call'> item = kwds = {} /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265: in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) argname = 'item' args = () firstresult = False kwargs = {'item': } self = <_HookCaller 'pytest_runtest_call'> /usr/lib/python3.8/site-packages/pluggy/_manager.py:80: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_call' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fe446c1bfa0> /usr/lib/python3.8/site-packages/_pytest/runner.py:174: in pytest_runtest_call raise e item = /usr/lib/python3.8/site-packages/_pytest/runner.py:166: in pytest_runtest_call item.runtest() item = /usr/lib/python3.8/site-packages/_pytest/python.py:1767: in runtest self.ihook.pytest_pyfunc_call(pyfuncitem=self) self = /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265: in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) argname = 'pyfuncitem' args = () firstresult = True kwargs = {'pyfuncitem': } self = <_HookCaller 'pytest_pyfunc_call'> /usr/lib/python3.8/site-packages/pluggy/_manager.py:80: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_pyfunc_call' kwargs = {'pyfuncitem': } methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fe446c1bfa0> ../../BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib64/python3.8/site-packages/aiohttp/pytest_plugin.py:186: in pytest_pyfunc_call _loop.run_until_complete(pyfuncitem.obj(**testargs)) _loop = <_UnixSelectorEventLoop running=False closed=False debug=False> existing_loop = None fast = False pyfuncitem = testargs = {} /usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result() future = new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> tests/test_client_functional.py:2441: in test_session_close_awaitable with pytest.warns(None) as cm: session = /usr/lib/python3.8/site-packages/_pytest/recwarn.py:246: in __init__ warnings.warn(WARNS_NONE_ARG, stacklevel=4) __class__ = _ispytest = True expected_warning = None match_expr = None msg = 'exceptions must be derived from Warning, not %s' self = WarningsChecker(record=True) /usr/lib/python3.8/site-packages/_pytest/runner.py:338: in from_call result: Optional[TResult] = func() cls = duration = 0.0005759038031101227 excinfo = func = . at 0x7fe442eb8af0> precise_start = 7261740.117630785 precise_stop = 7261740.118206689 reraise = (, ) result = None start = 1661610472.2424803 stop = 1661610472.2430575 when = 'call' /usr/lib/python3.8/site-packages/_pytest/runner.py:259: in lambda: ihook(item=item, **kwds), when=when, reraise=reraise ihook = <_HookCaller 'pytest_runtest_call'> item = kwds = {} /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265: in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) argname = 'item' args = () firstresult = False kwargs = {'item': } self = <_HookCaller 'pytest_runtest_call'> /usr/lib/python3.8/site-packages/pluggy/_manager.py:80: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_call' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fe446c1bfa0> /usr/lib/python3.8/site-packages/_pytest/runner.py:174: in pytest_runtest_call raise e item = /usr/lib/python3.8/site-packages/_pytest/runner.py:166: in pytest_runtest_call item.runtest() item = /usr/lib/python3.8/site-packages/_pytest/python.py:1767: in runtest self.ihook.pytest_pyfunc_call(pyfuncitem=self) self = /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265: in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) argname = 'pyfuncitem' args = () firstresult = True kwargs = {'pyfuncitem': } self = <_HookCaller 'pytest_pyfunc_call'> /usr/lib/python3.8/site-packages/pluggy/_manager.py:80: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_pyfunc_call' kwargs = {'pyfuncitem': } methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fe446c1bfa0> ../../BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib64/python3.8/site-packages/aiohttp/pytest_plugin.py:186: in pytest_pyfunc_call _loop.run_until_complete(pyfuncitem.obj(**testargs)) _loop = <_UnixSelectorEventLoop running=False closed=False debug=False> existing_loop = None fast = False pyfuncitem = testargs = {} /usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result() future = new_task = True self = <_UnixSelectorEventLoop running=False closed=False debug=False> tests/test_client_functional.py:2431: in test_async_with_session with pytest.warns(None) as cm: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = WarningsChecker(record=True), expected_warning = None, match_expr = None def __init__( self, expected_warning: Optional[ Union[Type[Warning], Tuple[Type[Warning], ...]] ] = Warning, match_expr: Optional[Union[str, Pattern[str]]] = None, *, _ispytest: bool = False, ) -> None: check_ispytest(_ispytest) super().__init__(_ispytest=True) msg = "exceptions must be derived from Warning, not %s" if expected_warning is None: > warnings.warn(WARNS_NONE_ARG, stacklevel=4) E pytest.PytestRemovedIn8Warning: Passing None has been deprecated. E See https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests for alternatives in common use cases. __class__ = _ispytest = True expected_warning = None match_expr = None msg = 'exceptions must be derived from Warning, not %s' self = WarningsChecker(record=True) /usr/lib/python3.8/site-packages/_pytest/recwarn.py:246: PytestRemovedIn8Warning _____________________________________________________________________ test_client_session_timeout_zero _____________________________________________________________________ self = , req = , traces = [] timeout = ClientTimeout(total=10, connect=0, sock_read=0, sock_connect=0) async def _create_direct_connection( self, req: "ClientRequest", traces: List["Trace"], timeout: "ClientTimeout", *, client_error: Type[Exception] = ClientConnectorError, ) -> Tuple[asyncio.Transport, ResponseHandler]: sslcontext = self._get_ssl_context(req) fingerprint = self._get_fingerprint(req) host = req.url.raw_host assert host is not None port = req.port assert port is not None host_resolved = asyncio.ensure_future( self._resolve_host(host, port, traces=traces), loop=self._loop ) try: # Cancelling this lookup should not cancel the underlying lookup # or else the cancel event will get broadcast to all the waiters # across all connections. > hosts = await asyncio.shield(host_resolved) client_error = fingerprint = None host = 'example.com' host_resolved = exception=gaierror(-2, 'Name or service not known')> port = 80 req = self = sslcontext = None timeout = ClientTimeout(total=10, connect=0, sock_read=0, sock_connect=0) traces = [] ../../BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib64/python3.8/site-packages/aiohttp/connector.py:1154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , host = 'example.com', port = 80, traces = [] async def _resolve_host( self, host: str, port: int, traces: Optional[List["Trace"]] = None ) -> List[Dict[str, Any]]: if is_ip_address(host): return [ { "hostname": host, "host": host, "port": port, "family": self._family, "proto": 0, "flags": 0, } ] if not self._use_dns_cache: if traces: for trace in traces: await trace.send_dns_resolvehost_start(host) res = await self._resolver.resolve(host, port, family=self._family) if traces: for trace in traces: await trace.send_dns_resolvehost_end(host) return res key = (host, port) if (key in self._cached_hosts) and (not self._cached_hosts.expired(key)): # get result early, before any await (#4014) result = self._cached_hosts.next_addrs(key) if traces: for trace in traces: await trace.send_dns_cache_hit(host) return result if key in self._throttle_dns_events: # get event early, before any await (#4014) event = self._throttle_dns_events[key] if traces: for trace in traces: await trace.send_dns_cache_hit(host) await event.wait() else: # update dict early, before any await (#4014) self._throttle_dns_events[key] = EventResultOrError(self._loop) if traces: for trace in traces: await trace.send_dns_cache_miss(host) try: if traces: for trace in traces: await trace.send_dns_resolvehost_start(host) > addrs = await self._resolver.resolve(host, port, family=self._family) host = 'example.com' key = ('example.com', 80) port = 80 self = traces = [] ../../BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib64/python3.8/site-packages/aiohttp/connector.py:880: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , hostname = 'example.com', port = 80, family = 0 async def resolve( self, hostname: str, port: int = 0, family: int = socket.AF_INET ) -> List[Dict[str, Any]]: > infos = await self._loop.getaddrinfo( hostname, port, type=socket.SOCK_STREAM, family=family, flags=socket.AI_ADDRCONFIG, ) family = 0 hostname = 'example.com' port = 80 self = ../../BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib64/python3.8/site-packages/aiohttp/resolver.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False>, host = 'example.com', port = 80 async def getaddrinfo(self, host, port, *, family=0, type=0, proto=0, flags=0): if self._debug: getaddr_func = self._getaddrinfo_debug else: getaddr_func = socket.getaddrinfo > return await self.run_in_executor( None, getaddr_func, host, port, family, type, proto, flags) family = 0 flags = getaddr_func = host = 'example.com' port = 80 proto = 0 self = <_UnixSelectorEventLoop running=False closed=False debug=False> type = /usr/lib64/python3.8/asyncio/base_events.py:825: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = None def run(self): if not self.future.set_running_or_notify_cancel(): return try: > result = self.fn(*self.args, **self.kwargs) self = None /usr/lib64/python3.8/concurrent/futures/thread.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ host = 'example.com', port = 80, family = 0, type = , proto = 0, flags = def getaddrinfo(host, port, family=0, type=0, proto=0, flags=0): """Resolve host and port into list of address info entries. Translate the host/port argument into a sequence of 5-tuples that contain all the necessary arguments for creating a socket connected to that service. host is a domain name, a string representation of an IPv4/v6 address or None. port is a string service name such as 'http', a numeric port number or None. By passing None as the value of host and port, you can pass NULL to the underlying C API. The family, type and proto arguments can be optionally specified in order to narrow the list of addresses returned. Passing zero as a value for each of these arguments selects the full range of results. """ # We override this function since we want to translate the numeric family # and socket type values to enum constants. addrlist = [] > for res in _socket.getaddrinfo(host, port, family, type, proto, flags): E socket.gaierror: [Errno -2] Name or service not known addrlist = [] family = 0 flags = host = 'example.com' port = 80 proto = 0 type = /usr/lib64/python3.8/socket.py:918: gaierror The above exception was the direct cause of the following exception: async def test_client_session_timeout_zero() -> None: timeout = client.ClientTimeout(total=10, connect=0, sock_connect=0, sock_read=0) try: async with ClientSession(timeout=timeout) as session: > await session.get("http://example.com") session = timeout = ClientTimeout(total=10, connect=0, sock_read=0, sock_connect=0) tests/test_client_session.py:841: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib64/python3.8/site-packages/aiohttp/client.py:535: in _request conn = await self._connector.connect( all_cookies = allow_redirects = True auth = None auth_from_url = None chunked = None compress = None cookies = None data = None expect100 = False fingerprint = None handle = None headers = history = [] json = None max_redirects = 10 method = 'GET' params = None proxy = None proxy_auth = None proxy_headers = raise_for_status = None read_bufsize = 65536 read_until_eof = True real_timeout = ClientTimeout(total=10, connect=0, sock_read=0, sock_connect=0) redirects = 0 req = self = skip_auto_headers = None skip_headers = set() ssl = None ssl_context = None str_or_url = 'http://example.com' timeout = timer = tm = trace_request_ctx = None traces = [] url = URL('http://example.com') verify_ssl = None version = HttpVersion(major=1, minor=1) ../../BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib64/python3.8/site-packages/aiohttp/connector.py:542: in connect proto = await self._create_connection(req, traces, timeout) available = 100 key = ConnectionKey(host='example.com', port=80, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None) placeholder = proto = None req = self = timeout = ClientTimeout(total=10, connect=0, sock_read=0, sock_connect=0) traces = [] ../../BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib64/python3.8/site-packages/aiohttp/connector.py:907: in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) req = self = timeout = ClientTimeout(total=10, connect=0, sock_read=0, sock_connect=0) traces = [] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , req = , traces = [] timeout = ClientTimeout(total=10, connect=0, sock_read=0, sock_connect=0) async def _create_direct_connection( self, req: "ClientRequest", traces: List["Trace"], timeout: "ClientTimeout", *, client_error: Type[Exception] = ClientConnectorError, ) -> Tuple[asyncio.Transport, ResponseHandler]: sslcontext = self._get_ssl_context(req) fingerprint = self._get_fingerprint(req) host = req.url.raw_host assert host is not None port = req.port assert port is not None host_resolved = asyncio.ensure_future( self._resolve_host(host, port, traces=traces), loop=self._loop ) try: # Cancelling this lookup should not cancel the underlying lookup # or else the cancel event will get broadcast to all the waiters # across all connections. hosts = await asyncio.shield(host_resolved) except asyncio.CancelledError: def drop_exception(fut: "asyncio.Future[List[Dict[str, Any]]]") -> None: with suppress(Exception, asyncio.CancelledError): fut.result() host_resolved.add_done_callback(drop_exception) raise except OSError as exc: # in case of proxy it is not ClientProxyConnectionError # it is problem of resolving proxy ip itself > raise ClientConnectorError(req.connection_key, exc) from exc E aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host example.com:80 ssl:default [Name or service not known] client_error = fingerprint = None host = 'example.com' host_resolved = exception=gaierror(-2, 'Name or service not known')> port = 80 req = self = sslcontext = None timeout = ClientTimeout(total=10, connect=0, sock_read=0, sock_connect=0) traces = [] ../../BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib64/python3.8/site-packages/aiohttp/connector.py:1166: ClientConnectorError ____________________________________________________________________ test_requote_redirect_url_default _____________________________________________________________________ cls = , func = . at 0x7fe44403aa60>, when = 'call' reraise = (, ) @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 = duration = 0.04379580356180668 excinfo = \n') tblen=6> func = . at 0x7fe44403aa60> precise_start = 7261750.534744493 precise_stop = 7261750.578540296 reraise = (, ) result = None start = 1661610482.6595943 stop = 1661610482.7033913 when = 'call' /usr/lib/python3.8/site-packages/_pytest/runner.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/_pytest/runner.py:259: in lambda: ihook(item=item, **kwds), when=when, reraise=reraise ihook = <_HookCaller 'pytest_runtest_call'> item = kwds = {} /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265: in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) argname = 'item' args = () firstresult = False kwargs = {'item': } self = <_HookCaller 'pytest_runtest_call'> /usr/lib/python3.8/site-packages/pluggy/_manager.py:80: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_call' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fe446c1bfa0> /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:88: 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: yield 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: E E Traceback (most recent call last): E File "/home/tkloczko/rpmbuild/BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib64/python3.8/site-packages/aiohttp/test_utils.py", line 560, in teardown_test_loop E gc.collect() E ResourceWarning: unclosed cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fe442811a30> err_msg = 'Exception ignored in' msg = 'Exception ignored in: \n\nTr...nResourceWarning: unclosed \n' /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning _________________________________________________________________________ test_send_compress_text __________________________________________________________________________ __wrapped_mock_method__ = , args = (, b'\xc1\x05*\x01b\x00\x00') kwargs = {}, __tracebackhide__ = True msg = "expected call not found.\nExpected: write(b'\\xc1\\x05*\\x01b\\x00\\x00')\nActual: write(b'\\xc1\\x04\\x02a\\x00\\x00...\x00',)\n At index 0 diff: b'\\xc1\\x04\\x02a\\x00\\x00' != b'\\xc1\\x05*\\x01b\\x00\\x00'\n Use -v to get more diff" __mock_self = , actual_args = (b'\xc1\x04\x02a\x00\x00',), actual_kwargs = {} introspection = "\nArgs:\nassert (b'\\xc1\\x04\\x02a\\x00\\x00',) == (b'\\xc1\\x05*\\x01b\\x00\\x00',)\n At index 0 diff: b'\\xc1\\x04\\x02a\\x00\\x00' != b'\\xc1\\x05*\\x01b\\x00\\x00'\n Use -v to get more diff" @py_assert2 = (b'\xc1\x05*\x01b\x00\x00',), @py_assert1 = None @py_format4 = "(b'\\xc1\\x04\\x02a\\x00\\x00',) == (b'\\xc1\\x05*\\x01b\\x00\\x00',)\n~At index 0 diff: b'\\xc1\\x04\\x02a\\x00\\x00' != b'\\xc1\\x05*\\x01b\\x00\\x00'\n~Use -v to get more diff" def assert_wrapper( __wrapped_mock_method__: Callable[..., Any], *args: Any, **kwargs: Any ) -> None: __tracebackhide__ = True try: > __wrapped_mock_method__(*args, **kwargs) __mock_self = __tracebackhide__ = True __wrapped_mock_method__ = actual_args = (b'\xc1\x04\x02a\x00\x00',) actual_kwargs = {} args = (, b'\xc1\x05*\x01b\x00\x00') introspection = "\nArgs:\nassert (b'\\xc1\\x04\\x02a\\x00\\x00',) == (b'\\xc1\\x05*\\x01b\\x00\\x00',)\n At index 0 diff: b'\\xc1\\x04\\x02a\\x00\\x00' != b'\\xc1\\x05*\\x01b\\x00\\x00'\n Use -v to get more diff" kwargs = {} msg = "expected call not found.\nExpected: write(b'\\xc1\\x05*\\x01b\\x00\\x00')\nActual: write(b'\\xc1\\x04\\x02a\\x00\\x00...\x00',)\n At index 0 diff: b'\\xc1\\x04\\x02a\\x00\\x00' != b'\\xc1\\x05*\\x01b\\x00\\x00'\n Use -v to get more diff" /usr/lib/python3.8/site-packages/pytest_mock/plugin.py:432: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = (b'\xc1\x05*\x01b\x00\x00',), kwargs = {}, expected = ((b'\xc1\x05*\x01b\x00\x00',), {}) actual = call(b'\xc1\x04\x02a\x00\x00'), _error_message = ._error_message at 0x7fe440eae280>, 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((args, kwargs)) actual = self._call_matcher(self.call_args) if expected != actual: 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 = ._error_message at 0x7fe440eae280> actual = call(b'\xc1\x04\x02a\x00\x00') args = (b'\xc1\x05*\x01b\x00\x00',) cause = None expected = ((b'\xc1\x05*\x01b\x00\x00',), {}) kwargs = {} self = /usr/lib64/python3.8/unittest/mock.py:913: AssertionError During handling of the above exception, another exception occurred: protocol = , transport = 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 At index 0 diff: b'\xc1\x04\x02a\x00\x00' != b'\xc1\x05*\x01b\x00\x00' E Use -v to get more diff protocol = transport = writer = tests/test_websocket_writer.py:88: AssertionError ____________________________________________________________________ test_send_compress_text_notakeover ____________________________________________________________________ cls = , func = . at 0x7fe440e91c10>, when = 'call' reraise = (, ) @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 = duration = 0.06296697538346052 excinfo = \n') tblen=6> func = . at 0x7fe440e91c10> precise_start = 7261829.199370929 precise_stop = 7261829.262337904 reraise = (, ) result = None start = 1661610561.3242204 stop = 1661610561.387189 when = 'call' /usr/lib/python3.8/site-packages/_pytest/runner.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/_pytest/runner.py:259: in lambda: ihook(item=item, **kwds), when=when, reraise=reraise ihook = <_HookCaller 'pytest_runtest_call'> item = kwds = {} /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265: in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) argname = 'item' args = () firstresult = False kwargs = {'item': } self = <_HookCaller 'pytest_runtest_call'> /usr/lib/python3.8/site-packages/pluggy/_manager.py:80: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_call' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fe446c1bfa0> /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:88: 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: yield 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: E E Traceback (most recent call last): E File "/home/tkloczko/rpmbuild/BUILDROOT/python-aiohttp-3.8.1-9.fc35.x86_64/usr/lib64/python3.8/site-packages/aiohttp/test_utils.py", line 560, in teardown_test_loop E gc.collect() E ResourceWarning: unclosed cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fe440e62790> err_msg = 'Exception ignored in' msg = 'Exception ignored in: \n\nTr...nResourceWarning: unclosed \n' /usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning ---------- coverage: platform linux, python 3.8.13-final-0 ----------- Name Stmts Miss Branch BrPart Cover -------------------------------------------------------------------------- aiohttp/__init__.py 18 1 0 0 94% aiohttp/abc.py 90 6 12 0 94% aiohttp/base_protocol.py 65 52 24 0 17% aiohttp/client.py 472 353 176 1 20% aiohttp/client_exceptions.py 135 61 56 0 60% aiohttp/client_proto.py 146 118 56 0 15% aiohttp/client_reqrep.py 640 483 284 0 18% aiohttp/client_ws.py 206 166 66 0 15% aiohttp/connector.py 700 577 317 0 14% aiohttp/cookiejar.py 256 207 120 0 14% aiohttp/formdata.py 93 76 48 0 13% aiohttp/hdrs.py 94 1 2 1 98% aiohttp/helpers.py 452 281 180 3 33% aiohttp/http.py 11 0 0 0 100% aiohttp/http_exceptions.py 49 20 28 0 66% aiohttp/http_parser.py 477 392 196 1 15% aiohttp/http_websocket.py 379 283 168 0 21% aiohttp/http_writer.py 119 84 54 0 23% aiohttp/locks.py 24 16 6 0 33% aiohttp/log.py 7 0 0 0 100% aiohttp/multipart.py 560 454 248 0 15% aiohttp/payload.py 221 109 86 1 47% aiohttp/payload_streamer.py 29 10 8 0 73% aiohttp/pytest_plugin.py 168 168 44 0 0% aiohttp/resolver.py 68 48 26 0 26% aiohttp/streams.py 393 310 160 0 18% aiohttp/tcp_helpers.py 19 11 6 0 32% aiohttp/test_utils.py 330 330 66 0 0% aiohttp/tracing.py 191 69 36 0 70% aiohttp/typedefs.py 26 1 2 1 93% aiohttp/web.py 117 46 54 11 54% aiohttp/web_app.py 274 117 76 16 52% aiohttp/web_exceptions.py 151 22 122 0 90% aiohttp/web_fileresponse.py 144 120 54 0 13% aiohttp/web_log.py 98 55 20 0 38% aiohttp/web_middlewares.py 56 37 20 0 25% aiohttp/web_protocol.py 337 277 163 0 14% aiohttp/web_request.py 424 276 128 1 28% aiohttp/web_response.py 485 371 218 1 17% aiohttp/web_routedef.py 104 45 14 0 57% aiohttp/web_runner.py 209 98 52 4 51% aiohttp/web_server.py 33 9 6 0 67% aiohttp/web_urldispatcher.py 708 446 205 1 33% aiohttp/web_ws.py 316 254 108 0 16% aiohttp/worker.py 129 121 36 0 5% tests/autobahn/test_autobahn.py 60 52 10 0 11% tests/conftest.py 71 29 6 1 56% tests/test___all__.py 9 0 0 0 100% tests/test_base_protocol.py 152 0 2 0 100% tests/test_classbasedview.py 39 2 6 0 96% tests/test_client_connection.py 94 0 2 1 99% tests/test_client_exceptions.py 188 2 30 2 98% tests/test_client_fingerprint.py 59 0 0 0 100% tests/test_client_functional.py 2069 130 76 7 93% tests/test_client_proto.py 88 0 0 0 100% tests/test_client_request.py 753 4 24 0 99% tests/test_client_response.py 469 3 2 1 99% tests/test_client_session.py 496 16 33 2 97% tests/test_client_ws.py 415 0 4 0 100% tests/test_client_ws_functional.py 585 13 14 3 97% tests/test_connector.py 1497 94 72 11 93% tests/test_cookiejar.py 312 0 26 3 99% tests/test_flowcontrol_streams.py 100 0 4 0 100% tests/test_formdata.py 72 0 6 0 100% tests/test_helpers.py 370 7 30 3 98% tests/test_http_exceptions.py 107 0 20 0 100% tests/test_http_parser.py 747 7 40 0 99% tests/test_http_writer.py 176 0 10 0 100% tests/test_locks.py 39 1 2 0 98% tests/test_loop.py 39 2 2 0 95% tests/test_multipart.py 659 4 42 3 99% tests/test_multipart_helpers.py 446 19 4 0 96% tests/test_payload.py 95 3 6 0 97% tests/test_proxy.py 264 18 2 0 93% tests/test_proxy_functional.py 492 492 24 0 0% tests/test_pytest_plugin.py 30 0 0 0 100% tests/test_resolver.py 176 81 16 0 55% tests/test_route_def.py 200 19 0 0 90% tests/test_run_app.py 342 7 24 8 96% tests/test_streams.py 1063 1 44 1 99% tests/test_tcp_helpers.py 51 2 2 1 94% tests/test_test_utils.py 238 5 8 2 97% tests/test_tracing.py 48 0 4 0 100% tests/test_urldispatch.py 844 12 24 1 99% tests/test_web_app.py 427 6 12 0 99% tests/test_web_cli.py 75 0 0 0 100% tests/test_web_exceptions.py 156 0 22 0 100% tests/test_web_functional.py 1431 28 36 4 98% tests/test_web_log.py 110 2 6 0 98% tests/test_web_middleware.py 266 3 18 2 98% tests/test_web_request.py 485 3 8 0 99% tests/test_web_request_handler.py 40 1 0 0 98% tests/test_web_response.py 818 3 6 1 99% tests/test_web_runner.py 130 9 4 0 93% tests/test_web_sendfile.py 84 0 0 0 100% tests/test_web_sendfile_functional.py 551 19 16 0 96% tests/test_web_server.py 98 0 0 0 100% tests/test_web_urldispatcher.py 307 7 22 2 97% tests/test_web_websocket.py 304 2 4 0 99% tests/test_web_websocket_functional.py 542 42 16 4 92% tests/test_websocket_handshake.py 152 0 12 0 100% tests/test_websocket_parser.py 300 9 14 1 97% tests/test_websocket_writer.py 68 0 0 0 100% tests/test_worker.py 197 189 10 0 4% -------------------------------------------------------------------------- TOTAL 30518 8329 4578 106 67% =========================================================================== slowest 10 durations =========================================================================== 2.01s call tests/test_client_functional.py::test_read_timeout_between_chunks[pyloop] 2.01s call tests/test_client_functional.py::test_set_cookies_max_age[pyloop] 1.01s call tests/test_client_functional.py::test_readline_error_on_conn_close[pyloop] 1.00s call tests/test_client_functional.py::test_timeout_on_reading_data[pyloop] 0.84s call tests/test_payload.py::test_stream_reader_long_lines 0.73s call tests/test_pytest_plugin.py::test_aiohttp_plugin 0.55s call tests/test_base_protocol.py::test_parallel_drain_race_condition 0.51s call tests/test_client_functional.py::test_no_error_on_conn_close_if_eof[pyloop] 0.44s call tests/test_pytest_plugin.py::test_aiohttp_plugin_async_fixture 0.41s call tests/test_run_app.py::test_sigint ========================================================================= short test summary info ========================================================================== SKIPPED [1] tests/test_worker.py:12: could not import 'aiohttp.worker': No module named 'gunicorn' SKIPPED [1] tests/autobahn/test_autobahn.py:10: 'python-on-whales' requires Python 3.7+ SKIPPED [1] tests/test_client_session.py:795: The check is applied in DEBUG mode only SKIPPED [1] tests/test_connector.py:1940: Proactor Event loop present only in Windows SKIPPED [1] tests/test_connector.py:1948: Proactor Event loop present only in Windows SKIPPED [1] tests/test_connector.py:1959: Proactor Event loop present only in Windows SKIPPED [1] tests/test_connector.py:2110: Proactor Event loop present only in Windows 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 [1] tests/test_proxy.py:359: The tested code path is only reachable below Python 3.7 because those versions don't yet have `asyncio.loop.start_tls()` implemeneted SKIPPED [1] tests/test_resolver.py:48: aiodns 1.1 required SKIPPED [1] tests/test_resolver.py:58: aiodns required SKIPPED [1] tests/test_resolver.py:69: aiodns 1.1 required SKIPPED [1] tests/test_resolver.py:80: aiodns required SKIPPED [1] tests/test_resolver.py:91: aiodns 1.1 required SKIPPED [1] tests/test_resolver.py:100: aiodns required SKIPPED [1] tests/test_resolver.py:110: aiodns required SKIPPED [1] tests/test_resolver.py:120: aiodns 1.1 required SKIPPED [1] tests/test_resolver.py:212: aiodns required SKIPPED [1] tests/test_resolver.py:224: aiodns required SKIPPED [1] tests/test_resolver.py:231: aiodns 1.1 required SKIPPED [1] tests/test_resolver.py:241: aiodns required SKIPPED [1] tests/test_web_app.py:319: The check is applied in DEBUG mode only SKIPPED [1] tests/test_web_request.py:683: The check is applied in DEBUG mode only SKIPPED [1] tests/test_web_runner.py:125: Proactor Event loop present only in Windows SKIPPED [1] tests/test_web_runner.py:135: Proactor Event loop present only in Windows XFAIL tests/test_client_functional.py::test_ssl_client[pyloop] reason: trustme is not supported XFAIL tests/test_client_functional.py::test_tcp_connector_fingerprint_ok[pyloop] reason: trustme is not supported XFAIL tests/test_client_functional.py::test_tcp_connector_fingerprint_fail[pyloop] reason: trustme is not supported XFAIL tests/test_client_functional.py::test_broken_connection[pyloop] XFAIL tests/test_client_functional.py::test_drop_auth_on_redirect_to_other_host[pyloop-entirely different hosts] reason: trustme is not supported XFAIL tests/test_client_functional.py::test_drop_auth_on_redirect_to_other_host[pyloop-http -> https] reason: trustme is not supported XFAIL tests/test_client_functional.py::test_drop_auth_on_redirect_to_other_host[pyloop-https -> http] reason: trustme is not supported XFAIL tests/test_client_functional.py::test_aiohttp_request_ctx_manager_close_sess_on_error[pyloop] reason: trustme is not supported XFAIL tests/test_client_functional.py::test_error_in_performing_request[pyloop] reason: trustme is not supported XFAIL tests/test_client_request.py::test_verify_ssl_false_with_ssl_context[pyloop] reason: trustme is not supported XFAIL tests/test_connector.py::test_del_with_scheduled_cleanup[pyloop] XFAIL tests/test_connector.py::test_tcp_connector_raise_connector_ssl_error[pyloop] reason: trustme is not supported XFAIL tests/test_connector.py::test_tcp_connector_do_not_raise_connector_ssl_error[pyloop] reason: trustme is not supported XFAIL tests/test_web_functional.py::test_http10_keep_alive_default[pyloop] XFAIL tests/test_web_sendfile_functional.py::test_static_file_ssl[pyloop] reason: trustme is not supported XFAIL tests/test_web_urldispatcher.py::test_decoded_url_match[pyloop-urldecoded_route] Regression in v3.7: https://github.com/aio-libs/aiohttp/issues/5621 XFAIL tests/test_web_urldispatcher.py::test_decoded_url_match[pyloop-urldecoded_route_with_regex] Regression in v3.7: https://github.com/aio-libs/aiohttp/issues/5621 XFAIL tests/test_web_urldispatcher.py::test_decoded_url_match[pyloop-urlencoded_route] Regression in v3.7: https://github.com/aio-libs/aiohttp/issues/5621 FAILED tests/test_client_functional.py::test_async_with_session - pytest.PytestRemovedIn8Warning: Passing None has been deprecated. FAILED tests/test_client_functional.py::test_session_close_awaitable - pytest.PytestRemovedIn8Warning: Passing None has been deprecated. FAILED tests/test_client_functional.py::test_close_run_until_complete_not_deprecated - pytest.PytestRemovedIn8Warning: Passing None has been deprecated. FAILED tests/test_client_session.py::test_client_session_timeout_zero - aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host example.com:80 ssl:default... FAILED tests/test_client_session.py::test_requote_redirect_url_default - pytest.PytestUnraisableExceptionWarning: Exception ignored in:
webknjaz commented 2 years ago

Addressed in the respective branches.

kloczek commented 2 years ago

Looking on https://github.com/aio-libs/aiohttp/compare/v3.8.1...3.8 I think that it would be good to make new 3.8.2 (?) release. Any plans to do that soon? 🤔