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 6d6098a

Browse filesBrowse files
committed
Remove checks for Python 3.x, x < 4.
The requirement is 2.7 or 3.4+.
1 parent dbf6928 commit 6d6098a
Copy full SHA for 6d6098a

File tree

Expand file treeCollapse file tree

2 files changed

+12
-21
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-21
lines changed

‎lib/matplotlib/compat/subprocess.py

Copy file name to clipboardExpand all lines: lib/matplotlib/compat/subprocess.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from __future__ import print_function
1818
import os
1919
import sys
20-
if os.name == 'posix' and sys.version_info[:2] < (3, 2):
20+
if os.name == 'posix' and sys.version_info[0] < 3:
2121
# work around for https://github.com/matplotlib/matplotlib/issues/5314
2222
try:
2323
import subprocess32 as subprocess

‎setupext.py

Copy file name to clipboardExpand all lines: setupext.py
+11-20Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818

1919
PY3min = (sys.version_info[0] >= 3)
20-
PY32min = (PY3min and sys.version_info[1] >= 2 or sys.version_info[0] > 3)
2120

2221

2322
def _get_home():
@@ -90,7 +89,7 @@ def _get_xdg_cache_dir():
9089

9190
setup_cfg = os.environ.get('MPLSETUPCFG', 'setup.cfg')
9291
if os.path.exists(setup_cfg):
93-
if PY32min:
92+
if PY3min:
9493
config = configparser.ConfigParser()
9594
else:
9695
config = configparser.SafeConfigParser()
@@ -724,7 +723,7 @@ def check(self):
724723
except ImportError:
725724
msgs += [bad_nose]
726725

727-
if sys.version_info >= (3, 3):
726+
if PY3min:
728727
msgs += ['using unittest.mock']
729728
else:
730729
try:
@@ -849,7 +848,7 @@ class Numpy(SetupPackage):
849848

850849
@staticmethod
851850
def include_dirs_hook():
852-
if sys.version_info[0] >= 3:
851+
if PY3min:
853852
import builtins
854853
if hasattr(builtins, '__NUMPY_SETUP__'):
855854
del builtins.__NUMPY_SETUP__
@@ -1047,11 +1046,11 @@ def do_custom_build(self):
10471046
pass
10481047

10491048
if not os.path.isfile(tarball_path):
1050-
1051-
if sys.version_info[0] == 2:
1052-
from urllib import urlretrieve
1053-
else:
1049+
if PY3min:
10541050
from urllib.request import urlretrieve
1051+
else:
1052+
from urllib import urlretrieve
1053+
10551054
if not os.path.exists('build'):
10561055
os.makedirs('build')
10571056

@@ -1370,14 +1369,6 @@ def check(self):
13701369
try:
13711370
import dateutil
13721371
except ImportError:
1373-
# dateutil 2.1 has a file encoding bug that breaks installation on
1374-
# python 3.3
1375-
# https://github.com/matplotlib/matplotlib/issues/2373
1376-
# hack around the problem by installing the (working) v2.0
1377-
major, minor1, _, _, _ = sys.version_info
1378-
if self.version is None and (major, minor1) == (3, 3):
1379-
self.version = '!=2.1'
1380-
13811372
return (
13821373
"dateutil was not found. It is required for date axis "
13831374
"support. pip/easy_install may attempt to install it "
@@ -1396,7 +1387,7 @@ class FuncTools32(SetupPackage):
13961387
name = "functools32"
13971388

13981389
def check(self):
1399-
if sys.version_info[:2] < (3, 2):
1390+
if not PY3min:
14001391
try:
14011392
import functools32
14021393
except ImportError:
@@ -1409,7 +1400,7 @@ def check(self):
14091400
return "Not required"
14101401

14111402
def get_install_requires(self):
1412-
if sys.version_info[:2] < (3, 2):
1403+
if not PY3min:
14131404
return ['functools32']
14141405
else:
14151406
return []
@@ -1419,7 +1410,7 @@ class Subprocess32(SetupPackage):
14191410
name = "subprocess32"
14201411

14211412
def check(self):
1422-
if sys.version_info[:2] < (3, 2):
1413+
if not PY3min:
14231414
try:
14241415
import subprocess32
14251416
except ImportError:
@@ -1433,7 +1424,7 @@ def check(self):
14331424
return "Not required"
14341425

14351426
def get_install_requires(self):
1436-
if sys.version_info[:2] < (3, 2) and os.name == 'posix':
1427+
if not PY3min and os.name == 'posix':
14371428
return ['subprocess32']
14381429
else:
14391430
return []

0 commit comments

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