summaryrefslogtreecommitdiff
path: root/pkg_resources
diff options
context:
space:
mode:
authorHugo <hugovk@users.noreply.github.com>2018-04-26 18:06:09 +0300
committerPaul Ganssle <paul@ganssle.io>2018-05-24 14:32:31 -0400
commit7392f01ffced3acfdef25b0b2d55cefdc6ee468a (patch)
treeaf16caf760ae204ba437d0aa7a6b862fc85bb0b2 /pkg_resources
parente078d78a439591fd7028cf80ca0b7c12ae013d4d (diff)
downloadpython-setuptools-git-7392f01ffced3acfdef25b0b2d55cefdc6ee468a.tar.gz
Drop support for EOL Python 3.3
Diffstat (limited to 'pkg_resources')
-rw-r--r--pkg_resources/__init__.py6
-rw-r--r--pkg_resources/extern/__init__.py2
-rw-r--r--pkg_resources/py31compat.py3
-rw-r--r--pkg_resources/tests/test_resources.py6
4 files changed, 8 insertions, 9 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 4e4409b3..91d00483 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -78,8 +78,8 @@ __import__('pkg_resources.extern.packaging.requirements')
__import__('pkg_resources.extern.packaging.markers')
-if (3, 0) < sys.version_info < (3, 3):
- raise RuntimeError("Python 3.3 or later is required")
+if (3, 0) < sys.version_info < (3, 4):
+ raise RuntimeError("Python 3.4 or later is required")
if six.PY2:
# Those builtin exceptions are only defined in Python 3
@@ -959,7 +959,7 @@ class Environment(object):
`platform` is an optional string specifying the name of the platform
that platform-specific distributions must be compatible with. If
unspecified, it defaults to the current platform. `python` is an
- optional string naming the desired version of Python (e.g. ``'3.3'``);
+ optional string naming the desired version of Python (e.g. ``'3.6'``);
it defaults to the current version.
You may explicitly set `platform` (and/or `python`) to ``None`` if you
diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py
index b4156fec..dfde433d 100644
--- a/pkg_resources/extern/__init__.py
+++ b/pkg_resources/extern/__init__.py
@@ -48,7 +48,7 @@ class VendorImporter:
# on later Python versions to cause relative imports
# in the vendor package to resolve the same modules
# as those going through this importer.
- if sys.version_info > (3, 3):
+ if sys.version_info.major >= 3:
del sys.modules[extant]
return mod
except ImportError:
diff --git a/pkg_resources/py31compat.py b/pkg_resources/py31compat.py
index 331a51bb..fd4b6fd0 100644
--- a/pkg_resources/py31compat.py
+++ b/pkg_resources/py31compat.py
@@ -15,8 +15,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 < (3, 2, 5) or
- (3, 3) <= sys.version_info < (3, 3, 6) or
+ sys.version_info.major == 2 or
(3, 4) <= sys.version_info < (3, 4, 1)
)
makedirs = _makedirs_31 if needs_makedirs else os.makedirs
diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py
index 04d02c1f..171ba2f9 100644
--- a/pkg_resources/tests/test_resources.py
+++ b/pkg_resources/tests/test_resources.py
@@ -668,7 +668,7 @@ class TestParsing:
assert (
Requirement.parse("name==1.1;python_version=='2.7'")
!=
- Requirement.parse("name==1.1;python_version=='3.3'")
+ Requirement.parse("name==1.1;python_version=='3.6'")
)
assert (
Requirement.parse("name==1.0;python_version=='2.7'")
@@ -676,9 +676,9 @@ class TestParsing:
Requirement.parse("name==1.2;python_version=='2.7'")
)
assert (
- Requirement.parse("name[foo]==1.0;python_version=='3.3'")
+ Requirement.parse("name[foo]==1.0;python_version=='3.6'")
!=
- Requirement.parse("name[foo,bar]==1.0;python_version=='3.3'")
+ Requirement.parse("name[foo,bar]==1.0;python_version=='3.6'")
)
def test_local_version(self):