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

Commit 5ee2afa

Browse filesBrowse files
committed
Stop checking wx version.
mpl3 wx supports any wxpython that does support Py3 (i.e., wwpython>=4), so we can drop the version checks.
1 parent d2e68ff commit 5ee2afa
Copy full SHA for 5ee2afa

File tree

Expand file treeCollapse file tree

5 files changed

+19
-70
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+19
-70
lines changed

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ install:
160160
python -c 'import PyQt5.QtCore' &&
161161
echo 'PyQt5 is available' ||
162162
echo 'PyQt5 is not available'
163-
python -mpip install -U --pre \
163+
python -mpip install -U \
164164
--no-index -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04 \
165165
wxPython &&
166166
python -c 'import wx' &&

‎doc/sphinxext/mock_gui_toolkits.py

Copy file name to clipboardExpand all lines: doc/sphinxext/mock_gui_toolkits.py
+7-10Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,12 @@ class ToolBar(object):
122122
class Frame(object):
123123
pass
124124

125-
VERSION_STRING = '2.9'
126-
127125

128126
def setup(app):
129-
sys.modules['cairocffi'] = MyCairoCffi()
130-
sys.modules['PyQt4'] = MyPyQt4()
131-
sys.modules['sip'] = MySip()
132-
sys.modules['wx'] = MyWX()
133-
sys.modules['wxversion'] = MagicMock()
134-
135-
metadata = {'parallel_read_safe': True, 'parallel_write_safe': True}
136-
return metadata
127+
sys.modules.update(
128+
cairocffi=MyCairoCffi(),
129+
PyQt4=MyPyQt4(),
130+
sip=MySip(),
131+
wx=MyWX(),
132+
)
133+
return {'parallel_read_safe': True, 'parallel_write_safe': True}

‎lib/matplotlib/backends/wx_compat.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/wx_compat.py
+9-35Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,12 @@
1111
unicode_literals)
1212

1313
import six
14-
from distutils.version import StrictVersion, LooseVersion
1514

16-
missingwx = "Matplotlib backend_wx and backend_wxagg require wxPython>=2.9"
15+
import wx
16+
backend_version = wx.VERSION_STRING
17+
is_phoenix = 'phoenix' in wx.PlatformInfo
1718

1819

19-
try:
20-
import wx
21-
backend_version = wx.VERSION_STRING
22-
is_phoenix = 'phoenix' in wx.PlatformInfo
23-
except ImportError:
24-
raise ImportError(missingwx)
25-
26-
try:
27-
wx_version = StrictVersion(wx.VERSION_STRING)
28-
except ValueError:
29-
wx_version = LooseVersion(wx.VERSION_STRING)
30-
31-
# Ensure we have the correct version imported
32-
if wx_version < str("2.9"):
33-
raise ImportError(missingwx)
34-
3520
if is_phoenix:
3621
# define all the wxPython phoenix stuff
3722

@@ -157,22 +142,11 @@ def _AddTool(parent, wx_ids, text, bmp, tooltip_text):
157142
else:
158143
add_tool = parent.DoAddTool
159144

160-
if not is_phoenix or wx_version >= str("4.0.0b2"):
161-
# NOTE: when support for Phoenix prior to 4.0.0b2 is dropped then
162-
# all that is needed is this clause, and the if and else clause can
163-
# be removed.
164-
kwargs = dict(label=text,
165-
bitmap=bmp,
166-
bmpDisabled=wx.NullBitmap,
167-
shortHelp=text,
168-
longHelp=tooltip_text,
169-
kind=kind)
170-
else:
171-
kwargs = dict(label=text,
172-
bitmap=bmp,
173-
bmpDisabled=wx.NullBitmap,
174-
shortHelpString=text,
175-
longHelpString=tooltip_text,
176-
kind=kind)
145+
kwargs = dict(label=text,
146+
bitmap=bmp,
147+
bmpDisabled=wx.NullBitmap,
148+
shortHelp=text,
149+
longHelp=tooltip_text,
150+
kind=kind)
177151

178152
return add_tool(wx_ids[text], **kwargs)

‎setupext.py

Copy file name to clipboardExpand all lines: setupext.py
-21Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,33 +1722,12 @@ class BackendWxAgg(OptionalBackendPackage):
17221722
name = "wxagg"
17231723

17241724
def check_requirements(self):
1725-
wxversioninstalled = True
1726-
try:
1727-
import wxversion
1728-
except ImportError:
1729-
wxversioninstalled = False
1730-
1731-
if wxversioninstalled:
1732-
try:
1733-
_wx_ensure_failed = wxversion.AlreadyImportedError
1734-
except AttributeError:
1735-
_wx_ensure_failed = wxversion.VersionError
1736-
1737-
try:
1738-
wxversion.ensureMinimal('2.9')
1739-
except _wx_ensure_failed:
1740-
pass
1741-
17421725
try:
17431726
import wx
17441727
backend_version = wx.VERSION_STRING
17451728
except ImportError:
17461729
raise CheckFailed("requires wxPython")
17471730

1748-
if not is_min_version(backend_version, "2.9"):
1749-
raise CheckFailed(
1750-
"Requires wxPython 2.9, found %s" % backend_version)
1751-
17521731
return "version %s" % backend_version
17531732

17541733

‎tutorials/introductory/usage.py

Copy file name to clipboardExpand all lines: tutorials/introductory/usage.py
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,8 @@ def my_plotter(ax, data1, data2, param_dict):
443443
# activated in IPython with ``%matplotlib gtk``.
444444
# GTKCairo Cairo rendering to a :term:`GTK` 2.x canvas (requires PyGTK_,
445445
# and pycairo_ or cairocffi_; Python2 only).
446-
# WXAgg Agg rendering to a :term:`wxWidgets` canvas (requires wxPython_;
447-
# v4.0 (in beta) is required for Python3). This backend can be
448-
# activated in IPython with ``%matplotlib wx``.#
446+
# WXAgg Agg rendering to a :term:`wxWidgets` canvas (requires wxPython_ 4).
447+
# This backend can be activated in IPython with ``%matplotlib wx``.
449448
# ========= ================================================================
450449
#
451450
# .. _`Anti-Grain Geometry`: http://antigrain.com/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.