msg145007 - (view) |
Author: Kirill Kuzminykh (Cykooz) |
Date: 2011-10-06 13:22 |
Command `register` (and `check -r` too) raises the exception UnicodeDecodeError if the long_description (stored as unicode) contains not ASCII chars. This is because the Docutils, called from Distutils, accepts only ASCII or Unicode. But Distutils passes to Docutils text as a `str` (ASCII or UTF-8). PS: sorry for my English |
|
|
msg145008 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-10-06 13:24 |
Thank you for the report. Can you give us a short setup.py that reproduces the bug? |
|
|
msg145011 - (view) |
Author: Kirill Kuzminykh (Cykooz) |
Date: 2011-10-06 13:33 |
> Can you give us a short setup.py that reproduces the bug? Ok. Command that reproduces the bug: python setup.py check -r PS: I use: Ubuntu 11.04 Python 2.7.1 Docutils 0.8.1 |
|
|
msg145012 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-10-06 13:40 |
Your file uses setuptools, which is not part of Python, but I can reproduce the same bug with distutils. |
|
|
msg145055 - (view) |
Author: Kirill Kuzminykh (Cykooz) |
Date: 2011-10-07 05:08 |
I created the patch (in attachment) for Distutils from Python 2.7. PS: Python 3.2 does not contain this error, because there the entire text is stored in unicode. |
|
|
msg145091 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-10-07 15:44 |
Thanks for the quick patch! I feared it would be something more complicated :) I will add a test and commit this. (I added 3.2 and 3.3 to the versions because I will add the test there too, to make sure the code behaves right.) Can you give me a Latin transliteration of your name so that I can credit you? |
|
|
msg145123 - (view) |
Author: Kirill Kuzminykh (Cykooz) |
Date: 2011-10-07 18:45 |
Latin transliteration of my name is Kirill Kuzminykh. |
|
|
msg145221 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2011-10-09 06:59 |
New changeset e16792003597 by Éric Araujo in branch '3.2': Add tests for Unicode handling in distutils’ check and register (#13114) http://hg.python.org/cpython/rev/e16792003597 |
|
|
msg145224 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2011-10-09 07:00 |
New changeset 8d837bd8148a by Éric Araujo in branch '2.7': Fix distutils’ check and register Unicode handling (#13114). http://hg.python.org/cpython/rev/8d837bd8148a |
|
|
msg145230 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-10-09 07:27 |
Fixed, thanks again! |
|
|
msg145524 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2011-10-14 14:57 |
New changeset d5fb646e7ce1 by Éric Araujo in branch 'default': Add tests for Unicode handling in packaging’ check and register (#13114) http://hg.python.org/cpython/rev/d5fb646e7ce1 |
|
|
msg150523 - (view) |
Author: Jason R. Coombs (jaraco) *  |
Date: 2012-01-03 20:01 |
I recently encountered this error, and in the process of troubleshooting, developed this one-line to reproduce the problem. I'm including it here for posterity (and in case anybody wants to test a given version of Python for the error): python -c "from distutils.core import setup; setup(name='foo.project', version='1.0', url='http://www.example.com', author='Foo', author_email='foo@example.com', long_description = u'\xc0',)" check -r |
|
|