-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
new MatplotlibDeprecationWarning class #1565
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
Conversation
In light of the fact that Python builtin DeprecationWarnings are ignored by default as of Python 2.7 (see link below), this class was put in to allow for the signaling of deprecation, but via UserWarnings which are not ignored by default. http://docs.python.org/dev/whatsnew/2.7.html#the-future-for-python-2-x Prior to this commit: ``` In [1]: %pylab Welcome to pylab, a matplotlib-based Python environment [backend: agg]. For more information, type 'help(pylab)'. In [2]: mlab.liaupunov([1,2], np.diff) Out[2]: 0.0 ``` After this commit: ``` In [1]: %pylab Welcome to pylab, a matplotlib-based Python environment [backend: agg]. For more information, type 'help(pylab)'. In [2]: mlab.liaupunov([1,2], np.diff) /home/pi/.local/lib/python2.7/site-packages/matplotlib/mlab.py:1212: MatplotlibDeprecationWarning: This does not belong in matplotlib and will be removed mDeprecation) # 2009/06/13 Out[2]: 0.0 ```
@@ -3135,12 +3135,12 @@ def connect(self, s, func): | |||
disconnect to disconnect from the axes event | |||
|
|||
""" | |||
raise DeprecationWarning('use the callbacks CallbackRegistry instance ' | |||
raise mDeprecation('use the callbacks CallbackRegistry instance ' | |||
'instead') |
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.
Indentation on all of these is now squiffy. Would you mind de-denting the continued lines throughout?
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.
Specifically, de-denting to align the starting single quotes--I hope that is what you mean, @pelson.
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.
On Thu, Dec 6, 2012 at 11:39 AM, Eric Firing [email protected]:
Specifically, de-denting to align the starting single quotes--I hope that
is what you mean, @pelson https://github.com/pelson.
+1
Damon McDougall
http://www.damon-is-a-geek.com
Institute for Computational Engineering Sciences
201 E. 24th St.
Stop C0200
The University of Texas at Austin
Austin, TX 78712-1229
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.
Yep 😄
Is this a good time to go through and remove everything that we said we would remove. There are quite a few old deprecations which we can now just remove. |
Let's make that a separate task |
Yes -- but if many people have not been seeing this DeprecationWarnings (because they were on Python 2.7 and didn't turn on all warnings) is it right to pull the features before adequate warning? Maybe we put this PR on 1.2.x, we plan on a 1.2.1 for certain, and then we remove things on master? |
I would be amendable to that idea. |
@mdboom That's just as well, since this will lead to merge conflicts due to the recent PEP8 changes on the axes module. Instead of rebasing, how about we just create a new PR targeting 1.2.x? |
A new PR would probably be best -- it's cleaner than the backporting we sometimes do. |
Agreed. @ivanov Would you be able to do that? |
In light of the fact that Python builtin DeprecationWarnings are ignored
by default as of Python 2.7 (see link below), this class was put in to
allow for the signaling of deprecation, but via UserWarnings which are
not ignored by default.
http://docs.python.org/dev/whatsnew/2.7.html#the-future-for-python-2-x
Prior to this commit:
After this commit:
this was motivated by the discussion over in #1535