Conversation
`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.
|
@NelleV Is that warning and deprecation docstring better? I'm not sure where the docstring should go in a top-level module like this. Feedback encouraged. |
There was a problem hiding this comment.
Pants. I forgot about that. One second.
There was a problem hiding this comment.
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.
|
@dmcdougall module's docstring should be placed at the top of the file. It is already the case in many matplotliib module. When it comes to deprecation warnings, I think it is nice to have them both in the documentation (hence, viewable through matplotlib's website) and with a warning, in the code. The former allows someone new to the project to be warned of the deprecation of a certain module or method, whilst the latter helps maintaining code up to date when running the test suite. |
|
@NelleV Alright, so it sounds like I did the right thing. The tests pass, too. Python 3.1 failure is a dud. I'll go ahead and merge this now. |
Rebased and updated version of #1535.