[PATCH 8 of 8] py3: have bytes version of sys.argv

Yuya Nishihara yuya at tcha.org
Wed Nov 9 07:55:17 EST 2016


(resend with CC the list)

On Mon, 7 Nov 2016 20:40:19 +0530, Pulkit Goyal wrote:
> > On Windows, the native argv appears to be wchar_t, so we'll need a different
> > hack to simulate the Python 2 (i.e. ANSI Win32 API) behavior.
> 
> Well we are not touching the Python 2 behaviour, it remains the same
> with the patch. And it will be great if you can push this one with
> your explanation appended :)

Ok, I'll queue this and send a follow-up patch to add comment.

> After this patch we will have pycompat.sysargv which will return us bytes
> version of sys.argv. If this patch goes in, i will like to make transformer
> rewrite sys.argv with pycompat.argv because there are lot of occurences.

Maybe I said at the sprint, I'm not a big fan of rewriting complex nodes by
the transformer. And some of sys.argv might not work if replaced to bytes argv.


More information about the Mercurial-devel mailing list