diff --git a/CHANGES b/CHANGES
index 54fe76bbd..85982d05e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -47,6 +47,13 @@ Release 1.0 (in development)
Release 0.6.4 (in development)
==============================
+* #299: Fix the mangling of quotes in some literal blocks.
+
+* #292: Fix path to the search index for the ``dirhtml`` builder.
+
+* Fix a Jython compatibility issue: make the dependence on the
+ ``parser`` module optional.
+
* #238: In autodoc, catch all errors that occur on module import,
not just ``ImportError``.
diff --git a/EXAMPLES b/EXAMPLES
index 9d97c8156..dd203d463 100644
--- a/EXAMPLES
+++ b/EXAMPLES
@@ -46,10 +46,12 @@ included, please mail to `the Google group
* ObjectListView: http://objectlistview.sourceforge.net/python
* Open ERP: http://doc.openerp.com/
* OpenEXR: http://excamera.com/articles/26/doc/index.html
+* OpenGDA: http://www.opengda.org/gdadoc/html/
* OpenLayers: http://docs.openlayers.org/
* openWNS: http://docs.openwns.org/
* Paste: http://pythonpaste.org/script/
* Paver: http://www.blueskyonmars.com/projects/paver/
+* Peach^3: http://peach3.nl/doc/latest/userdoc/
* Py on Windows: http://timgolden.me.uk/python-on-windows/
* Pyccuracy: http://www.pyccuracy.org/
* PyCuda: http://documen.tician.de/pycuda/
@@ -62,6 +64,7 @@ included, please mail to `the Google group
* PyPubSub: http://pubsub.sourceforge.net/
* pyrticle: http://documen.tician.de/pyrticle/
* Pysparse: http://pysparse.sourceforge.net/
+* PyTango: http://www.tango-controls.org/static/PyTango/latest/doc/html/index.html
* Python: http://docs.python.org/
* python-apt: http://people.debian.org/~jak/python-apt-doc/
* PyUblas: http://documen.tician.de/pyublas/
diff --git a/doc/ext/autosummary.rst b/doc/ext/autosummary.rst
index f270a67b6..5a206dd50 100644
--- a/doc/ext/autosummary.rst
+++ b/doc/ext/autosummary.rst
@@ -214,7 +214,7 @@ The following variables available in the templates:
List containing names of "public" methods in the class. Only available for
classes.
-.. data:: methods
+.. data:: attributes
List containing names of "public" attributes in the class. Only available
for classes.
diff --git a/doc/templating.rst b/doc/templating.rst
index 61657547d..0148ed32c 100644
--- a/doc/templating.rst
+++ b/doc/templating.rst
@@ -74,8 +74,8 @@ render the block's content in the extended template -- unless you don't want
that content to show up.
-Working the the builtin templates
----------------------------------
+Working with the builtin templates
+----------------------------------
The builtin **basic** theme supplies the templates that all builtin Sphinx
themes are based on. It has the following elements you can override or use:
diff --git a/sphinx/builders/__init__.py b/sphinx/builders/__init__.py
index a8fc8871c..9ca35cc38 100644
--- a/sphinx/builders/__init__.py
+++ b/sphinx/builders/__init__.py
@@ -16,7 +16,7 @@ from os import path
from docutils import nodes
from sphinx import package_dir, locale
-from sphinx.util import SEP, relative_uri
+from sphinx.util import SEP, EEXIST, relative_uri
from sphinx.environment import BuildEnvironment
from sphinx.util.console import bold, purple, darkgreen, term_width_line
@@ -210,7 +210,7 @@ class Builder(object):
path.join(self.doctreedir, ENV_PICKLE_FILENAME))
self.info('done')
except Exception, err:
- if type(err) is IOError and err.errno == 2:
+ if type(err) is IOError and err.errno == EEXIST:
self.info('not found')
else:
self.info('failed: %s' % err)
diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py
index 449d9524a..e804cb1e2 100644
--- a/sphinx/ext/graphviz.py
+++ b/sphinx/ext/graphviz.py
@@ -22,7 +22,7 @@ except ImportError:
from docutils import nodes
from sphinx.errors import SphinxError
-from sphinx.util import ensuredir
+from sphinx.util import ensuredir, ENOENT
from sphinx.util.compat import Directive
@@ -111,7 +111,7 @@ def render_dot(self, code, options, format, prefix='graphviz'):
try:
p = Popen(dot_args, stdout=PIPE, stdin=PIPE, stderr=PIPE)
except OSError, err:
- if err.errno != 2: # No such file or directory
+ if err.errno != ENOENT: # No such file or directory
raise
self.builder.warn('dot command %r cannot be run (needed for graphviz '
'output), check the graphviz_dot setting' %
diff --git a/sphinx/ext/pngmath.py b/sphinx/ext/pngmath.py
index 02f46e3d3..a3df27e43 100644
--- a/sphinx/ext/pngmath.py
+++ b/sphinx/ext/pngmath.py
@@ -23,7 +23,7 @@ except ImportError:
from docutils import nodes
from sphinx.errors import SphinxError
-from sphinx.util import ensuredir
+from sphinx.util import ensuredir, ENOENT
from sphinx.util.png import read_png_depth, write_png_depth
from sphinx.ext.mathbase import setup_math as mathbase_setup, wrap_displaymath
@@ -119,7 +119,7 @@ def render_math(self, math):
try:
p = Popen(ltx_args, stdout=PIPE, stderr=PIPE)
except OSError, err:
- if err.errno != 2: # No such file or directory
+ if err.errno != ENOENT: # No such file or directory
raise
self.builder.warn('LaTeX command %r cannot be run (needed for math '
'display), check the pngmath_latex setting' %
@@ -147,7 +147,7 @@ def render_math(self, math):
try:
p = Popen(dvipng_args, stdout=PIPE, stderr=PIPE)
except OSError, err:
- if err.errno != 2: # No such file or directory
+ if err.errno != ENOENT: # No such file or directory
raise
self.builder.warn('dvipng command %r cannot be run (needed for math '
'display), check the pngmath_dvipng setting' %
diff --git a/sphinx/themes/basic/search.html b/sphinx/themes/basic/search.html
index 224d87b86..96c406527 100644
--- a/sphinx/themes/basic/search.html
+++ b/sphinx/themes/basic/search.html
@@ -41,5 +41,5 @@
{% endblock %}
{% block footer %}
{{ super() }}
-
+
{% endblock %}
diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py
index 46408d48a..b0b758ca3 100644
--- a/sphinx/util/__init__.py
+++ b/sphinx/util/__init__.py
@@ -26,6 +26,9 @@ from os import path
import docutils
import sphinx
+# Errnos that we need.
+EEXIST = getattr(errno, 'EEXIST', 0)
+ENOENT = getattr(errno, 'ENOENT', 0)
# Generally useful regular expressions.
ws_re = re.compile(r'\s+')
@@ -70,7 +73,7 @@ def ensuredir(path):
os.makedirs(path)
except OSError, err:
# 0 for Jython/Win32
- if err.errno not in [0, getattr(errno, 'EEXIST', 0)]:
+ if err.errno not in [0, EEXIST]:
raise
diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py
index 851aa909c..95c389c71 100644
--- a/sphinx/writers/html.py
+++ b/sphinx/writers/html.py
@@ -501,6 +501,12 @@ class SmartyPantsHTMLTranslator(HTMLTranslator):
finally:
self.no_smarty -= 1
+ def visit_literal_block(self, node):
+ self.no_smarty += 1
+
+ def depart_literal_block(self, node):
+ self.no_smarty -= 1
+
def visit_literal_emphasis(self, node):
self.no_smarty += 1
self.visit_emphasis(node)
diff --git a/tests/root/includes.txt b/tests/root/includes.txt
index da36503b3..eb8d46e44 100644
--- a/tests/root/includes.txt
+++ b/tests/root/includes.txt
@@ -56,3 +56,12 @@ Test if dedenting before parsing works.
.. cssclass:: inc-pyobj-dedent
.. literalinclude:: literal.inc
:pyobject: Bar.baz
+
+Docutils include with "literal"
+===============================
+
+While not recommended, it should work (and leave quotes alone).
+
+.. include:: quotes.inc
+ :literal:
+ :tab-width: 4
diff --git a/tests/root/quotes.inc b/tests/root/quotes.inc
new file mode 100644
index 000000000..276cc56ba
--- /dev/null
+++ b/tests/root/quotes.inc
@@ -0,0 +1 @@
+Testing "quotes" in literal 'included' text.
diff --git a/tests/test_build.py b/tests/test_build.py
index 6668e2453..47311f276 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -77,6 +77,8 @@ HTML_XPATH = {
".//pre": u'Max Strauß',
".//a[@href='_downloads/img.png']": '',
".//a[@href='_downloads/img1.png']": '',
+ ".//pre": u'"quotes"',
+ ".//pre": u"'included'",
},
'autodoc.html': {
".//dt[@id='test_autodoc.Class']": '',