[PATCH] registrar: make format strings unicodes and not bytes

Yuya Nishihara yuya at tcha.org
Fri Oct 7 11:10:18 EDT 2016


On Fri, 7 Oct 2016 17:01:19 +0200, Martijn Pieters wrote:
> On 7 October 2016 at 14:49, Augie Fackler <raf at durin42.com> wrote:
> 
> > # HG changeset patch
> > # User Augie Fackler <augie at google.com>
> > # Date 1475843538 14400
> > #      Fri Oct 07 08:32:18 2016 -0400
> > # Node ID c79b21f1d5dea9de719504be30ebdb5635263d37
> > # Parent  f3a2125968377fb1d4b9ea3f4917260d5aca3536
> > registrar: make format strings unicodes and not bytes
> >
> > Fixes issues on Python 3, wherein docstrings are unicodes. Shouldn't
> > break anything on Python 2.
> >
> 
> This will break in Python 2 if one of the two interpolated strings is not
> ASCII-decodable.
> 
> These strings should be `str` in 2, `str` in 3.

Good point. So we can use """ instead of " to trick the importer?


More information about the Mercurial-devel mailing list