Ticket #13616: 13616_1.diff

File 13616_1.diff, 1.1 KB (added by Andrii Kurinnyi, 14 years ago)

Allows to build docs with new Sphinx. It is better to use Sphinx==dev, because Sphinx==1.0b1 throws unicode exception at the end

  • docs/_ext/djangodocs.py

    diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
    index aaad219..2a3d6d9 100644
    a b def parse_version_directive(name, arguments, options, content, lineno,  
    8383        if content:
    8484            state.nested_parse(content, content_offset, node)
    8585        ret = ret + messages
    86     env.note_versionchange(node['type'], node['version'], node, lineno)
     86    env.versionchanges.setdefault(node['version'], []).append(
     87        (node['type'], env.temp_data['docname'], lineno,
     88        env.temp_data.get('py_module'),
     89        env.temp_data.get('object'),
     90        node.astext()))
    8791    return ret
    8892
    8993               
    def parse_django_admin_node(env, sig, signode):  
    195199def parse_django_adminopt_node(env, sig, signode):
    196200    """A copy of sphinx.directives.CmdoptionDesc.parse_signature()"""
    197201    from sphinx import addnodes
    198     from sphinx.directives.desc import option_desc_re
     202    from sphinx.domains.std import option_desc_re
    199203    count = 0
    200204    firstname = ''
    201205    for m in option_desc_re.finditer(sig):
Back to Top