8000 Merge pull request #2852 from mdboom/six-minimum-version · matplotlib/matplotlib@f4217db · GitHub
[go: up one dir, main page]

Skip to content

Commit f4217db

Browse files
committed
Merge pull request #2852 from mdboom/six-minimum-version
AttributeError: 'module' object has no attribute 'next'
2 parents 8e5f304 + e1053a6 commit f4217db

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ def compare_versions(a, b):
126126
else:
127127
return False
128128

129+
if not compare_versions(six.__version__, '1.5'):
130+
raise ImportError(
131+
'six 1.5 or later is required; you have %s' % (
132+
six.__version__))
133+
129134
try:
130135
import pyparsing
131136
except ImportError:

setupext.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,7 @@ def get_extension(self):
10901090

10911091
class Six(SetupPackage):
10921092
name = "six"
1093+
min_version = "1.5"
10931094

10941095
def check(self):
10951096
try:
@@ -1098,10 +1099,15 @@ def check(self):
10981099
return (
10991100
"six was not found.")
11001101

1102+
if not is_min_version(six.__version__, self.min_version):
1103+
raise CheckFailed(
1104+
"Requires six %s or later. Found %s." %
1105+
(self.min_version, version))
1106+
11011107
return "using six version %s" % six.__version__
11021108

11031109
def get_install_requires(self):
1104-
return ['six']
1110+
return ['six>={0}'.format(self.min_version)]
11051111

11061112

11071113
class Dateutil(SetupPackage):

0 commit comments

Comments
 (0)
2912
0