Skip to content

Commit 736cc76

Browse files
committed
Require sphinx >= 1.8
1 parent 02d6842 commit 736cc76

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

numpydoc/docscrape_sphinx.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,7 @@ def _str_references(self):
337337
out += ['']
338338
# Latex collects all references to a separate bibliography,
339339
# so we need to insert links to it
340-
if sphinx.__version__ >= "0.6":
341-
out += ['.. only:: latex', '']
342-
else:
343-
out += ['.. latexonly::', '']
340+
out += ['.. only:: latex', '']
344341
items = []
345342
for line in self['References']:
346343
m = re.match(r'.. \[([a-z0-9._-]+)\]', line, re.I)

numpydoc/numpydoc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
from sphinx.util import logging
3131
from sphinx.errors import ExtensionError
3232

33-
if sphinx.__version__ < '1.6.5':
34-
raise RuntimeError("Sphinx 1.6.5 or newer is required")
33+
if sphinx.__version__ < '1.8':
34+
raise RuntimeError("Sphinx 1.8 or newer is required")
3535

3636
from .docscrape_sphinx import get_doc_object
3737
from .validate import validate, ERROR_MSGS

numpydoc/tests/test_full.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from distutils.version import LooseVersion
21
import os.path as op
32
import re
43
import shutil
@@ -25,10 +24,7 @@ def ignore(src, names):
2524
conf_dir = temp_dir
2625
out_dir = op.join(temp_dir, '_build', 'html')
2726
toctrees_dir = op.join(temp_dir, '_build', 'toctrees')
28-
# Set behavior across different Sphinx versions
29-
kwargs = dict()
30-
if LooseVersion(sphinx.__version__) >= LooseVersion('1.8'):
31-
kwargs.update(warningiserror=True, keep_going=True)
27+
kwargs = {'warningiserror': True, 'keep_going': True}
3228
# Avoid warnings about re-registration, see:
3329
# https://github.com/sphinx-doc/sphinx/issues/5038
3430
with docutils_namespace():

0 commit comments

Comments
 (0)