diff -r 7caaefa48794 -r 333a2656e981 mercurial/utils/procutil.py --- a/mercurial/utils/procutil.py Tue Dec 14 17:06:32 2021 -0500 +++ b/mercurial/utils/procutil.py Tue Dec 14 17:25:46 2021 -0500 @@ -75,7 +75,9 @@ return res +# pytype: disable=attribute-error io.BufferedIOBase.register(LineBufferedWrapper) +# pytype: enable=attribute-error def make_line_buffered(stream): @@ -114,7 +116,9 @@ return total_written +# pytype: disable=attribute-error io.IOBase.register(WriteAllWrapper) +# pytype: enable=attribute-error def _make_write_all(stream): @@ -767,6 +771,7 @@ raise finally: if stdin_bytes is not None: + assert not isinstance(stdin, int) stdin.close() if not ensurestart: # Even though we're not waiting on the child process,