cherrypy / cheroot

Cheroot is the high-performance, pure-Python HTTP server used by CherryPy. Docs -->
https://cheroot.cherrypy.dev
BSD 3-Clause "New" or "Revised" License
185 stars 90 forks source link

10.0.1: pytest fails in 6 units #711

Closed kloczek closed 6 months ago

kloczek commented 6 months ago

ā“ I'm submitting a ...

šŸž Describe the bug. What is the current behavior? looks like pytets fails in 6 units.

ā“ What is the motivation / use case for changing the behavior?

šŸ’” To Reproduce 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.

Here is pytest output: ```console 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. - `python3 -sBm build -w --no-isolation` - because I'm calling `build` with `--no-isolation` I'm using during all processes only locally installed modules - install .whl file in using `installer` module - run pytest with $PYTHONPATH pointing to sitearch and sitelib inside - build is performed in env which is *`cut off from access to the public network`* (pytest is executed with `-m "not network"`)
Here is pytest output: ```console ```
List of installed modules in build env: ```console ```
Please let me know if you need more details or want me to perform some diagnostics. ```

Please let me know if you need more details or want me to perform some diagnostics.

šŸ“‹ Additional context

List of installed modules in build env: ```console Package Version ----------------------------- ----------- alabaster 0.7.16 autocommand 2.2.2 Babel 2.15.0 build 1.2.1 cffi 1.16.0 charset-normalizer 3.3.2 click 8.1.7 cryptography 42.0.7 defusedxml 0.7.1 docutils 0.20.1 domdf_python_tools 3.8.0.post2 exceptiongroup 1.1.3 flaky 3.8.1 idna 3.7 imagesize 1.4.1 importlib_metadata 7.1.0 incremental 22.10.0 inflect 7.2.1 iniconfig 2.0.0 installer 0.7.0 jaraco.context 4.3.0 jaraco.functools 4.0.1 jaraco.packaging 10.1.0 jaraco.text 3.12.0 Jinja2 3.1.4 MarkupSafe 2.1.5 more-itertools 10.2.0 natsort 8.4.0 packaging 24.0 pbr 5.11.1 pluggy 1.4.0 ply 3.11 portend 3.2.0 pycparser 2.22 Pygments 2.18.0 pyOpenSSL 24.1.0 pyproject_hooks 1.0.0 pytest 8.1.1 python-dateutil 2.9.0.post0 pytz 2024.1 requests 2.31.0 requests-toolbelt 1.0.0 requests-unixsocket 0.3.0 setuptools 69.4.0 setuptools-scm 8.1.0 snowballstemmer 2.2.0 Sphinx 7.3.7 sphinx-tabs 3.4.5 sphinxcontrib-apidoc 0.5.0 sphinxcontrib-applehelp 1.0.8 sphinxcontrib-devhelp 1.0.6 sphinxcontrib-htmlhelp 2.0.5 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.7 sphinxcontrib-serializinghtml 1.1.10 sphinxcontrib-towncrier 0.4.0a0 tempora 5.5.1 tokenize_rt 5.2.0 tomli 2.0.1 towncrier 23.11.0 trustme 1.1.0 typeguard 4.2.1 typing_extensions 4.11.0 urllib3 2.2.1 wheel 0.43.0 zipp 3.18.2 ```
kloczek commented 6 months ago

It is yet another detail. I've added to cheroot/test/test_server.py to --ignore list because test site uses pypytools which not maintained from almost 5 years. https://pypi.org/project/pypytools/#history

webknjaz commented 6 months ago

I don't see anything actionable here.

kloczek commented 6 months ago

So what about pypytools? šŸ¤”

