Skip to content

Commit 9902c38

Browse files
NelleVtacaswell
authored andcommitted
Merge pull request #11928 from anntzer/sphinx18
Update doc/conf.py to avoid warnings with (future) sphinx 1.8.
1 parent 1fc42b3 commit 9902c38

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

doc/conf.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
'IPython.sphinxext.ipython_directive',
4040
'numpydoc', # Needs to be loaded *after* autodoc.
4141
'sphinx_gallery.gen_gallery',
42-
'matplotlib.sphinxext.mathmpl',
4342
'matplotlib.sphinxext.only_directives',
4443
'matplotlib.sphinxext.plot_directive',
4544
'sphinxext.custom_roles',
@@ -48,6 +47,8 @@
4847
'sphinxext.mock_gui_toolkits',
4948
'sphinxext.skip_deprecated',
5049
]
50+
if sphinx.version_info < (1, 8):
51+
extensions.append('matplotlib.sphinxext.mathmpl')
5152

5253
exclude_patterns = ['api/api_changes/*', 'users/whats_new/*']
5354

@@ -93,7 +94,10 @@ def _check_deps():
9394
autosummary_generate = True
9495

9596
autodoc_docstring_signature = True
96-
autodoc_default_flags = ['members', 'undoc-members']
97+
if sphinx.version_info < (1, 8):
98+
autodoc_default_flags = ['members', 'undoc-members']
99+
else:
100+
autodoc_default_options = {'members': None, 'undoc-members': None}
97101

98102
intersphinx_mapping = {
99103
'python': ('https://docs.python.org/3', None),

doc/sphinxext/github.py

-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def ghissue_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
7575
prb = inliner.problematic(rawtext, rawtext, msg)
7676
return [prb], [msg]
7777
app = inliner.document.settings.env.app
78-
#app.info('issue %r' % text)
7978
if 'pull' in name.lower():
8079
category = 'pull'
8180
elif 'issue' in name.lower():
@@ -105,7 +104,6 @@ def ghuser_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
105104
:param content: The directive content for customization.
106105
"""
107106
app = inliner.document.settings.env.app
108-
#app.info('user link %r' % text)
109107
ref = 'https://www.github.com/' + text
110108
node = nodes.reference(rawtext, text, refuri=ref, **options)
111109
return [node], []
@@ -126,7 +124,6 @@ def ghcommit_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
126124
:param content: The directive content for customization.
127125
"""
128126
app = inliner.document.settings.env.app
129-
#app.info('user link %r' % text)
130127
try:
131128
base = app.config.github_project_url
132129
if not base:
@@ -146,7 +143,6 @@ def setup(app):
146143
147144
:param app: Sphinx application context.
148145
"""
149-
app.info('Initializing GitHub plugin')
150146
app.add_role('ghissue', ghissue_role)
151147
app.add_role('ghpull', ghissue_role)
152148
app.add_role('ghuser', ghuser_role)

0 commit comments

Comments
 (0)