Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f19fec

Browse files
committed
Exclude use of pyparsing 2.0.0 everywhere
1 parent f49f9fc commit 0f19fec

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

lib/matplotlib/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@
120120
"matplotlib requires pyparsing >= {0}".format(
121121
'.'.join(str(x) for x in _required)))
122122

123+
if pyparsing.__version__ == '2.0.0':
124+
raise ImportError(
125+
"pyparsing 2.0.0 has bugs that prevent its use with "
126+
"matplotlib")
127+
123128
# pyparsing 1.5.6 does not have <<= on the Forward class, but
124129
# pyparsing 2.0.0 and later will spew deprecation warnings if
125130
# using << instead. In order to support pyparsing 1.5.6 and above

setupext.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -977,19 +977,19 @@ def check(self):
977977
"matplotlib requires pyparsing >= {0}".format(
978978
'.'.join(str(x) for x in required)))
979979

980-
if sys.version_info[0] == 2:
981-
if pyparsing.__version__ == "2.0.0":
980+
if pyparsing.__version__ == "2.0.0":
981+
if sys.version_info[0] == 2:
982982
return (
983983
"pyparsing 2.0.0 is not compatible with Python 2.x")
984+
else:
985+
return (
986+
"pyparsing 2.0.0 has bugs that prevent its use with "
987+
"matplotlib")
984988

985989
return "using pyparsing version %s" % pyparsing.__version__
986990

987991
def get_install_requires(self):
988-
if sys.version_info[0] >= 3:
989-
return ['pyparsing>=1.5.6']
990-
else:
991-
# pyparsing >= 2.0.0 is not compatible with Python 2
992-
return ['pyparsing>=1.5.6,!=2.0.0']
992+
return ['pyparsing>=1.5.6,!=2.0.0']
993993

994994

995995
class BackendAgg(OptionalBackendPackage):

0 commit comments

Comments
 (0)