Skip to content
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

Delete deprecated backends #10426

Merged
merged 10 commits into from
Mar 5, 2018
Merged

Delete deprecated backends #10426

merged 10 commits into from
Mar 5, 2018

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Feb 12, 2018

PR Summary

Remove GDK, GTK2, and WX backends, plus all deprecated methods in the backends. I need to go through a few of the examples to make sure they're okay.

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@QuLogic QuLogic added this to the v3.0 milestone Feb 12, 2018
@tacaswell
Copy link
Member

Can we hold off on doing WX? @DietmarSchwertberger is interested in keeping it up.

@QuLogic
Copy link
Member Author

QuLogic commented Feb 12, 2018

WX or WXAgg (which was not deprecated before)?

@QuLogic
Copy link
Member Author

QuLogic commented Feb 12, 2018

OK, I restored backend_wx.py for now as it's imported in backend_wxagg.py, so we still need it at least partially. I'll leave it to @DietmarSchwertberger to determine whether to remove anything from there.

There's one example lineprops_dialog_gtk_sgskip.py which uses DialogLineprops from the GTK2 backend, but this is not implemented in GTK3. I'm not sure whether this dialog should be implemented for GTK3 as well or the example deleted?

@QuLogic QuLogic force-pushed the delete-backends branch 2 times, most recently from 6eff87e to 4c4fc0e Compare February 12, 2018 06:01
@DietmarSchwertberger
Copy link
Contributor

Thanks. I would be fine with a deprecation message for 3.0 for backend_wx..
By then, things should be decided.

@QuLogic
Copy link
Member Author

QuLogic commented Feb 12, 2018

The WX renderer was already deprecated in 2.0, but not WXAgg's. However, backend_wxagg.py uses backend_wx.py. It doesn't look like the renderer is imported, so maybe only the renderer needs to be removed?

@QuLogic QuLogic changed the title WIP: Delete deprecated backends Delete deprecated backends Feb 15, 2018
@QuLogic QuLogic mentioned this pull request Feb 15, 2018
2 tasks
@DietmarSchwertberger
Copy link
Contributor

Removing just the WX renderer would make backend_wx.py unusable on it's own, even though it could be imported.
Before 3.0 I would like to try whether the WX renderer can be used for rendering to wx.MetaFileDCs for creating EMF/WMF files. If that's not possible, it should be removed then. No matter what the outcome is, the WX backends will need restructuring for 3.0.
I would suggest not to do it for 2.2 as the risk for bugs is quite significant due to the tight schedule. (There are currently unmerged bugfix PRs.)

@QuLogic
Copy link
Member Author

QuLogic commented Feb 16, 2018

This PR is about 3.0, but the wx changes are reverted in any case.

@DietmarSchwertberger
Copy link
Contributor

Sorry, did not see this. I just had in mind that the Wx backend was deprecated for rev. 2 already.
I will take care for restructuring / clean up in time for 3.0.

import gtk
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
Copy link
Contributor

Choose a reason for hiding this comment

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

rename "next" below to something else e.g. pos?

@@ -20,7 +20,7 @@
ax.set_xlim(-2, 2)
ax.set_ylim(-2, 2)

# set useblit = True on gtkagg for enhanced performance
# Set useblit=True on some backends for enhanced performance.
Copy link
Contributor

Choose a reason for hiding this comment

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

"useblit=True" improves the performance on most backends? (gtk3cairo (fundamentally) cannot support blitting and I'm not sure what the situation is with nbagg but all other major backends do support blitting.)

@@ -38,7 +38,7 @@ def onselect(xmin, xmax):
ax2.set_ylim(thisy.min(), thisy.max())
fig.canvas.draw()

# set useblit True on gtkagg for enhanced performance
# Set useblit=True on some backends for enhanced performance.
Copy link
Contributor

Choose a reason for hiding this comment

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

see above

ml = gobject.MainLoop
elif 'gtk' in sys.modules and 'gi' in sys.modules:
from gi.repository import GObject
ml = GObject.MainLoop
Copy link
Contributor

Choose a reason for hiding this comment

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

squish into the next line?

Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

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

minor stuff but not blocking merge

@QuLogic
Copy link
Member Author

QuLogic commented Feb 17, 2018

Fixed comments.

@QuLogic
Copy link
Member Author

QuLogic commented Feb 19, 2018

Rebased due to conflicts.

@QuLogic
Copy link
Member Author

QuLogic commented Feb 21, 2018

Rebased due to conflicts.

@efiring
Copy link
Member

efiring commented Feb 25, 2018

It looks like we want to resolve the conflict by going with the master version, correct?

@QuLogic
Copy link
Member Author

QuLogic commented Feb 25, 2018

Partly, we can still drop this Toolbar class that was deprecated (and now removed) in all backends.

@QuLogic
Copy link
Member Author

QuLogic commented Feb 27, 2018

Rebased due to conflicts.

@efiring efiring merged commit 42055ad into matplotlib:master Mar 5, 2018
@QuLogic QuLogic deleted the delete-backends branch March 5, 2018 03:50
This was referenced May 15, 2018
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.

6 participants