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

Skip to content

Deprecate IPython-related Sphinx extensions #2666

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

Closed
wants to merge 1 commit into from
Closed
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
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 @@ -20,6 +20,14 @@

from sphinx import highlighting

import warnings
warnings.warn("""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for not using the matplotlib.cbook deprecation function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Insufficient coffee... 😉

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 @@ -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
Expand Down
0