diff --git a/lib/matplotlib/sphinxext/ipython_console_highlighting.py b/lib/matplotlib/sphinxext/ipython_console_highlighting.py index c9bf1c1514ab..435046860541 100644 --- a/lib/matplotlib/sphinxext/ipython_console_highlighting.py +++ b/lib/matplotlib/sphinxext/ipython_console_highlighting.py @@ -20,6 +20,14 @@ from sphinx import highlighting +import warnings +warnings.warn(""" +The Sphinx extension ipython_console_highlighting has moved from +matplotlib to IPython, and its use in matplotlib is deprecated. +Change your import from 'matplotlib.sphinxext.ipython_directive' to +'IPython.sphinxext.ipython_directive.""", +matplotlib.cbook.mplDeprecation) + #----------------------------------------------------------------------------- # Global constants line_re = re.compile('.*?\n') diff --git a/lib/matplotlib/sphinxext/ipython_directive.py b/lib/matplotlib/sphinxext/ipython_directive.py index 63a8c5c21265..d2b3e20be2ec 100644 --- a/lib/matplotlib/sphinxext/ipython_directive.py +++ b/lib/matplotlib/sphinxext/ipython_directive.py @@ -79,6 +79,14 @@ matplotlib.use('Agg') +import warnings +warnings.warn(""" +The Sphinx ipython_directive has moved from matplotlib to IPython, and +its use within matplotlib is deprecated. Change your import from +'matplotlib.sphinxext.ipython_directive' to +'IPython.sphinxext.ipython_directive.""", +matplotlib.cbook.mplDeprecation) + # Our own try: from IPython import Config, InteractiveShell