[WIP] Deprecate gtk, gdk and wx backends and remove Cocoaagg on 2.x#6582
[WIP] Deprecate gtk, gdk and wx backends and remove Cocoaagg on 2.x#6582tacaswell merged 9 commits intomatplotlib:v2.xfrom
Conversation
|
What do you think of using this instead in if self.__class__ == FigureCanvasX:
warn.deprecated(...)It feels safer and cleaner to me, checking as early as possible and ensures we warn only if someone trys to create an instance of this base class. |
|
Fine with me. I will get back to this as soon as I have a chance |
|
Cool, do we still want this in for 2.0? |
|
Yes thats my intention. We either need to do this or fix the GDK/GTK backend which is broken. Like this we will at least warn users about this and encurage them to use GTKAgg instead. |
|
I don't know enough about the graphics plotting to know why someone would not want to use Agg or Cairo. |
|
I don't think many users will but it you have to select a GTK backend and don't read the docs carefully it's very easy to select the GTK backend over the GTKAgg since it's just |
|
Sure, I have done that, I didn't realise that a difference existed between Gtk and GtkAgg. Gtk feels like it should alias GtkAgg, i.e. due to most systems not installing cairo by default. As a simple user I wouldn't want to mess around figuring out whether I should use Agg or Cairo. Maybe something for a Getting Started guide that puts it real simple why users would choose one over the other. |
I still need to add an api_change note and update the documentation to reflect the deprecation.
The inheritance between the various Gtk backends is a bit complicated but this solution correctly prints the deprecation warning when using the Gtk and Gdk backends but not the GtkAgg og GtkCairo backends.
I also removed some references to the long since removed fltk and emf backends
Fixes #6541
#6574 targeting 2.x as originally intended.