Merge branch '1.8'

This commit is contained in:
Takeshi KOMIYA 2019-01-26 13:40:19 +09:00
commit 36d628929e
3 changed files with 9 additions and 8 deletions

View File

@ -227,6 +227,7 @@ Bugs fixed
* #5966: mathjax has not been loaded on incremental build
* #5960: LaTeX: modified PDF layout since September 2018 TeXLive update of
:file:`parskip.sty`
* #5958: versionadded directive causes crash with Python 3.5.0
Testing
--------

View File

@ -8,7 +8,8 @@
:license: BSD, see LICENSE for details.
"""
from typing import NamedTuple, cast
from collections import namedtuple
from typing import cast
from docutils import nodes
@ -48,12 +49,9 @@ locale.versionlabels = DeprecatedDict(
)
ChangeSet = NamedTuple('ChangeSet', [('type', str),
('docname', str),
('lineno', int),
('module', str),
('descname', str),
('content', str)])
# TODO: move to typing.NamedTuple after dropping py35 support (see #5958)
ChangeSet = namedtuple('ChangeSet',
['type', 'docname', 'lineno', 'module', 'descname', 'content'])
class VersionChange(SphinxDirective):

View File

@ -58,7 +58,9 @@ def build_mo():
if not mo.parent.exists():
mo.parent.makedirs()
write_mo(mo, read_po(po))
if not mo.exists() or mo.stat().st_mtime < po.stat().st_mtime:
# compile .mo file only if needed
write_mo(mo, read_po(po))
return builder