Skip to content

Commit a7c0070

Browse files
committed
Remove the doctest extension in favour of using pytest-doctestplus
1 parent 098fd10 commit a7c0070

File tree

2 files changed

+17
-81
lines changed

2 files changed

+17
-81
lines changed

sphinx_astropy/conf/v1.py

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
import sphinx
1919
from distutils.version import LooseVersion
2020

21+
import pytest_doctestplus.sphinx.doctestplus
22+
2123
try:
2224
import astropy
2325
except ImportError:
@@ -199,31 +201,21 @@ def check_sphinx_version(expected_version):
199201
# Add any Sphinx extension module names here, as strings. They can be
200202
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
201203
# ones.
202-
extensions = [
203-
'sphinx_astropy.ext.intersphinx_toggle',
204-
'sphinx.ext.autodoc',
205-
'sphinx.ext.intersphinx',
206-
'sphinx.ext.todo',
207-
'sphinx.ext.coverage',
208-
'sphinx.ext.inheritance_diagram',
209-
'sphinx.ext.viewcode',
210-
'numpydoc',
211-
'sphinx_automodapi.automodapi',
212-
'sphinx_automodapi.smart_resolver',
213-
'sphinx_astropy.ext.changelog_links',
214-
'sphinx_astropy.ext.generate_config',
215-
'sphinx_astropy.ext.missing_static',
216-
'sphinx.ext.mathjax']
217-
218-
try:
219-
# Do this while in deprecation
220-
import pytest_doctestplus.sphinx.doctestplus
221-
extensions += ['pytest_doctestplus.sphinx.doctestplus']
222-
except ImportError:
223-
warnings.warn("sphinx_astropy.ext.doctest has been deprecated "
224-
"use the doctestplus extensions from pytest-doctestplus: "
225-
"pytest_doctestplus.sphinx.doctestplus.",DeprecationWarning)
226-
extensions += ['sphinx_astropy.ext.doctest']
204+
extensions = ['sphinx_astropy.ext.intersphinx_toggle',
205+
'sphinx.ext.autodoc',
206+
'sphinx.ext.intersphinx',
207+
'sphinx.ext.todo',
208+
'sphinx.ext.coverage',
209+
'sphinx.ext.inheritance_diagram',
210+
'sphinx.ext.viewcode',
211+
'numpydoc',
212+
'sphinx_automodapi.automodapi',
213+
'sphinx_automodapi.smart_resolver',
214+
'sphinx_astropy.ext.changelog_links',
215+
'sphinx_astropy.ext.generate_config',
216+
'sphinx_astropy.ext.missing_static',
217+
'sphinx.ext.mathjax',
218+
'pytest_doctestplus.sphinx.doctestplus']
227219

228220
try:
229221
import matplotlib.sphinxext.plot_directive

sphinx_astropy/ext/doctest.py

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)