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

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

View File

@ -787,7 +787,11 @@ class BuildEnvironment:
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

View File

@ -191,9 +191,10 @@ def load_mappings(app):
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):

View File

@ -16,7 +16,7 @@ from util import *
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: