Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bd122ee

Browse files
committed
Require sphinx>=3 & numpydoc>=1.0 for building docs.
both are nearly two years old now (so OK wrt NEP29); the version bump allows dropping some backcompat code.
1 parent 826e685 commit bd122ee

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sphinx>=3.0 and numpydoc>=1.0 are now required for building the docs
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

doc/conf.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@
4949
# usage in the gallery.
5050
warnings.filterwarnings('error', append=True)
5151

52-
# Strip backslashes in function's signature
53-
# To be removed when numpydoc > 0.9.x
54-
strip_signature_backslash = True
55-
5652
# Add any Sphinx extension module names here, as strings. They can be
5753
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
5854
extensions = [
@@ -144,9 +140,7 @@ def _check_dependencies():
144140
warnings.filterwarnings('ignore', category=DeprecationWarning,
145141
module='sphinx.util.inspect')
146142

147-
# missing-references names matches sphinx>=3 behavior, so we can't be nitpicky
148-
# for older sphinxes.
149-
nitpicky = sphinx.version_info >= (3,)
143+
nitpicky = True
150144
# change this to True to update the allowed failures
151145
missing_references_write_json = False
152146
missing_references_warn_unused_ignores = False
@@ -429,7 +423,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
429423
# Sphinx 2.0 adopts GNU FreeFont by default, but it does not have all
430424
# the Unicode codepoints needed for the section about Mathtext
431425
# "Writing mathematical expressions"
432-
fontpkg = r"""
426+
latex_elements['fontpkg'] = r"""
433427
\IfFontExistsTF{XITS}{
434428
\setmainfont{XITS}
435429
}{
@@ -469,12 +463,7 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
469463
Extension = .otf,
470464
]}
471465
"""
472-
latex_elements['fontpkg'] = fontpkg
473466

474-
# Sphinx <1.8.0 or >=2.0.0 does this by default, but the 1.8.x series
475-
# did not for latex_engine = 'xelatex' (as it used Latin Modern font).
476-
# We need this for code-blocks as FreeMono has wide glyphs.
477-
latex_elements['fvset'] = r'\fvset{fontsize=\small}'
478467
# Fix fancyhdr complaining about \headheight being too small
479468
latex_elements['passoptionstopackages'] = r"""
480469
\PassOptionsToPackage{headheight=14pt}{geometry}

requirements/doc/doc-requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
# Install the documentation requirements with:
88
# pip install -r requirements/doc/doc-requirements.txt
99
#
10-
sphinx>=1.8.1,!=2.0.0
10+
sphinx>=3.0.0
1111
colorspacious
1212
ipython
1313
ipywidgets
14-
numpydoc>=0.8
14+
numpydoc>=1.0
1515
packaging>=20
1616
pydata-sphinx-theme>=0.8.0
1717
mpl-sphinx-theme

0 commit comments

Comments
 (0)