On Mon, Apr 7, 2008 at 9:18 AM, Branko ╚ibej <brane_at_xbc.nu> wrote:
> jeremy hinds wrote:
> > > * I /think/ i recall that we have the binary-mode parameter for a
> > > reason. I don't remember the reason offhand, but just killing off
> > > that option doesn't seem safe. (FWIW, the reason is most likely
> > > related to text and binary being different on Windows.)
> > >
> > >
> > I think you're right, in that the binary-mode param was only used when
> > invoking os.popen3() on platforms without the Popen3 class (Windows).
> > But having replaced both of those with subprocess.Popen, there's
> > nowhere to use that parameter anymore. At least, I don't see anything
> > that looks analogous in creationflags or anywhere like that.
> universal_newlines=True is text (non-binary) mode.
> -- Brane
Thanks for clearing that up. While rewriting the patch to handle
universal_newlines and shell=False, another question came up.
I made universal_newlines apply on any platform rather than just
Windows, and that seemed to work fine on everything except
import_tests.import_eol_style(). The problem is that
run_and_verify_svn() has text mode hard-coded in it, so the "\r\n"
sequences were converted to "\n". (Honestly, I don't understand how
that test worked accurately on Windows before.)
The question is whether it is better to preserve old behavior by never
using universal_newlines on posix, or should I add a "binary_mode"
parameter to run_and_verify_svn2()?
Received on 2008-04-08 17:04:27 CEST