Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Finish deprecating idle_event; style cleanups to backend_bases #8454

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 2 commits into from
Apr 10, 2017

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Apr 9, 2017

All's in the title.

anntzer added 2 commits April 9, 2017 03:14
The corresponding event had been deprecated since 1.5.
@@ -1363,12 +1354,12 @@ def __init__(self, name, canvas, guiEvent=None):
self.guiEvent = guiEvent


@cbook.deprecated("2.1")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this deprecation warning have some more information? (eg. along the lines of 'idle_event is deprecated. Use the animations module instead.')

Would it also be worth putting in a what's new entry, saying this is deprecated and pointing people to what to use instead?

@@ -1982,6 +1953,7 @@ def enter_notify_event(self, guiEvent=None, xy=None):
event = Event('figure_enter_event', self, guiEvent)
self.callbacks.process('figure_enter_event', event)

@cbook.deprecated("2.1")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto my above comments

@anntzer
Copy link
Contributor Author

anntzer commented Apr 10, 2017

Actually the main entry point (connecting to "idle_event") already has a deprecation warning with a pointer to the animations module since 1.5 (http://matplotlib.org/api/api_changes.html?highlight=idle_event#deprecated-idle-event, https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backend_bases.py#L2352) so I don't think another pointer is needed here.

@dstansby
Copy link
Member

One final question; should this be targeted to 2.0.x? (I don't think it should) - if not, I think there should probably be at least one cycle of deprecation, so the deprecation warning should be 2.2

@anntzer
Copy link
Contributor Author

anntzer commented Apr 10, 2017

2.1 is not released yet so it's OK to say "deprecated since 2.1". It's not a removal date.

@dstansby
Copy link
Member

🤦‍♂️ I keep forgetting that, sorry...

@dstansby dstansby merged commit 3d75591 into matplotlib:master Apr 10, 2017
@dstansby dstansby added this to the 2.1 (next point release) milestone Apr 10, 2017
@anntzer anntzer deleted the cleanup-backend-bases branch April 10, 2017 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants