Issue #10 resolved

setup.py broken for Python 3.3

klmitch
created an issue

OpenStack's python-novaclient uses this package, and I just saw a Python 3.3 test failure due to the inability to install it this morning. The culprit seems to be the "±" character in the README.rst. The exact error I see is:

2013-10-22 12:05:00.712 | Downloading/unpacking iso8601>=0.1.4 (from -r /home/jenkins/workspace/gate-python-novaclient-python33/requirements.txt (line 3))
2013-10-22 12:05:00.712 |   Downloading iso8601-0.1.7.tar.gz
2013-10-22 12:05:00.712 |   Running setup.py egg_info for package iso8601
2013-10-22 12:05:00.712 |     Traceback (most recent call last):
2013-10-22 12:05:00.713 |       File "<string>", line 16, in <module>
2013-10-22 12:05:00.713 |       File "/home/jenkins/workspace/gate-python-novaclient-python33/.tox/py33/build/iso8601/setup.py", line 8, in <module>
2013-10-22 12:05:00.713 |         long_description = open(os.path.join(os.path.dirname(__file__), "README.rst")).read()
2013-10-22 12:05:00.713 |       File "/home/jenkins/workspace/gate-python-novaclient-python33/.tox/py33/lib/python3.3/encodings/ascii.py", line 26, in decode
2013-10-22 12:05:00.713 |         return codecs.ascii_decode(input, self.errors)[0]
2013-10-22 12:05:00.713 |     UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1006: ordinal not in range(128)
2013-10-22 12:05:00.714 |     Complete output from command python setup.py egg_info:
2013-10-22 12:05:00.714 |     Traceback (most recent call last):
2013-10-22 12:05:00.714 | 
2013-10-22 12:05:00.714 |   File "<string>", line 16, in <module>
2013-10-22 12:05:00.714 | 
2013-10-22 12:05:00.714 |   File "/home/jenkins/workspace/gate-python-novaclient-python33/.tox/py33/build/iso8601/setup.py", line 8, in <module>
2013-10-22 12:05:00.715 | 
2013-10-22 12:05:00.715 |     long_description = open(os.path.join(os.path.dirname(__file__), "README.rst")).read()
2013-10-22 12:05:00.715 | 
2013-10-22 12:05:00.715 |   File "/home/jenkins/workspace/gate-python-novaclient-python33/.tox/py33/lib/python3.3/encodings/ascii.py", line 26, in decode
2013-10-22 12:05:00.715 | 
2013-10-22 12:05:00.715 |     return codecs.ascii_decode(input, self.errors)[0]
2013-10-22 12:05:00.716 | 
2013-10-22 12:05:00.716 | UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1006: ordinal not in range(128)

(From http://logs.openstack.org/06/50506/1/check/gate-python-novaclient-python33/fa17973/console.html)

I have confirmed that this is due to the special unicode "±" character:

>>> a = u"±"
>>> a.encode('utf-8')
'\xc2\xb1'

The easiest solution is probably to stick to ASCII (i.e., use "+/-" instead of "±").

Comments (3)

  1. Log in to comment