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

Switch to using StrictVersion in wx_compat.py #10362

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 1 commit into from
Feb 1, 2018
Merged
Changes from all commits
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
6 changes: 3 additions & 3 deletions 6 lib/matplotlib/backends/wx_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
unicode_literals)

import six
from distutils.version import LooseVersion
from distutils.version import StrictVersion

missingwx = "Matplotlib backend_wx and backend_wxagg require wxPython>=2.9"

Expand All @@ -24,7 +24,7 @@
raise ImportError(missingwx)

# Ensure we have the correct version imported
if LooseVersion(wx.VERSION_STRING) < LooseVersion("2.9"):
if StrictVersion(wx.VERSION_STRING) < StrictVersion("2.9"):
raise ImportError(missingwx)

if is_phoenix:
Expand Down Expand Up @@ -152,7 +152,7 @@ def _AddTool(parent, wx_ids, text, bmp, tooltip_text):
else:
add_tool = parent.DoAddTool

if not is_phoenix or LooseVersion(wx.VERSION_STRING) >= str("4.0.0b2"):
if not is_phoenix or StrictVersion(wx.VERSION_STRING) >= str("4.0.0b2"):
# NOTE: when support for Phoenix prior to 4.0.0b2 is dropped then
# all that is needed is this clause, and the if and else clause can
# be removed.
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.