[issue3041] autodoc does not support unicode docstrings
Christophe de Vienne
report at bugs.python.org
Thu Jun 5 12:21:35 CEST 2008
New submission from Christophe de Vienne <cdevienne at gmail.com>:
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 <report at bugs.python.org>
<http://bugs.python.org/issue3041>
_______________________________________
More information about the Python-bugs-list
mailing list