You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
autodoc does not support unicode docstrings #47291
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/birkenfeld'closed_at=<Date2008-06-05.17:06:46.555>created_at=<Date2008-06-05.10:21:33.434>labels= ['type-crash', 'docs']
title='autodoc does not support unicode docstrings'updated_at=<Date2017-04-11.10:06:41.096>user='https://bugs.python.org/cdevienne'
--- 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:
Activity
cdevienne commentedon Jun 5, 2008
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
===================================================================
birkenfeld commentedon Jun 5, 2008
Thanks, fixed in r63958.