8000 Deprecate IPython-related Sphinx extensions by mdboom · Pull Request #2671 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

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 1 commit
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
Next Next commit
Deprecate IPython-related Sphinx extensions
  • Loading branch information
mdboom committed Dec 11, 2013
commit fdf97c14d517e2d3f38068732427145e9339204b
8 changes: 8 additions & 0 deletions lib/matplotlib/sphinxext/ipython_console_highlighting.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,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')
Expand Down
8 changes: 8 additions & 0 deletions lib/matplotlib/sphinxext/ipython_directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,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
Expand Down
0