Skip to content

Deprecate IPython-related Sphinx extensions #2671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 12, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/api/api_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions lib/matplotlib/sphinxext/ipython_console_highlighting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions lib/matplotlib/sphinxext/ipython_directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down