diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index 76f328f3ecb3..7e70a16e68c7 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -47,6 +47,12 @@ original location: - mstream -> `from matplotlib import stream as mstream` - mtable -> `from matplotlib import table as mtable` +* The Sphinx extensions `ipython_directive` and + `ipython_console_highlighting` have been moved to the IPython + project itself. While they remain in matplotlib for this release, + they have been deprecated. Update your extensions in `conf.py` to + point to `IPython.sphinxext.ipython_directive` instead of + `matplotlib.sphinxext.ipython_directive`. * In :module:`~matplotlib.finance`, almost all functions have been deprecated and replaced with a pair of functions name `*_ochl` and `*_ohlc`. The former is diff --git a/lib/matplotlib/sphinxext/ipython_console_highlighting.py b/lib/matplotlib/sphinxext/ipython_console_highlighting.py index 4d32e9abaf33..0ba9cab40307 100644 --- a/lib/matplotlib/sphinxext/ipython_console_highlighting.py +++ b/lib/matplotlib/sphinxext/ipython_console_highlighting.py @@ -22,6 +22,13 @@ from pygments.token import Comment, Generic from sphinx import highlighting +import matplotlib + +matplotlib.cbook.warn_deprecated("1.4", """ +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.""") #----------------------------------------------------------------------------- # Global constants diff --git a/lib/matplotlib/sphinxext/ipython_directive.py b/lib/matplotlib/sphinxext/ipython_directive.py index 69cefd99d5c8..01c64a3ce721 100644 --- a/lib/matplotlib/sphinxext/ipython_directive.py +++ b/lib/matplotlib/sphinxext/ipython_directive.py @@ -80,6 +80,12 @@ matplotlib.use('Agg') +matplotlib.cbook.warn_deprecated("1.4", """ +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.""") + # Our own try: from IPython import Config, InteractiveShell
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: