File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ optional Matplotlib backends and the capabilities they provide.
198198 `PySide <https://pypi.python.org/pypi/PySide >`_: for the Qt4Agg backend;
199199 * `PyQt5 <https://pypi.python.org/pypi/PyQt5 >`_: for the Qt5Agg backend;
200200 * :term: `pygtk ` (>= 2.4): for the GTK and the GTKAgg backend;
201- * :term: `wxpython ` (>= 2.8 or later): for the WX or WXAgg backend;
201+ * :term: `wxpython ` (>= 2.9 or later): for the WX or WXAgg backend;
202202 * `pycairo <https://pypi.python.org/pypi/pycairo >`_: for GTK3Cairo;
203203 * `Tornado <https://pypi.python.org/pypi/tornado >`_: for the WebAgg backend.
204204
Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ class ToolBar(object):
351351 class Frame (object ):
352352 pass
353353
354- VERSION_STRING = '2.8.12 '
354+ VERSION_STRING = '2.9 '
355355
356356
357357class MyPyQt4 (MagicMock ):
Original file line number Diff line number Diff line change @@ -684,13 +684,8 @@ def do_nothing(*args, **kwargs):
684684 self .Bind (wx .EVT_MOUSE_CAPTURE_CHANGED , self ._onCaptureLost )
685685 self .Bind (wx .EVT_MOUSE_CAPTURE_LOST , self ._onCaptureLost )
686686
687- if wx .VERSION_STRING < "2.9" :
688- # only needed in 2.8 to reduce flicker
689- self .SetBackgroundStyle (wx .BG_STYLE_CUSTOM )
690- self .Bind (wx .EVT_ERASE_BACKGROUND , self ._onEraseBackground )
691- else :
692- # this does the same in 2.9+
693- self .SetBackgroundStyle (wx .BG_STYLE_PAINT )
687+ # Reduce flicker.
688+ self .SetBackgroundStyle (wx .BG_STYLE_PAINT )
694689
695690 self .macros = {} # dict from wx id to seq of macros
696691
Original file line number Diff line number Diff line change 1313import six
1414from distutils .version import LooseVersion
1515
16- missingwx = "Matplotlib backend_wx and backend_wxagg require wxPython >=2.8.12 "
16+ missingwx = "Matplotlib backend_wx and backend_wxagg require wxPython>=2.9 "
1717
1818
1919try :
2424 raise ImportError (missingwx )
2525
2626# Ensure we have the correct version imported
27- if LooseVersion (wx .VERSION_STRING ) < LooseVersion ("2.8.12" ):
28- print (" wxPython version %s was imported." % backend_version )
27+ if LooseVersion (wx .VERSION_STRING ) < LooseVersion ("2.9" ):
2928 raise ImportError (missingwx )
3029
3130if is_phoenix :
Original file line number Diff line number Diff line change @@ -1807,7 +1807,7 @@ def check_requirements(self):
18071807 _wx_ensure_failed = wxversion .VersionError
18081808
18091809 try :
1810- wxversion .ensureMinimal ('2.8 ' )
1810+ wxversion .ensureMinimal ('2.9 ' )
18111811 except _wx_ensure_failed :
18121812 pass
18131813
@@ -1817,13 +1817,9 @@ def check_requirements(self):
18171817 except ImportError :
18181818 raise CheckFailed ("requires wxPython" )
18191819
1820- # Extra version check in case wxversion lacks AlreadyImportedError;
1821- # then VersionError might have been raised and ignored when
1822- # there really *is* a problem with the version.
1823- major , minor = [int (n ) for n in backend_version .split ('.' )[:2 ]]
1824- if major < 2 or (major < 3 and minor < 8 ):
1820+ if not is_min_version (backend_version , "2.9" ):
18251821 raise CheckFailed (
1826- "Requires wxPython 2.8 , found %s" % backend_version )
1822+ "Requires wxPython 2.9 , found %s" % backend_version )
18271823
18281824 return "version %s" % backend_version
18291825
You can’t perform that action at this time.
0 commit comments