@@ -35,6 +35,9 @@ def __init__(self, partial, expected): |
|
|
35 |
35 |
self.partial = partial |
36 |
36 |
self.expected = expected |
37 |
37 |
|
|
38 |
+def __reduce__(self): |
|
39 |
+return type(self), (self.partial, self.expected) |
|
40 |
+ |
38 |
41 |
|
39 |
42 |
class LimitOverrunError(Exception): |
40 |
43 |
"""Reached the buffer limit while looking for a separator. |
@@ -46,6 +49,9 @@ def __init__(self, message, consumed): |
|
|
46 |
49 |
super().__init__(message) |
47 |
50 |
self.consumed = consumed |
48 |
51 |
|
|
52 |
+def __reduce__(self): |
|
53 |
+return type(self), (self.args[0], self.consumed) |
|
54 |
+ |
49 |
55 |
|
50 |
56 |
@coroutine |
51 |
57 |
def open_connection(host=None, port=None, *, |