From dc9fcbd5ef343321cf29ce1e34f454dadeb59dd2 Mon Sep 17 00:00:00 2001 From: Paul Ganssle Date: Tue, 10 Jul 2018 11:16:04 -0400 Subject: Switch over to using six.PY{2,3} when possible --- pkg_resources/py31compat.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg_resources') diff --git a/pkg_resources/py31compat.py b/pkg_resources/py31compat.py index fd4b6fd0..a381c424 100644 --- a/pkg_resources/py31compat.py +++ b/pkg_resources/py31compat.py @@ -2,6 +2,8 @@ import os import errno import sys +from .extern import six + def _makedirs_31(path, exist_ok=False): try: @@ -15,7 +17,7 @@ def _makedirs_31(path, exist_ok=False): # and exists_ok considerations are disentangled. # See https://github.com/pypa/setuptools/pull/1083#issuecomment-315168663 needs_makedirs = ( - sys.version_info.major == 2 or + six.PY2 or (3, 4) <= sys.version_info < (3, 4, 1) ) makedirs = _makedirs_31 if needs_makedirs else os.makedirs -- cgit v1.2.3