diff --git a/mercurial/worker.py b/mercurial/worker.py --- a/mercurial/worker.py +++ b/mercurial/worker.py @@ -78,6 +78,14 @@ # _wrapped.readinto(), since that is unbuffered. The unpickler is fine # with just read() and readline(), so we don't need to implement it. + if (3, 8, 0) <= sys.version_info[:3] < (3, 8, 2): + + # This is required for python 3.8, prior to 3.8.2. See issue6444. + def readinto(self, b): + data = self._wrapped.readall() + b[:] = data + return len(data) + def readline(self): return self._wrapped.readline()