Commits

Georg Brandl committed 17e9d63 Merge

merge with Takayuki's sphinx-fix-testing-fork

  • Participants
  • Parent commits d100662, 15524a0

Comments (0)

Files changed (6)

sphinx/environment.py

             app.emit('doctree-read', doctree)
 
         # store time of build, for outdated files detection
-        self.all_docs[docname] = time.time()
+        # (Some filesystems have coarse timestamp resolution;
+        # therefore time.time() can be older than filesystem's timestamp.
+        # For example, FAT32 has 2sec timestamp resolution.)
+        self.all_docs[docname] = max(
+                time.time(), path.getmtime(self.doc2path(docname)))
 
         if self.versioning_condition:
             # get old doctree

sphinx/ext/autodoc.py

File contents unchanged.

sphinx/ext/intersphinx.py

         for name, _, invdata in cache.itervalues():
             if name:
                 env.intersphinx_named_inventory[name] = invdata
-            for type, objects in invdata.iteritems():
-                env.intersphinx_inventory.setdefault(
-                    type, {}).update(objects)
+            else:
+                for type, objects in invdata.iteritems():
+                    env.intersphinx_inventory.setdefault(
+                        type, {}).update(objects)
 
 
 def missing_reference(app, env, node, contnode):

sphinx/util/__init__.py

File contents unchanged.

tests/test_linkcode.py

 def test_html(app):
     app.builder.build_all()
 
-    fp = open(os.path.join(app.outdir, 'objects.html'), 'rb')
+    fp = open(os.path.join(app.outdir, 'objects.html'), 'r')
     try:
         stuff = fp.read()
     finally:

tox.ini

File contents unchanged.