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.

Title: autodoc does not support unicode docstrings
Type: crash Stage:
Components: Documentation tools (Sphinx) Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: cdevienne, georg.brandl
Priority: normal Keywords:

Created on 2008-06-05 10:21 by cdevienne, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1083 closed Dimitri Merejkowsky, 2017-04-11 10:06
Messages (2)
msg67710 - (view) Author: Christophe de Vienne (cdevienne) Date: 2008-06-05 10:21
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/
--- sphinx/ext/	(révision 63954)
+++ sphinx/ext/	(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 = [docstring.decode(charset) for docstring in
docstrings if not isinstance(docstring, unicode)]
     # add docstring content
     for docstring in docstrings:
msg67718 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-06-05 17:06
Thanks, fixed in r63958.
Date User Action Args
2022-04-11 14:56:35adminsetgithub: 47291
2017-04-11 10:06:41Dimitri Merejkowskysetpull_requests: + pull_request1227
2008-06-05 17:06:46georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg67718
2008-06-05 10:21:33cdeviennecreate