Commits

pv committed d24425e Merge

Merge with sphinx trunk

  • Participants
  • Parent commits 22e0f09, 5fcfbfc

Comments (0)

Files changed (12)

 Release 0.6.2 (in development)
 ==============================
 
+* #155: Fix Python 2.4 compatibility: exceptions are old-style
+  classes there.
+
+* #150: Fix display of the "sphinxdoc" theme on Internet Explorer
+  versions 6 and 7.
+
 * #146: Don't fail to generate LaTeX when the user has an active
   ``.docutils`` configuration.
 
 check:
 	@$(PYTHON) utils/check_sources.py -i sphinx/style/jquery.js \
 		-i sphinx/pycode/pgen2 -i sphinx/util/smartypants.py \
-		-i doc/_build -i ez_setup.py -i tests/path.py .
+		-i doc/_build -i ez_setup.py -i tests/path.py -i tests/coverage.py .
 
 clean: clean-pyc clean-patchfiles
 

sphinx/cmdline.py

 
 
 def main(argv):
-    if not sys.stdout.isatty() or not color_terminal():
+    if not color_terminal():
         # Windows' poor cmd box doesn't understand ANSI sequences
         nocolor()
 
     category = 'Extension error'
 
     def __init__(self, message, orig_exc=None):
-        super(ExtensionError, self).__init__(message)
+        SphinxError.__init__(self, message)
         self.orig_exc = orig_exc
 
     def __repr__(self):
         return '%s(%r)' % (self.__class__.__name__, self.message)
 
     def __str__(self):
-        parent_str = super(ExtensionError, self).__str__()
+        parent_str = SphinxError.__str__(self)
         if self.orig_exc:
             return '%s (exception: %s)' % (parent_str, self.orig_exc)
         return parent_str

sphinx/quickstart.py

     d = {}
     texescape.init()
 
-    if not sys.stdout.isatty() or not color_terminal():
+    if not color_terminal():
         nocolor()
 
     print bold('Welcome to the Sphinx quickstart utility.')

sphinx/setup_command.py

 from distutils.cmd import Command
 
 from sphinx.application import Sphinx
-from sphinx.util.console import darkred, nocolor
+from sphinx.util.console import darkred, nocolor, color_terminal
 
 
 class BuildDoc(Command):
         self.mkpath(self.builder_target_dir)
 
     def run(self):
-        if not sys.stdout.isatty() or sys.platform == 'win32':
+        if not color_terminal():
             # Windows' poor cmd box doesn't understand ANSI sequences
             nocolor()
         if not self.verbose:

sphinx/themes/basic/static/basic.css

 
 /* -- main layout ----------------------------------------------------------- */
 
-div.documentwrapper {
-    float: left;
-    width: 100%;
-}
-
-div.bodywrapper {
-    margin: 0 0 0 230px;
-}
-
 div.clearer {
     clear: both;
 }

sphinx/themes/default/static/default.css_t

     background-color: {{ theme_sidebarbgcolor }};
 }
 
+div.documentwrapper {
+    float: left;
+    width: 100%;
+}
+
+div.bodywrapper {
+    margin: 0 0 0 230px;
+}
+
 div.body {
     background-color: {{ theme_bgcolor }};
     color: {{ theme_textcolor }};

sphinx/themes/sphinxdoc/static/sphinxdoc.css

     min-width: 740px;
 }
 
-div.documentwrapper {
-    float: none;
-}
-
 div.document {
     background-color: white;
     text-align: left;

sphinx/util/console.py

 """
 
 import os
+import sys
 
 codes = {}
 
         return text.ljust(_tw) + '\r'
 
 def color_terminal():
+    if not hasattr(sys.stdout, 'isatty'):
+        return False
+    if not sys.stdout.isatty():
+        return False
     if 'COLORTERM' in os.environ:
         return True
     term = os.environ.get('TERM', 'dumb').lower()

sphinx/writers/html.py

                                  u'title="%s">\u00B6</a>' %
                                  _('Permalink to this headline'))
             elif close_tag.startswith('</a></h'):
-                self.body.append(u'</a><a class="headerlink" href="#%s" ' % aname +
+                self.body.append(u'</a><a class="headerlink" href="#%s" ' %
+                                 aname +
                                  u'title="%s">\u00B6' %
                                  _('Permalink to this headline'))
-                
+
         BaseTranslator.depart_title(self, node)
 
     def unknown_visit(self, node):

tests/test_markup.py

 
 def test_latex_escaping():
     # correct escaping in normal mode
-    yield verify, u'Γ\\\\∞$', None, \
-          ur'\(\Gamma\)\textbackslash{}\(\infty\)\$'
+    yield (verify, u'Γ\\\\∞$', None,
+           ur'\(\Gamma\)\textbackslash{}\(\infty\)\$')
     # in verbatim code fragments
     yield (verify, u'::\n\n @Γ\\∞$[]', None,
            u'\\begin{Verbatim}[commandchars=@\\[\\]]\n'