Merge pull request #10426 from QuLogic/delete-backends · tropfcode/matplotlib@42055ad · GitHub
Skip to content

Commit 42055ad

Browse files
authored
Merge pull request matplotlib#10426 from QuLogic/delete-backends
Delete deprecated backends
2 parents 4f5715a + d6e93a3 commit 42055ad

46 files changed

Lines changed: 107 additions & 3047 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

INSTALL.rst

Lines changed: 0 additions & 1 deletion

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ include pytest.ini
44
include Makefile MANIFEST.in
55
include matplotlibrc.template setup.cfg.template
66
include setupext.py setup.py distribute_setup.py
7-
include lib/matplotlib/mpl-data/lineprops.glade
87
include lib/matplotlib/mpl-data/matplotlibrc
98
include lib/matplotlib/mpl-data/images/*
109
include lib/matplotlib/mpl-data/fonts/ttf/*

doc/api/backend_gtkagg_api.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

doc/api/backend_gtkcairo_api.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

doc/api/index_backend_api.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ backends
1010
backend_tools_api.rst
1111
backend_agg_api.rst
1212
backend_cairo_api.rst
13-
backend_gtkagg_api.rst
14-
backend_gtkcairo_api.rst
1513
backend_gtk3agg_api.rst
1614
backend_gtk3cairo_api.rst
1715
backend_nbagg_api.rst
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Removal of deprecated backends
2+
------------------------------
3+
4+
Deprecated backends have been removed:
5+
6+
* GTKAgg
7+
* GTKCairo
8+
* GTK
9+
* GDK

doc/glossary/index.rst

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,9 @@ Glossary
7474
features of PyGObject. However Matplotlib does not use any of these
7575
missing features.
7676

77-
pygtk
78-
`pygtk <http://www.pygtk.org/>`_ provides python wrappers for
79-
the :term:`GTK` widgets library for use with the GTK or GTKAgg
80-
backend. Widely used on linux, and is often packages as
81-
'python-gtk2'
82-
8377
PyGObject
84-
Like :term:`pygtk`, `PyGObject <http://www.pygtk.org/>` provides
85-
python wrappers for the :term:`GTK` widgets library; unlike pygtk,
86-
PyGObject wraps GTK3 instead of the now obsolete GTK2.
78+
`PyGObject <http://www.pygtk.org/>`_ provides Python wrappers for the
79+
:term:`GTK` widgets library
8780

8881
pyqt
8982
`pyqt <https://wiki.python.org/moin/PyQt>`_ provides python

doc/users/navigation_toolbar.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,31 +109,34 @@ automatically for every figure. If you are writing your own user
109109
interface code, you can add the toolbar as a widget. The exact syntax
110110
depends on your UI, but we have examples for every supported UI in the
111111
``matplotlib/examples/user_interfaces`` directory. Here is some
112-
example code for GTK::
112+
example code for GTK+ 3::
113113

114114

115-
import gtk
115+
import gi
116+
gi.require_version('Gtk', '3.0')
117+
from gi.repository import Gtk
116118

117119
from matplotlib.figure import Figure
118-
from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas
119-
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar
120+
from matplotlib.backends.backend_gtk3agg import FigureCanvas
121+
from matplotlib.backends.backend_gtk3 import (
122+
NavigationToolbar2GTK3 as NavigationToolbar)
120123

121-
win = gtk.Window()
122-
win.connect("destroy", lambda x: gtk.main_quit())
124+
win = Gtk.Window()
125+
win.connect("destroy", lambda x: Gtk.main_quit())
123126
win.set_default_size(400,300)
124127
win.set_title("Embedding in GTK")
125128

126-
vbox = gtk.VBox()
129+
vbox = Gtk.VBox()
127130
win.add(vbox)
128131

129132
fig = Figure(figsize=(5,4), dpi=100)
130133
ax = fig.add_subplot(111)
131134
ax.plot([1,2,3])
132135

133-
canvas = FigureCanvas(fig) # a gtk.DrawingArea
134-
vbox.pack_start(canvas)
136+
canvas = FigureCanvas(fig) # a Gtk.DrawingArea
137+
vbox.pack_start(canvas, True, True, 0)
135138
toolbar = NavigationToolbar(canvas, win)
136-
vbox.pack_start(toolbar, False, False)
139+
vbox.pack_start(toolbar, False, False, 0)
137140

138141
win.show_all()
139-
gtk.main()
142+
Gtk.main()

doc/users/shell.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ up python. Then::
100100
>>> xlabel('hi mom')
101101

102102
should work out of the box. This is also likely to work with recent
103-
versions of the qt4agg and gtkagg backends, and with the macosx backend
103+
versions of the qt4agg and gtk3agg backends, and with the macosx backend
104104
on the Macintosh. Note, in batch mode,
105105
i.e. when making
106106
figures from scripts, interactive mode can be slow since it redraws

examples/event_handling/ginput_manual_clabel_sgskip.py

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)