* gregor herrmann <gre...@debian.org>, 2012-08-14, 19:11:
+-            if(sys.version_info.major < 3):
++            if(sys.version_info[0] < 3):
+                 # hack to make this work with Python 2
+-                f_loc = f.decode('ascii', errors='ignore')
++                f_loc = f.decode('ascii', 'ignore')
+             else:
+                 f_loc = f.encode(enc, errors='replace').decode(enc, 
errors='replace')

To be super-correct, the other "f_loc = ..." line should be fixed in the same way: Python 3.1 doesn't support keyword arguments in str.encode() either.

But that would make a difference only for backports; if you build the package in wheezy, you'll get a dependency on python3 (>= 3.2.something).

Other than that, the patch looks good. And it even makes the test suite pass! :)

Before:
| $ python2.6 test/auto.py
| FFE.FEE...FEFE.FEFEFE.EFEFEFEFFEFEFEFEFE.
| [...]
| ----------------------------------------------------------------------
| Ran 26 tests in 7.758s
|
| FAILED (failures=17, errors=17)

After:
| $ python2.6 test/auto.py
| ..........................
| ----------------------------------------------------------------------
| Ran 26 tests in 9.586s
|
| OK

Of course, it would be nicer if such bugs were caught when python-distutils-extra is being built, so I filed #684967.

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to