Fix #2602: URL redirection breaks the hyperlinks generated by sphinx.ext.intersphinx

This commit is contained in:
Takeshi KOMIYA 2016-05-31 23:22:01 +09:00
parent f147df3fa0
commit 851929c912
2 changed files with 7 additions and 0 deletions

View File

@ -8,6 +8,7 @@ Bugs fixed
* ``width`` option of figure directive does not work if ``align`` option specified at same time (ref: #2595)
* #2590: The ``inputenc`` package breaks compiling under lualatex and xelatex
* #2540: date on latex front page use different font
* #2602: URL redirection breaks the hyperlinks generated by `sphinx.ext.intersphinx`
Release 1.4.2 (released May 29, 2016)

View File

@ -237,6 +237,12 @@ def fetch_inventory(app, uri, inv):
'%s: %s' % (inv, err.__class__, err))
return
try:
newuri = f.geturl()
if newuri.endswith("/" + INVENTORY_FILENAME):
newuri = newuri[:-len(INVENTORY_FILENAME) - 1]
if uri != newuri:
app.info('intersphinx inventory has moved: %s -> %s' % (uri, newuri))
uri = newuri
line = f.readline().rstrip().decode('utf-8')
try:
if line == '# Sphinx inventory version 1':