-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Deprecate mpl #1670
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
Deprecate mpl #1670
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2ac7b88
deprecate undocumented `matplotlib/mpl.py`
ivanov d700152
move to the new MatplotlibDeprecationWarning
ivanov d277c4e
added deprecation note to API changes
ivanov 6511650
use mplDeprecation convention
ivanov 088677c
Add more verbose removal warning stating version
dmcdougall File filter
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 undocumented
matplotlib/mpl.py
`matplotlib/mpl.py` is a file which used to get imported via ipython's `%pyplot` interface as module named `mpl`, yet it isn't clear at all what it's role is. Given that in our own code, and in the rest of our python neighborhood, we often do `import matplotlib as mpl`, it's quite a bit confusing to have something with the `mpl` name within matplotlib not be the `matplotlib` module itself. This module was only used in `pylab` interface, where it was simply imported in one line via `from matplotlib import mpl` and never used again. With the exception of mpl.finance, all of the modules in mpl.py were readily available simply via "import matplotlib as mpl". pylab's mpl.finance functionality is retained for backwards compatability.
- Loading branch information
commit 2ac7b881728d761b137a75ad057d89263cab71ad
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,7 +219,10 @@ | |
from matplotlib.cbook import flatten, is_string_like, exception_to_str, \ | ||
silent_list, iterable, dedent | ||
|
||
from matplotlib import mpl # pulls in most modules | ||
import matplotlib as mpl | ||
# make mpl.finance module available for backwards compatability, in case folks | ||
# using pylab interface depended on not having to import it | ||
import matplotlib.finance | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've never understood what is special about finance here; it is one of the modules imported by mpl.py, and it is not even mentioned in pylab.py. |
||
|
||
from matplotlib.dates import date2num, num2date,\ | ||
datestr2num, strpdate2num, drange,\ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pants. I forgot about that. One second.