Here is missing pytest output

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-cheroot-10.0.1-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-cheroot-10.0.1-2.fc37.x86_64/usr/lib/python3.10/site-packages + /usr/bin/pytest -ra -m 'not network' --ignore cheroot/test/test_server.py ==================================================================================== test session starts ==================================================================================== platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0 rootdir: /home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1 configfile: pytest.ini testpaths: cheroot/test/ plugins: time-machine-2.14.1, typeguard-4.2.1, flaky-3.8.1, mock-3.14.0, requests-mock-1.12.1, rerunfailures-12.0 collected 143 items cheroot/test/test__compat.py ......... [ 6%] cheroot/test/test_cli.py ............ [ 14%] cheroot/test/test_conn.py ..................FFFF........x....x... [ 41%] cheroot/test/test_core.py ...............x......... [ 59%] cheroot/test/test_dispatch.py . [ 60%] cheroot/test/test_errors.py .. [ 61%] cheroot/test/test_makefile.py .. [ 62%] cheroot/test/test_ssl.py ..........................................FFRRRERRRERRRERRRE [ 96%] cheroot/test/test_wsgi.py RRRE.. [ 98%] cheroot/test/webtest.py .. [100%] ========================================================================================== ERRORS =========================================================================================== _______________________________________________________________ ERROR at setup of test_http_over_https_error[0.0.0.0-builtin] _______________________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _FlakyPlugin._make_test_flaky() got an unexpected keyword argument 'reruns' item = marker = Mark(name='flaky', args=(), kwargs={'reruns': 3, 'reruns_delay': 2}) self = /usr/lib/python3.10/site-packages/flaky/flaky_pytest_plugin.py:255: TypeError ______________________________________________________________ ERROR at setup of test_http_over_https_error[0.0.0.0-pyopenssl] ______________________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _FlakyPlugin._make_test_flaky() got an unexpected keyword argument 'reruns' item = marker = Mark(name='flaky', args=(), kwargs={'reruns': 3, 'reruns_delay': 2}) self = /usr/lib/python3.10/site-packages/flaky/flaky_pytest_plugin.py:255: TypeError _________________________________________________________________ ERROR at setup of test_http_over_https_error[::-builtin] __________________________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _FlakyPlugin._make_test_flaky() got an unexpected keyword argument 'reruns' item = marker = Mark(name='flaky', args=(), kwargs={'reruns': 3, 'reruns_delay': 2}) self = /usr/lib/python3.10/site-packages/flaky/flaky_pytest_plugin.py:255: TypeError ________________________________________________________________ ERROR at setup of test_http_over_https_error[::-pyopenssl] _________________________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _FlakyPlugin._make_test_flaky() got an unexpected keyword argument 'reruns' item = marker = Mark(name='flaky', args=(), kwargs={'reruns': 3, 'reruns_delay': 2}) self = /usr/lib/python3.10/site-packages/flaky/flaky_pytest_plugin.py:255: TypeError ________________________________________________________________________ ERROR at setup of test_connection_keepalive ________________________________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _FlakyPlugin._make_test_flaky() got an unexpected keyword argument 'reruns' item = marker = Mark(name='flaky', args=(), kwargs={'reruns': 3, 'reruns_delay': 2}) self = /usr/lib/python3.10/site-packages/flaky/flaky_pytest_plugin.py:255: TypeError ========================================================================================= FAILURES ========================================================================================== _________________________________________________________________ test_broken_connection_during_http_communication_fallback _________________________________________________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) E pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-199 (safe_start) E E Traceback (most recent call last): E File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner E self.run() E File "/usr/lib64/python3.10/threading.py", line 953, in run E self._target(*self._args, **self._kwargs) E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1731, in safe_start E self.start() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1845, in start E self.serve() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1833, in serve E raise self.interrupt E File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner E self.run() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/workers/threadpool.py", line 119, in run E self._process_connections_until_interrupted() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/workers/threadpool.py", line 216, in _process_connections_until_interrupted E conn.close() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1361, in close E self.rfile.close() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/test/test_conn.py", line 714, in _raise_connection_reset E raise ConnectionResetError(666) E ConnectionResetError: 666 ihook = item = kwds = {} /usr/lib/python3.10/site-packages/flaky/flaky_pytest_plugin.py:146: PytestUnhandledThreadExceptionWarning _______________________________________________________________________________ test_kb_int_from_http_handler _______________________________________________________________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) E pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-210 (safe_start) E E Traceback (most recent call last): E File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner E self.run() E File "/usr/lib64/python3.10/threading.py", line 953, in run E self._target(*self._args, **self._kwargs) E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1736, in safe_start E raise kb_intr_exc from underlying_interrupt E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1731, in safe_start E self.start() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1845, in start E self.serve() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1833, in serve E raise self.interrupt E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/workers/threadpool.py", line 166, in _process_connections_until_interrupted E keep_conn_open = conn.communicate() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1291, in communicate E req.respond() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1081, in respond E self.server.gateway(self).respond() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/wsgi.py", line 136, in respond E response = self.req.server.wsgi_app(self.env, self.start_response) E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/test/helper.py", line 153, in __call__ E output = handler(req, resp) E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/test/test_conn.py", line 770, in _trigger_kb_intr E raise KeyboardInterrupt('simulated test handler keyboard interrupt') E KeyboardInterrupt: simulated test handler keyboard interrupt ihook = item = kwds = {} /usr/lib/python3.10/site-packages/flaky/flaky_pytest_plugin.py:146: PytestUnhandledThreadExceptionWarning ________________________________________________________________________ test_unhandled_exception_in_request_handler ________________________________________________________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) E pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-221 (safe_start) E E Traceback (most recent call last): E File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner E self.run() E File "/usr/lib64/python3.10/threading.py", line 953, in run E self._target(*self._args, **self._kwargs) E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1741, in safe_start E raise sys_exit_exc from underlying_interrupt E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1731, in safe_start E self.start() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1845, in start E self.serve() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1833, in serve E raise self.interrupt E SystemExit: test requesting shutdown ihook = item = kwds = {} /usr/lib/python3.10/site-packages/flaky/flaky_pytest_plugin.py:146: PytestUnhandledThreadExceptionWarning ________________________________________________________________________ test_remains_alive_post_unhandled_exception ________________________________________________________________________ > lambda: ihook(item=item, **kwds), when=when, reraise=reraise ) E pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-232 (safe_start) E E Traceback (most recent call last): E File "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner E self.run() E File "/usr/lib64/python3.10/threading.py", line 953, in run E self._target(*self._args, **self._kwargs) E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1741, in safe_start E raise sys_exit_exc from underlying_interrupt E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1731, in safe_start E self.start() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1845, in start E self.serve() E File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1833, in serve E raise self.interrupt E SystemExit: test requesting shutdown ihook = item = kwds = {} /usr/lib/python3.10/site-packages/flaky/flaky_pytest_plugin.py:146: PytestUnhandledThreadExceptionWarning ____________________________________________________________________________ test_https_over_http_error[0.0.0.0] ____________________________________________________________________________ http_server = .start_srv at 0x7fcf60a1eff0>, ip_addr = '0.0.0.0' @pytest.mark.parametrize( 'ip_addr', ( ANY_INTERFACE_IPV4, ANY_INTERFACE_IPV6, ), ) def test_https_over_http_error(http_server, ip_addr): """Ensure that connecting over HTTPS to HTTP port is handled.""" httpserver = http_server.send((ip_addr, EPHEMERAL_PORT)) interface, _host, port = _get_conn_data(httpserver.bind_addr) with pytest.raises(ssl.SSLError) as ssl_err: http.client.HTTPSConnection( '{interface}:{port}'.format( interface=interface, port=port, ), ).request('GET', '/') expected_substring = ( 'wrong version number' if IS_ABOVE_OPENSSL10 else 'unknown protocol' ) > assert expected_substring in ssl_err.value.args[-1] E AssertionError: assert 'wrong version number' in '[SSL] record layer failure (_ssl.c:1007)' _host = '0.0.0.0' expected_substring = 'wrong version number' http_server = .start_srv at 0x7fcf60a1eff0> httpserver = interface = '127.0.0.1' ip_addr = '0.0.0.0' port = 38281 ssl_err = cheroot/test/test_ssl.py:603: AssertionError ______________________________________________________________________________ test_https_over_http_error[::] _______________________________________________________________________________ http_server = .start_srv at 0x7fcf60a1e730>, ip_addr = '::' @pytest.mark.parametrize( 'ip_addr', ( ANY_INTERFACE_IPV4, ANY_INTERFACE_IPV6, ), ) def test_https_over_http_error(http_server, ip_addr): """Ensure that connecting over HTTPS to HTTP port is handled.""" httpserver = http_server.send((ip_addr, EPHEMERAL_PORT)) interface, _host, port = _get_conn_data(httpserver.bind_addr) with pytest.raises(ssl.SSLError) as ssl_err: http.client.HTTPSConnection( '{interface}:{port}'.format( interface=interface, port=port, ), ).request('GET', '/') expected_substring = ( 'wrong version number' if IS_ABOVE_OPENSSL10 else 'unknown protocol' ) > assert expected_substring in ssl_err.value.args[-1] E AssertionError: assert 'wrong version number' in '[SSL] record layer failure (_ssl.c:1007)' _host = '::' expected_substring = 'wrong version number' http_server = .start_srv at 0x7fcf60a1e730> httpserver = interface = '::1' ip_addr = '::' port = 38193 ssl_err = cheroot/test/test_ssl.py:603: AssertionError ========================================================================================= XFAILURES ========================================================================================= ___________________________________________________________________________________ test_Chunked_Encoding ___________________________________________________________________________________ test_client = @pytest.mark.xfail( reason=unwrap( trim(""" Headers from earlier request leak into the request line for a subsequent request, resulting in 400 instead of 413. See cherrypy/cheroot#69 for details. """), ), ) def test_Chunked_Encoding(test_client): """Test HTTP uploads with chunked transfer-encoding.""" # Initialize a persistent HTTP connection conn = test_client.get_connection() # Try a normal chunked request (with extensions) body = ( b'8;key=value\r\nxx\r\nxxxx\r\n5\r\nyyyyy\r\n0\r\n' b'Content-Type: application/json\r\n' b'\r\n' ) conn.putrequest('POST', '/upload', skip_host=True) conn.putheader('Host', conn.host) conn.putheader('Transfer-Encoding', 'chunked') conn.putheader('Trailer', 'Content-Type') # Note that this is somewhat malformed: # we shouldn't be sending Content-Length. # RFC 2616 says the server should ignore it. conn.putheader('Content-Length', '3') conn.endheaders() conn.send(body) response = conn.getresponse() status_line, _actual_headers, actual_resp_body = webtest.shb(response) actual_status = int(status_line[:3]) assert actual_status == 200 assert status_line[4:] == 'OK' expected_resp_body = ("thanks for '%s'" % b'xx\r\nxxxxyyyyy').encode() > assert actual_resp_body == expected_resp_body E assert b"thanks for ...r\nxxxxyyyyy'" == b"thanks for ...\nxxxxyyyyy''" E E At index 12 diff: b'x' != b'b' E Use -v to get more diff _actual_headers = [('Content-Type', 'text/html'), ('Content-Length', '26'), ('Date', 'Sun, 19 May 2024 15:51:39 GMT'), ('Server', 'Cheroot/10.0.1')] actual_resp_body = b"thanks for 'xx\r\nxxxxyyyyy'" actual_status = 200 body = b'8;key=value\r\nxx\r\nxxxx\r\n5\r\nyyyyy\r\n0\r\nContent-Type: application/json\r\n\r\n' conn = expected_resp_body = b"thanks for 'b'xx\\r\\nxxxxyyyyy''" response = status_line = '200 OK' test_client = cheroot/test/test_conn.py:1347: AssertionError _________________________________________________________________________________________ test_598 __________________________________________________________________________________________ test_client = @pytest.mark.xfail( reason='Sometimes this test fails due to low timeout. ' 'Ref: https://github.com/cherrypy/cherrypy/issues/598', ) def test_598(test_client): """Test serving large file with a read timeout in place.""" # Initialize a persistent HTTP connection conn = test_client.get_connection() remote_data_conn = urllib.request.urlopen( '%s://%s:%s/one_megabyte_of_a' % ('http', conn.host, conn.port), ) buf = remote_data_conn.read(512) time.sleep(timeout * 0.6) remaining = (1024 * 1024) - 512 while remaining: data = remote_data_conn.read(remaining) if not data: break buf += data remaining -= len(data) > assert len(buf) == 1024 * 1024 E AssertionError: assert 1024 == (1024 * 1024) E + where 1024 = len(b'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') buf = b'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' conn = data = b'' remaining = 1047552 remote_data_conn = test_client = cheroot/test/test_conn.py:1476: AssertionError ____________________________________________________________________________________ test_large_request _____________________________________________________________________________________ test_client_with_defaults = @pytest.mark.xfail( reason='https://github.com/cherrypy/cheroot/issues/106', strict=False, # sometimes it passes ) def test_large_request(test_client_with_defaults): """Test GET query with maliciously large Content-Length.""" # If the server's max_request_body_size is not set (i.e. is set to 0) # then this will result in an `OverflowError: Python int too large to # convert to C ssize_t` in the server. # We expect that this should instead return that the request is too # large. c = test_client_with_defaults.get_connection() c.putrequest('GET', '/hello') c.putheader('Content-Length', str(2**64)) c.endheaders() > response = c.getresponse() c = test_client_with_defaults = cheroot/test/test_core.py:295: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/http/client.py:1375: in getresponse response.begin() response = self = /usr/lib64/python3.10/http/client.py:318: in begin version, status, reason = self._read_status() self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _read_status(self): line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") if len(line) > _MAXLINE: raise LineTooLong("status line") if self.debuglevel > 0: print("reply:", repr(line)) if not line: # Presumably, the server closed the connection before # sending a valid response. > raise RemoteDisconnected("Remote end closed connection without" " response") E http.client.RemoteDisconnected: Remote end closed connection without response line = '' self = /usr/lib64/python3.10/http/client.py:287: RemoteDisconnected ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ OverflowError('Python int too large to convert to C ssize_t') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1291, in communicate req.respond() File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1081, in respond self.server.gateway(self).respond() File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/wsgi.py", line 141, in respond self.write(chunk) File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/wsgi.py", line 221, in write self.req.ensure_headers_sent() File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1128, in ensure_headers_sent self.send_headers() File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 1209, in send_headers self.rfile.read(remaining) File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/server.py", line 380, in read data = self.rfile.read(size) File "/home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/cheroot/makefile.py", line 49, in read val = super().read(*args, **kwargs) File "/usr/lib64/python3.10/_pyio.py", line 1095, in read return self._read_unlocked(size) File "/usr/lib64/python3.10/_pyio.py", line 1135, in _read_unlocked chunk = self.raw.read(wanted) OverflowError: Python int too large to convert to C ssize_t ---------------------------------------------- generated xml file: /home/tkloczko/rpmbuild/BUILD/cheroot-10.0.1/.test-results/pytest/test.xml ----------------------------------------------- =================================================================================== slowest 10 durations ==================================================================================== 4.01s call cheroot/test/test_conn.py::test_HTTP11_Timeout_after_request 3.42s call cheroot/test/test_conn.py::test_keepalive_conn_management 2.00s call cheroot/test/test_conn.py::test_HTTP11_Timeout[False] 2.00s call cheroot/test/test_conn.py::test_HTTP11_Timeout[True] 1.08s call cheroot/test/test_conn.py::test_invalid_selected_connection 0.62s call cheroot/test/test_conn.py::test_unhandled_exception_in_request_handler 0.61s call cheroot/test/test_conn.py::test_598 0.61s call cheroot/test/test_conn.py::test_remains_alive_post_unhandled_exception 0.61s call cheroot/test/test_conn.py::test_broken_connection_during_http_communication_fallback 0.60s call cheroot/test/test_conn.py::test_kb_int_from_http_handler ================================================================================== short test summary info ================================================================================== XFAIL cheroot/test/test_conn.py::test_Chunked_Encoding - Headers from earlier request leak into the request line for a subsequent request, resulting in 400 instead of 413. See cherrypy/cheroot#69 for details. XFAIL cheroot/test/test_conn.py::test_598 - Sometimes this test fails due to low timeout. Ref: https://github.com/cherrypy/cherrypy/issues/598 XFAIL cheroot/test/test_core.py::test_large_request - https://github.com/cherrypy/cheroot/issues/106 ERROR cheroot/test/test_ssl.py::test_http_over_https_error[0.0.0.0-builtin] - TypeError: _FlakyPlugin._make_test_flaky() got an unexpected keyword argument 'reruns' ERROR cheroot/test/test_ssl.py::test_http_over_https_error[0.0.0.0-pyopenssl] - TypeError: _FlakyPlugin._make_test_flaky() got an unexpected keyword argument 'reruns' ERROR cheroot/test/test_ssl.py::test_http_over_https_error[::-builtin] - TypeError: _FlakyPlugin._make_test_flaky() got an unexpected keyword argument 'reruns' ERROR cheroot/test/test_ssl.py::test_http_over_https_error[::-pyopenssl] - TypeError: _FlakyPlugin._make_test_flaky() got an unexpected keyword argument 'reruns' ERROR cheroot/test/test_wsgi.py::test_connection_keepalive - TypeError: _FlakyPlugin._make_test_flaky() got an unexpected keyword argument 'reruns' FAILED cheroot/test/test_conn.py::test_broken_connection_during_http_communication_fallback - pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-199 (safe_start) FAILED cheroot/test/test_conn.py::test_kb_int_from_http_handler - pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-210 (safe_start) FAILED cheroot/test/test_conn.py::test_unhandled_exception_in_request_handler - pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-221 (safe_start) FAILED cheroot/test/test_conn.py::test_remains_alive_post_unhandled_exception - pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-232 (safe_start) FAILED cheroot/test/test_ssl.py::test_https_over_http_error[0.0.0.0] - AssertionError: assert 'wrong version number' in '[SSL] record layer failure (_ssl.c:1007)' FAILED cheroot/test/test_ssl.py::test_https_over_http_error[::] - AssertionError: assert 'wrong version number' in '[SSL] record layer failure (_ssl.c:1007)' ========================================================= 6 failed, 129 passed, 3 xfailed, 5 errors, 15 rerun in 112.82s (0:01:52) ========================================================== ```