mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch '1.8'
This commit is contained in:
commit
36d628929e
1
CHANGES
1
CHANGES
@ -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
|
||||
--------
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user