Author gward
Recipients barry, durin42, gward, ncoghlan, r.david.murray
Date 2013-03-18.00:26:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363566383.61.0.102525805468.issue17445@psf.upfronthosting.co.za>
In-reply-to
Content
The particular use case that triggered this: Mercurial's test suite. It runs "hg blah blah" and compares the output against known good output. But Mercurial's output is just bytes, because pretty much everything in a Mercurial repo is just bytes (file data of course, but also filenames and even changeset metadata like usernames).

So attempting to run the Mercurial test suite under 3.x immediately fails hard. The boiled-down essence of the bug is this:

>>> import difflib
>>> a = b"hello world"
>>> b = b"goodbye world"
>>> [line for line in difflib.unified_diff(a, b)]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 1, in <listcomp>
  File "/home/greg/src/cpython/3.2/Lib/difflib.py", line 1224, in unified_diff
    yield '-' + line
TypeError: Can't convert 'int' object to str implicitly
History
Date User Action Args
2013-03-18 00:26:23gwardsetrecipients: + gward, barry, ncoghlan, durin42, r.david.murray
2013-03-18 00:26:23gwardsetmessageid: <1363566383.61.0.102525805468.issue17445@psf.upfronthosting.co.za>
2013-03-18 00:26:23gwardlinkissue17445 messages
2013-03-18 00:26:22gwardcreate