8000 Deprecate IPython-related Sphinx extensions · matplotlib/matplotlib@fdf97c1 · GitHub
[go: up one dir, main page]

Skip to content

Commit fdf97c1

Browse files
committed
Deprecate IPython-related Sphinx extensions
1 parent fe96a1d commit fdf97c1

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

lib/matplotlib/sphinxext/ipython_console_highlighting.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323

2424
from sphinx import highlighting
2525

26+
import warnings
27+
warnings.warn("""
28+
The Sphinx extension ipython_console_highlighting has moved from
29+
matplotlib to IPython, and its use in matplotlib is deprecated.
30+
Change your import from 'matplotlib.sphinxext.ipython_directive' to
31+
'IPython.sphinxext.ipython_directive.""",
32+
matplotlib.cbook.mplDeprecation)
33+
2634
#-----------------------------------------------------------------------------
2735
# Global constants
2836
line_re = re.compile('.*?\n')

lib/matplotlib/sphinxext/ipython_directive.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@
8080

8181
matplotlib.use('Agg')
8282

83+
import warnings
84+
warnings.warn("""
85+
The Sphinx ipython_directive has moved from matplotlib to IPython, and
86+
its use within matplotlib is deprecated. Change your import from
87+
'matplotlib.sphinxext.ipython_directive' to
88+
'IPython.sphinxext.ipython_directive.""",
89+
matplotlib.cbook.mplDeprecation)
90+
8391
# Our own
8492
try:
8593
from IPython import Config, InteractiveShell

0 commit comments

Comments
 (0)
0