[PATCH 5 of 7] get-with-headers: handle broken pipes (py3)

timeless timeless at gmail.com
Mon May 16 14:06:39 EDT 2016


Yuya Nishihara wrote:

> I read this issue, but I couldn't figure out why the problem appears only
> on Python 3. Because get-with-headers.py doesn't handle exceptions, I
> expect
> some errors would be displayed on Python 2.
>

Well, the thread clearly indicates that the behavior seems to have changed
a couple of times.

I think that py3 tightened up the error reporting for writing to closed
pipes.

Beyond that, I really don't know. And I decided it wasn't worth my time to
try to investigate.

It doesn't help that different ways of piping limited amounts of characters
result in different interrupt behaviors...

We probably will want to update *all* of our code to use this rather long
and annoying chain. I'm hoping we could hide this with a context manager or
at least a function, because this nested stuff is really ugly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160516/c377cf7e/attachment.html>


More information about the Mercurial-devel mailing list