[PATCH v2] posix: update os.popen with subprocess (issue4746)

Yuya Nishihara yuya at tcha.org
Tue Sep 5 10:43:51 EDT 2017


On Tue, 05 Sep 2017 15:52:44 +0200, Matthieu Laneuville wrote:
> I don't have access to a windows machine to test a potential patch,
> what do you suggest? I found a very similar function in windows.py so
> the exact same modification there may work as well, but I can't test
> it.

Perhaps it can be moved to util.py.

FWIW, most devs don't have Windows machine. I just pointed out that because
you've changed the interface of util.popen() only in posix.py, which would
be most likely to break things on Windows.

> Regarding the name, is there a good naming convention to follow? Should
> I use popen_wrapper() for instance?

Naming is hard. I can't think of any nicer name than subproc() or pipeproc().
What I don't like about the name "popen()" is it's completely different from
the real popen(), which returns a file-like object.


More information about the Mercurial-devel mailing list