File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 83
83
84
84
import h11
85
85
86
- MAX_RECV = 2 ** 16
86
+ MAX_RECV = 2 ** 16
87
87
TIMEOUT = 10
88
88
89
89
################################################################
Original file line number Diff line number Diff line change 67
67
#
68
68
# Maybe a dict-of-lists would be better?
69
69
70
- _content_length_re = re .compile (br "[0-9]+" )
70
+ _content_length_re = re .compile (rb "[0-9]+" )
71
71
_field_name_re = re .compile (field_name .encode ("ascii" ))
72
72
_field_value_re = re .compile (field_value .encode ("ascii" ))
73
73
Original file line number Diff line number Diff line change 40
40
41
41
# Remember that this has to run in O(n) time -- so e.g. the bytearray cast is
42
42
# critical.
43
- obs_fold_re = re .compile (br "[ \t]+" )
43
+ obs_fold_re = re .compile (rb "[ \t]+" )
44
44
45
45
46
46
def _obsolete_line_fold (lines : Iterable [bytes ]) -> Iterable [bytes ]:
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ def thunk() -> NoReturn:
51
51
52
52
53
53
def test_validate () -> None :
54
- my_re = re .compile (br "(?P<group1>[0-9]+)\.(?P<group2>[0-9]+)" )
54
+ my_re = re .compile (rb "(?P<group1>[0-9]+)\.(?P<group2>[0-9]+)" )
55
55
with pytest .raises (LocalProtocolError ):
56
56
validate (my_re , b"0." )
57
57
@@ -66,7 +66,7 @@ def test_validate() -> None:
66
66
67
67
68
68
def test_validate_formatting () -> None :
69
- my_re = re .compile (br "foo" )
69
+ my_re = re .compile (rb "foo" )
70
70
71
71
with pytest .raises (LocalProtocolError ) as excinfo :
72
72
validate (my_re , b"" , "oops" )
You can’t perform that action at this time.
0 commit comments