touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #84173
[Bug 1464882] [NEW] python3-debian fails to load utf-8 changelog
Public bug reported:
Attempting to load a changelog containing non-ascii utf-8 characters
using the changlog module python3-debian in ubuntu vivid (version
0.1.22ubuntu1 of python3-debian) fails.
root@debian:/# zcat /usr/share/doc/qt4-doc/changelog.Debian.gz > testchangelog
root@debian:/# file testchangelog
testchangelog: UTF-8 Unicode text
root@debian:/# python3
Python 3.4.3 (default, Mar 26 2015, 22:03:40)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from debian import changelog
>>> f=open('testchangelog')
>>> c=changelog.Changelog(f)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/debian/changelog.py", line 250, in __init__
strict=strict)
File "/usr/lib/python3/dist-packages/debian/changelog.py", line 291, in parse_changelog
for line in file:
File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 822: ordinal not in range(128)
>>>
According to the sourcecode the default encoding for the changelog
module is supposed to be utf-8 but it looks like that never actually
gets passed to whatever does the decoding.
Performing the same test in a Debian sid chroot succeeds
Performing the same test with python 2 succeeds
** Affects: python-debian (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python-debian in Ubuntu.
https://bugs.launchpad.net/bugs/1464882
Title:
python3-debian fails to load utf-8 changelog
Status in python-debian package in Ubuntu:
New
Bug description:
Attempting to load a changelog containing non-ascii utf-8 characters
using the changlog module python3-debian in ubuntu vivid (version
0.1.22ubuntu1 of python3-debian) fails.
root@debian:/# zcat /usr/share/doc/qt4-doc/changelog.Debian.gz > testchangelog
root@debian:/# file testchangelog
testchangelog: UTF-8 Unicode text
root@debian:/# python3
Python 3.4.3 (default, Mar 26 2015, 22:03:40)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from debian import changelog
>>> f=open('testchangelog')
>>> c=changelog.Changelog(f)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/debian/changelog.py", line 250, in __init__
strict=strict)
File "/usr/lib/python3/dist-packages/debian/changelog.py", line 291, in parse_changelog
for line in file:
File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 822: ordinal not in range(128)
>>>
According to the sourcecode the default encoding for the changelog
module is supposed to be utf-8 but it looks like that never actually
gets passed to whatever does the decoding.
Performing the same test in a Debian sid chroot succeeds
Performing the same test with python 2 succeeds
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-debian/+bug/1464882/+subscriptions
Follow ups
References