Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
[WIP] Deprecate gtk, gdk and wx backends and remove Cocoaagg#6574
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| warn_deprecated('2.0',message="The GDK backend is " | ||
| "deprecated. It is untested, known to be " | ||
| "broken and will be removed in Matplotlib 2.2. " | ||
| "Use the Agg backend 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.
I don't think you need this line; the replacement advice is auto-generated when you supply the alternative kwarg.
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.
I thought so too but I don't see it without explicitly adding the last line.
This is the warning message from the above as it looks for me
/usr/local/lib/python2.7/site-packages/matplotlib/cbook.py:137: MatplotlibDeprecationWarning: The GTK backend is deprecated. It is untested, known to be broken and will be removed in Matplotlib 2.2. Use the GTKAgg backend instead. warnings.warn(message, mplDeprecation, stacklevel=1)tacaswell commentedJun 13, 2016
@OceanWolf@fariza Can you take a look at this verify that this does not warn on the supported versions of gtk* backends? |
ttconv: Also replace carriage return with spaces.
OceanWolf commentedJun 13, 2016
Yay for getting rid of a MacO$ backend that I can't test the backend refactor on! But why don't we deprecate I didn't realise that P.S. Never heard of FLTK until now ;). |
efiring commentedJun 13, 2016
On 2016/06/13 10:33 AM, OceanWolf wrote:
It was never a complete backend, and has been deprecated since 1.3 with |
OceanWolf commentedJun 13, 2016
Ahh, okay, then we have given users plenty of time to migrate away from it. In terms of testing, I can't get the In debian we don't have a @fariza do you still use python2, if not I will recompile mpl for python2. |
jenshnielsen commentedJun 13, 2016
As far as I know PyGtk2 never supported python3 so the GTK2 backends are python 2 only |
fariza commentedJun 13, 2016
This was the case long time ago, I don't know still the same but I have always thought |
OceanWolf commentedJun 13, 2016
Not 100% sure about that... importgigi.require_version("Gtk","2.0")fromgi.repositoryimportGtkasgtk,Gdkasgdk,GObjectasgobject,GLib,Pangoaspango gives I can't test further as I don't think |
OceanWolf commentedJun 13, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Btw, if you want to make it really clear and extra safe you can write: ifself.__class__==FigureCanvasGTK:warn.deprecated() I have tested this syntax on both python2.7 and python3.5.1 in classParent(object):def__init__(self):print('Setting up Parent',self.__class__)ifself.__class__==Parent:print('I am me')else:print('I am someone else')classChild(Parent):def__init__(self):print('Setting up Child',self.__class__)super(Child,self).__init__()print('--- Creating Parent ---')a=Parent()print('--- Creating Child ---')b=Child() |
tacaswell commentedJun 13, 2016
Suspect this was broken by the six merge |
1e9df8b to4e302b7Comparejenshnielsen commentedJun 14, 2016
Closing in favour of#6582 |
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