Proposed strategy to port Mercurial to Python 3

Martin Geisler mg at lazybytes.net
Thu Nov 3 16:56:22 CDT 2011


Victor Stinner <victor.stinner at haypocalc.com> writes:

> Le Jeudi 3 Novembre 2011 13:28:25 vous avez écrit :
>> One concern is the automatic promotion of str objects to unicode objects
>> when doing things like "s + u". That might work fine in all our test
>> cases but (as you know) it suddenly fails if the the s object cannot be
>> decoded at runtime.
>
> Such *bug* would be easily detected during my port to Python 3. In
> Python 2, you can find such bug by using non-ASCII characters and
> testing various locale encodings (ASCII, latin1, UTF-8). Or you can
> try to unicode-nazi module:
>
> http://pypi.python.org/pypi/unicode-nazi

Ah, that sounds line a very interesting module... thanks! We've
discussed writing something just like that for this situation but we
didn't realize that it already existed.

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20111103/8f5a5987/attachment.pgp>


More information about the Mercurial-devel mailing list