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

This commit is contained in:
Georg Brandl
2012-11-01 17:56:16 +01:00
3 changed files with 10 additions and 5 deletions

View File

@@ -787,7 +787,11 @@ class BuildEnvironment:
app.emit('doctree-read', doctree) app.emit('doctree-read', doctree)
# store time of build, for outdated files detection # 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: if self.versioning_condition:
# get old doctree # get old doctree

View File

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

View File

@@ -16,7 +16,7 @@ from util import *
def test_html(app): def test_html(app):
app.builder.build_all() 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: try:
stuff = fp.read() stuff = fp.read()
finally: finally: