mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge with trunk
This commit is contained in:
commit
0d029eeb9c
8
CHANGES
8
CHANGES
@ -39,9 +39,15 @@ Release 1.0 (in development)
|
||||
* Added simplified Chinese locale.
|
||||
|
||||
|
||||
Release 0.6.3 (in development)
|
||||
Release 0.6.4 (in development)
|
||||
==============================
|
||||
|
||||
|
||||
Release 0.6.3 (Sep 03, 2009)
|
||||
============================
|
||||
|
||||
* Properly add C module filenames as dependencies in autodoc.
|
||||
|
||||
* #253: Ignore graphviz directives without content instead of
|
||||
raising an unhandled exception.
|
||||
|
||||
|
@ -29,7 +29,7 @@ from sphinx.domains import all_domains
|
||||
from sphinx.builders import BUILTIN_BUILDERS
|
||||
from sphinx.directives import GenericDesc, Target, additional_xref_types
|
||||
from sphinx.environment import BuildEnvironment, SphinxStandaloneReader
|
||||
from sphinx.util import pycompat
|
||||
from sphinx.util import pycompat # imported for side-effects
|
||||
from sphinx.util.tags import Tags
|
||||
from sphinx.util.compat import Directive, directive_dwim
|
||||
from sphinx.util.console import bold
|
||||
|
@ -10,7 +10,6 @@
|
||||
"""
|
||||
|
||||
import codecs
|
||||
import shutil
|
||||
from os import path
|
||||
from cgi import escape
|
||||
|
||||
|
@ -22,11 +22,6 @@ import cPickle as pickle
|
||||
from os import path
|
||||
from glob import glob
|
||||
from itertools import izip, groupby
|
||||
try:
|
||||
from hashlib import md5
|
||||
except ImportError:
|
||||
# 2.4 compatibility
|
||||
from md5 import md5
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.io import FileInput, NullOutput
|
||||
|
@ -14,8 +14,7 @@
|
||||
import re
|
||||
import sys
|
||||
import inspect
|
||||
from types import ModuleType, FunctionType, BuiltinFunctionType, MethodType, \
|
||||
ClassType
|
||||
from types import FunctionType, BuiltinFunctionType, MethodType, ClassType
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.utils import assemble_option_dict
|
||||
@ -626,11 +625,15 @@ class Documenter(object):
|
||||
# try to also get a source code analyzer for attribute docs
|
||||
try:
|
||||
self.analyzer = ModuleAnalyzer.for_module(self.real_modname)
|
||||
# parse right now, to get PycodeErrors on parsing
|
||||
self.analyzer.parse()
|
||||
# parse right now, to get PycodeErrors on parsing (results will
|
||||
# be cached anyway)
|
||||
self.analyzer.find_attr_docs()
|
||||
except PycodeError, err:
|
||||
# no source file -- e.g. for builtin and C modules
|
||||
self.analyzer = None
|
||||
# at least add the module.__file__ as a dependency
|
||||
if hasattr(self.module, '__file__') and self.module.__file__:
|
||||
self.directive.filename_set.add(self.module.__file__)
|
||||
else:
|
||||
self.directive.filename_set.add(self.analyzer.srcname)
|
||||
|
||||
|
@ -10,9 +10,7 @@
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import posixpath
|
||||
from os import path
|
||||
from subprocess import Popen, PIPE
|
||||
|
@ -36,11 +36,9 @@
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import inspect
|
||||
import subprocess
|
||||
try:
|
||||
from hashlib import md5
|
||||
except ImportError:
|
||||
|
@ -9,7 +9,6 @@
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
import codecs
|
||||
from os import path
|
||||
from pprint import pformat
|
||||
|
||||
|
@ -234,6 +234,8 @@ class ModuleAnalyzer(object):
|
||||
attr_visitor = AttrDocVisitor(number2name, scope, self.encoding)
|
||||
attr_visitor.visit(self.parsetree)
|
||||
self.attr_docs = attr_visitor.collected
|
||||
# now that we found everything we could in the tree, throw it away
|
||||
# (it takes quite a bit of memory for large modules)
|
||||
self.parsetree = None
|
||||
return attr_visitor.collected
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
"""
|
||||
import re
|
||||
import cPickle as pickle
|
||||
from cStringIO import StringIO
|
||||
|
||||
from docutils.nodes import comment, Text, NodeVisitor, SkipNode
|
||||
|
||||
|
@ -443,7 +443,7 @@ def split_explicit_title(text):
|
||||
"""Split role content into title and target, if given."""
|
||||
match = explicit_title_re.match(text)
|
||||
if match:
|
||||
return True, m.group(1), m.group(2)
|
||||
return True, match.group(1), match.group(2)
|
||||
return False, text, text
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user