Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 71c77f0

Browse filesBrowse files
committed
Merge pull request #2671 from mdboom/deprecate_ipython_directive
Deprecate IPython-related Sphinx extensions
2 parents fe96a1d + 0cdac1e commit 71c77f0
Copy full SHA for 71c77f0

File tree

Expand file treeCollapse file tree

3 files changed

+19
-0
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+19
-0
lines changed

‎doc/api/api_changes.rst

Copy file name to clipboardExpand all lines: doc/api/api_changes.rst
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ original location:
4747
- mstream -> `from matplotlib import stream as mstream`
4848
- mtable -> `from matplotlib import table as mtable`
4949

50+
* The Sphinx extensions `ipython_directive` and
51+
`ipython_console_highlighting` have been moved to the IPython
52+
project itself. While they remain in matplotlib for this release,
53+
they have been deprecated. Update your extensions in `conf.py` to
54+
point to `IPython.sphinxext.ipython_directive` instead of
55+
`matplotlib.sphinxext.ipython_directive`.
5056

5157
* In :module:`~matplotlib.finance`, almost all functions have been deprecated and
5258
replaced with a pair of functions name `*_ochl` and `*_ohlc`. The former is

‎lib/matplotlib/sphinxext/ipython_console_highlighting.py

Copy file name to clipboardExpand all lines: lib/matplotlib/sphinxext/ipython_console_highlighting.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
from pygments.token import Comment, Generic
2323

2424
from sphinx import highlighting
25+
import matplotlib
26+
27+
matplotlib.cbook.warn_deprecated("1.4", """
28+
The Sphinx extension ipython_console_highlighting has moved from
29+
matplotlib to IPython, and its use in matplotlib is deprecated.
30+
Change your import from 'matplotlib.sphinxext.ipython_directive' to
31+
'IPython.sphinxext.ipython_directive.""")
2532

2633
#-----------------------------------------------------------------------------
2734
# Global constants

‎lib/matplotlib/sphinxext/ipython_directive.py

Copy file name to clipboardExpand all lines: lib/matplotlib/sphinxext/ipython_directive.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@
8080

8181
matplotlib.use('Agg')
8282

83+
matplotlib.cbook.warn_deprecated("1.4", """
84+
The Sphinx extension ipython_console_highlighting has moved from
85+
matplotlib to IPython, and its use in matplotlib is deprecated.
86+
Change your import from 'matplotlib.sphinxext.ipython_directive' to
87+
'IPython.sphinxext.ipython_directive.""")
88+
8389
# Our own
8490
try:
8591
from IPython import Config, InteractiveShell

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.