[PATCH] registrar: make format strings unicodes and not bytes
Yuya Nishihara
yuya at tcha.org
Fri Oct 7 15:23:50 UTC 2016
On Fri, 7 Oct 2016 17:11:50 +0200, Augie Fackler wrote:
> > On Oct 7, 2016, at 17:10, Yuya Nishihara <yuya at tcha.org> wrote:
> > 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?
>
> Clever. I mailed a v2 that uses sysstr, which seems like it's probably good enough? Maybe even better than depending on the subtlety of how we're handling triple-quoted strings.
That seems also fine.
More information about the Mercurial-devel
mailing list