New submission from Christophe de Vienne <[EMAIL PROTECTED]>:

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:

----------
assignee: georg.brandl
components: Documentation tools (Sphinx)
messages: 67710
nosy: cdevienne, georg.brandl
severity: normal
status: open
title: autodoc does not support unicode docstrings
type: crash

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3041>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to