This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cdevienne
Recipients cdevienne, georg.brandl
Date 2008-06-05.10:21:23
SpamBayes Score 0.01640409
Marked as misclassified No
Message-id <1212661294.93.0.247406907361.issue3041@psf.upfronthosting.co.za>
In-reply-to
Content
If I define unicode docstrings in my python source, autodoc crash
because it tries to decode them, which force a ascii encode first.

A trivial patch fix the issue :

Index: sphinx/ext/autodoc.py
===================================================================
--- sphinx/ext/autodoc.py	(révision 63954)
+++ sphinx/ext/autodoc.py	(copie de travail)
@@ -218,7 +218,7 @@
     module = getattr(todoc, '__module__', None)
     if module is not None:
         charset = get_module_charset(module)
-        docstrings = [docstring.decode(charset) for docstring in
docstrings]
+        docstrings = [docstring.decode(charset) for docstring in
docstrings if not isinstance(docstring, unicode)]
 
     # add docstring content
     for docstring in docstrings:
History
Date User Action Args
2008-06-05 10:21:37cdeviennesetspambayes_score: 0.0164041 -> 0.01640409
recipients: + cdevienne, georg.brandl
2008-06-05 10:21:35cdeviennesetspambayes_score: 0.0164041 -> 0.0164041
messageid: <1212661294.93.0.247406907361.issue3041@psf.upfronthosting.co.za>
2008-06-05 10:21:33cdeviennelinkissue3041 messages
2008-06-05 10:21:30cdeviennecreate