One function

ABNF in websocket-client/websocket-client

The author described this change as fix tests for new ABNF mask_value variable name. It counts as a record because the check below fails on the code as it stood at 9b51f7327 and passes on 811aa84f4, with nothing else changed between the two runs.

Fix saved2023-12-03
Sharing licenceApache-2.0 · LICENSE
Change size+1 1

What the code was meant to do, written into the code itself as a docstring

ABNF frame class. See http://tools.ietf.org/html/rfc5234 and http://tools.ietf.org/html/rfc6455#section-5.2

The change

9797 return code in VALID_CLOSE_STATUS or (3000 <= code < 5000)
9898
9999 def __str__(self) -> str:
100- return f"fin={self.fin} opcode={self.opcode} data={self.data!r}"
100+ return f"fin={self.fin} opcode={self.opcode} data={self.data}"
101101
102102 @staticmethod
103103 def create_frame(data: Union[bytes, str], opcode: int, fin: int = 1) -> "ABNF":

The check that tells the two apart

failpass·websocket/tests/test_abnf.py::ABNFTest::testFormat

Check file websocket/tests/test_abnf.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it9b51f7327d6dce01cce3dddc8e59f60f2a84189d
Broken version dated2023-12-03
Modulewebsocket._abnf
Units changedABNF
Fingerprint2a62cc570e95608c
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.