Closed dirkmueller closed 2 years ago
building against newer h11 releases gives these test failures:
[ 33s] =================================== FAILURES =================================== [ 33s] ________________________________ test_handshake ________________________________ [ 33s] [ 33s] def test_handshake() -> None: [ 33s] response, nonce = _make_handshake([]) [ 33s] [ 33s] > response.headers = sorted(response.headers) # For test determinism [ 33s] [ 33s] test/test_server.py:208: [ 33s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 33s] [ 33s] self = InformationalResponse(headers=<Headers([(b'upgrade', b'WebSocket'), (b'connection', b'Upgrade'), (b'sec-websocket-accept', b'h8YJtSXCJagtWfHvVj0GxvhYXrM=')])>, http_version=b'1.1', reason=b'', status_code=101) [ 33s] name = 'headers' [ 33s] value = [(b'connection', b'Upgrade'), (b'sec-websocket-accept', b'h8YJtSXCJagtWfHvVj0GxvhYXrM='), (b'upgrade', b'WebSocket')] [ 33s] [ 33s] > ??? [ 33s] E dataclasses.FrozenInstanceError: cannot assign to field 'headers' [ 33s] [ 33s] <string>:4: FrozenInstanceError [ 33s] _________________________ test_handshake_extra_headers _________________________ [ 33s] [ 33s] def test_handshake_extra_headers() -> None: [ 33s] response, nonce = _make_handshake([], accept_headers=[(b"X-Foo", b"bar")]) [ 33s] [ 33s] > response.headers = sorted(response.headers) # For test determinism [ 33s] [ 33s] test/test_server.py:222: [ 33s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 33s] [ 33s] self = InformationalResponse(headers=<Headers([(b'upgrade', b'WebSocket'), (b'connection', b'Upgrade'), (b'sec-websocket-accept', b'sbk5BhBG0603A9oxAGV4giGOq9k='), (b'x-foo', b'bar')])>, http_version=b'1.1', reason=b'', status_code=101) [ 33s] name = 'headers' [ 33s] value = [(b'connection', b'Upgrade'), (b'sec-websocket-accept', b'sbk5BhBG0603A9oxAGV4giGOq9k='), (b'upgrade', b'WebSocket'), (b'x-foo', b'bar')] [ 33s] [ 33s] > ??? [ 33s] E dataclasses.FrozenInstanceError: cannot assign to field 'headers' [ 33s] [ 33s] <string>:4: FrozenInstanceError
@pgjones thoughts on how to best address this?
I think so, I'll take a look this weekend.
See #170
building against newer h11 releases gives these test failures: