> > =================================== FAILURES > > =================================== > > _________________ test_supported_upgrade_request[H11Protocol] > > __________________ > > > > protocol_cls = <class 'uvicorn.protocols.http.h11_impl.H11Protocol'> > > > > @pytest.mark.parametrize("protocol_cls", HTTP_PROTOCOLS) > > def test_supported_upgrade_request(protocol_cls): > > app = Response("Hello, world", media_type="text/plain") > > > > protocol = get_connected_protocol(app, protocol_cls, ws="wsproto") > > protocol.data_received(UPGRADE_REQUEST) > > > > > assert b"HTTP/1.1 426 " in protocol.transport.buffer > > E AssertionError: assert b'HTTP/1.1 426 ' in b'HTTP/1.1 400 > > \r\nSec-WebSocket-Version: 13\r\ncontent-length: 0\r\n\r\n' > > E + where b'HTTP/1.1 400 \r\nSec-WebSocket-Version: > > 13\r\ncontent-length: 0\r\n\r\n' = <test_http.MockTransport object at > > 0x7f5dfc10cf10>.buffer > > E + where <test_http.MockTransport object at 0x7f5dfc10cf10> = > > <uvicorn.protocols.http.h11_impl.H11Protocol object at > > 0x7f5dfc104fd0>.transport > > > > tests/protocols/test_http.py:685: AssertionError > > ______________ test_supported_upgrade_request[HttpToolsProtocol] > > _______________ > > > > protocol_cls = <class > > 'uvicorn.protocols.http.httptools_impl.HttpToolsProtocol'> > > > > @pytest.mark.parametrize("protocol_cls", HTTP_PROTOCOLS) > > def test_supported_upgrade_request(protocol_cls): > > app = Response("Hello, world", media_type="text/plain") > > > > protocol = get_connected_protocol(app, protocol_cls, ws="wsproto") > > protocol.data_received(UPGRADE_REQUEST) > > > > > assert b"HTTP/1.1 426 " in protocol.transport.buffer > > E AssertionError: assert b'HTTP/1.1 426 ' in b'HTTP/1.1 400 > > \r\nSec-WebSocket-Version: 13\r\ncontent-length: 0\r\n\r\n' > > E + where b'HTTP/1.1 400 \r\nSec-WebSocket-Version: > > 13\r\ncontent-length: 0\r\n\r\n' = <test_http.MockTransport object at > > 0x7f5dfb815af0>.buffer > > E + where <test_http.MockTransport object at 0x7f5dfb815af0> = > > <uvicorn.protocols.http.httptools_impl.HttpToolsProtocol object at > > 0x7f5dfb815670>.transport
This is due to the version of uvicorn in the archive is not compatible with wsproto 1.0.0, https://github.com/encode/uvicorn/issues/868; that's fixed in https://github.com/encode/uvicorn/pull/892 which was released in 0.14.0 and 0.15.0. I've started upgrading the package in git to 0.15.0, but that requires a newer version of httpx than the one in the archive and that requires python-charset-normalizer, which is currently in NEW. uvicorn unittests are also failing, apparently because a test HTTP daemon on port 8000 is not running, i've opened https://github.com/encode/uvicorn/discussions/1231 asking for help -- Sandro "morph" Tosi My website: http://sandrotosi.me/ Me at Debian: http://wiki.debian.org/SandroTosi Twitter: https://twitter.com/sandrotosi