Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

new MatplotlibDeprecationWarning class (against master) #1597

Merged
merged 2 commits into from Dec 18, 2012

Conversation

Projects
None yet
3 participants
Member

ivanov commented Dec 14, 2012

It was tricky to backport this patch against v1.2.x, and since we'll want the functionality in master as well, I decided to just update the patch that I had in #1565 (it seems I can't reopen pull requests). This should be merged after #1596 is merged in v1.2.x.

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
Member

dmcdougall commented Dec 16, 2012

@ivanov You didn't need to create two PRs (sorry if I caused any confusion). Once the PR against v1.2.x is merged, someone will merge v1.2.x into master and push the new master upstream. That's how your changes will propagate into master.

I'll leave this open for a bit to let others chime in, but I think closing this in favour of #1596 is fine.

Member

ivanov commented Dec 17, 2012

@dmcdougall yeah, I was just thinking I'd save whoever is doing it some trouble because merging / rebasing these changes from v1.2.x had enough pesky manual conflicts, and I already had most of the changeset handy, that I just decided to submit this PR separately to save however was going to end up merging it from v1.2.x some time

Owner

mdboom commented Dec 17, 2012

@ivanov: That makes sense. After #1596 is merged and this is merged, then we would merge 1.2.x into master, accepting all of the changes in master and ignoring all of the ones in 1.2.x. I agree that will probably save some time.

It does look like something has already changed on master and we can't automatically merge this. Can you rebase on current master?

ivanov added some commits Dec 5, 2012

@ivanov ivanov new MatplotlibDeprecationWarning class
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
```
394b1aa
@ivanov ivanov import new deprecation class as mplDeprecation 657f647
Member

ivanov commented Dec 17, 2012

rebased on current master. updated the name as per discussion in #1596

Owner

mdboom commented Dec 18, 2012

Travis failure is false positive. Merging.

@mdboom mdboom added a commit that referenced this pull request Dec 18, 2012

@mdboom mdboom Merge pull request #1597 from ivanov/mpl-deprecation-warnings
new MatplotlibDeprecationWarning class (against master)
b93936f

@mdboom mdboom merged commit b93936f into matplotlib:master Dec 18, 2012

1 check failed

default The Travis build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment