Show More
@@ -78,6 +78,21 b' if pycompat.ispy3:' | |||||
78 | # _wrapped.readinto(), since that is unbuffered. The unpickler is fine |
|
78 | # _wrapped.readinto(), since that is unbuffered. The unpickler is fine | |
79 | # with just read() and readline(), so we don't need to implement it. |
|
79 | # with just read() and readline(), so we don't need to implement it. | |
80 |
|
80 | |||
|
81 | if (3, 8, 0) <= sys.version_info[:3] < (3, 8, 2): | |||
|
82 | ||||
|
83 | # This is required for python 3.8, prior to 3.8.2. See issue6444. | |||
|
84 | def readinto(self, b): | |||
|
85 | pos = 0 | |||
|
86 | size = len(b) | |||
|
87 | ||||
|
88 | while pos < size: | |||
|
89 | ret = self._wrapped.readinto(b[pos:]) | |||
|
90 | if not ret: | |||
|
91 | break | |||
|
92 | pos += ret | |||
|
93 | ||||
|
94 | return pos | |||
|
95 | ||||
81 | def readline(self): |
|
96 | def readline(self): | |
82 | return self._wrapped.readline() |
|
97 | return self._wrapped.readline() | |
83 |
|
98 |
General Comments 0
You need to be logged in to leave comments.
Login now