Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[WIP] Deprecate gtk, gdk and wx backends and remove Cocoaagg on 2.x #6582

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 9 commits into from
Jun 29, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move deprecation as suggested by @OceanWolf
  • Loading branch information
jenshnielsen committed Jun 20, 2016
commit 90c4f60df934193c561c4b243c29c7106de9f359
13 changes: 6 additions & 7 deletions 13 lib/matplotlib/backends/backend_gdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,19 +434,18 @@ def new_figure_manager_given_figure(num, figure):
class FigureCanvasGDK (FigureCanvasBase):
def __init__(self, figure):
FigureCanvasBase.__init__(self, figure)

if self.__class__ == matplotlib.backends.backend_gdk.FigureCanvasGDK:
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.",
alternative="Agg")
self._renderer_init()

def _renderer_init(self):
self._renderer = RendererGDK (gtk.DrawingArea(), self.figure.dpi)

def _render_figure(self, pixmap, width, height):
if isinstance(self._renderer, RendererGDK):
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.",
alternative="Agg")
self._renderer.set_pixmap (pixmap)
self._renderer.set_width_height (width, height)
self.figure.draw (self._renderer)
Expand Down
12 changes: 6 additions & 6 deletions 12 lib/matplotlib/backends/backend_gtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ class FigureCanvasGTK (gtk.DrawingArea, FigureCanvasBase):
gdk.POINTER_MOTION_HINT_MASK)

def __init__(self, figure):
if self.__class__ == matplotlib.backends.backend_gtk.FigureCanvasGTK:
warn_deprecated('2.0', message="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.",
alternative="GTKAgg")
if _debug: print('FigureCanvasGTK.%s' % fn_name())
FigureCanvasBase.__init__(self, figure)
gtk.DrawingArea.__init__(self)
Expand Down Expand Up @@ -419,12 +425,6 @@ def _pixmap_prepare(self, width, height):
def _render_figure(self, pixmap, width, height):
"""used by GTK and GTKcairo. GTKAgg overrides
"""
if isinstance(self._renderer, RendererGDK):
warn_deprecated('2.0', message="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.",
alternative="GTKAgg")
self._renderer.set_width_height (width, height)
self.figure.draw (self._renderer)

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.