File tree Expand file tree Collapse file tree 5 files changed +9
-19
lines changed Expand file tree Collapse file tree 5 files changed +9
-19
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ optional Matplotlib backends and the capabilities they provide.
198
198
`PySide <https://pypi.python.org/pypi/PySide >`_: for the Qt4Agg backend;
199
199
* `PyQt5 <https://pypi.python.org/pypi/PyQt5 >`_: for the Qt5Agg backend;
200
200
* :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;
202
202
* `pycairo <https://pypi.python.org/pypi/pycairo >`_: for GTK3Cairo;
203
203
* `Tornado <https://pypi.python.org/pypi/tornado >`_: for the WebAgg backend.
204
204
Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ class ToolBar(object):
351
351
class Frame (object ):
352
352
pass
353
353
354
- VERSION_STRING = '2.8.12 '
354
+ VERSION_STRING = '2.9 '
355
355
356
356
357
357
class MyPyQt4 (MagicMock ):
Original file line number Diff line number Diff line change @@ -684,13 +684,8 @@ def do_nothing(*args, **kwargs):
684
684
self .Bind (wx .EVT_MOUSE_CAPTURE_CHANGED , self ._onCaptureLost )
685
685
self .Bind (wx .EVT_MOUSE_CAPTURE_LOST , self ._onCaptureLost )
686
686
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 )
694
689
695
690
self .macros = {} # dict from wx id to seq of macros
696
691
Original file line number Diff line number Diff line change 13
13
import six
14
14
from distutils .version import LooseVersion
15
15
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 "
17
17
18
18
19
19
try :
24
24
raise ImportError (missingwx )
25
25
26
26
# 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" ):
29
28
raise ImportError (missingwx )
30
29
31
30
if is_phoenix :
Original file line number Diff line number Diff line change @@ -1807,7 +1807,7 @@ def check_requirements(self):
1807
1807
_wx_ensure_failed = wxversion .VersionError
1808
1808
1809
1809
try :
1810
- wxversion .ensureMinimal ('2.8 ' )
1810
+ wxversion .ensureMinimal ('2.9 ' )
1811
1811
except _wx_ensure_failed :
1812
1812
pass
1813
1813
@@ -1817,13 +1817,9 @@ def check_requirements(self):
1817
1817
except ImportError :
1818
1818
raise CheckFailed ("requires wxPython" )
1819
1819
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" ):
1825
1821
raise CheckFailed (
1826
- "Requires wxPython 2.8 , found %s" % backend_version )
1822
+ "Requires wxPython 2.9 , found %s" % backend_version )
1827
1823
1828
1824
return "version %s" % backend_version
1829
1825
You can’t perform that action at this time.
0 commit comments