summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-09-03 13:24:47 -0400
committerJason R. Coombs <jaraco@jaraco.com>2017-09-03 13:24:47 -0400
commit932c91db97fe8a93ce54f4f4e04e2fd1e28b2275 (patch)
tree623fe131b6fd91e2c9027642069db2ac4ae4f252
parent18c23373216a57bd0301a07601120aecd95906f4 (diff)
downloadpytest-runner-feature/drop-py26.tar.gz
Drop support for Python 2.6feature/drop-py26
-rw-r--r--CHANGES.rst5
-rw-r--r--setup.py7
-rw-r--r--tests/test_ptr.py16
3 files changed, 7 insertions, 21 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 21132ef..63142ff 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,8 @@
+3.0
+~~~
+
+* Dropped support for Python 2.6 and 3.1.
+
2.12
~~~~
diff --git a/setup.py b/setup.py
index 1e95a0e..8d0f491 100644
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@ params = dict(
else []
),
py_modules=['ptr'],
- python_requires='>=2.6',
+ python_requires='>=2.7,!=3.0,!=3.1',
install_requires=[
],
extras_require={
@@ -39,10 +39,6 @@ params = dict(
'pytest-sugar',
'pytest-virtualenv',
],
- 'testing:python_version=="2.6"': [
- # undeclared dependency of pytest-virtualenv
- 'importlib',
- ],
'docs': [
'sphinx',
'jaraco.packaging>=3.2',
@@ -56,7 +52,6 @@ params = dict(
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
- "Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Framework :: Pytest",
diff --git a/tests/test_ptr.py b/tests/test_ptr.py
index aeb0f8d..aac5e75 100644
--- a/tests/test_ptr.py
+++ b/tests/test_ptr.py
@@ -1,6 +1,5 @@
from __future__ import unicode_literals
-import contextlib
import io
import os
import sys
@@ -16,26 +15,13 @@ def DALS(s):
return textwrap.dedent(s).lstrip()
-def _tarfile_open_ex(*args, **kwargs):
- """
- Extend result as a context manager.
- """
- return contextlib.closing(tarfile.open(*args, **kwargs))
-
-
-if sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[:2] < (3, 2):
- tarfile_open = _tarfile_open_ex
-else:
- tarfile_open = tarfile.open
-
-
def make_sdist(dist_path, files):
"""
Create a simple sdist tarball at dist_path, containing the files
listed in ``files`` as ``(filename, content)`` tuples.
"""
- with tarfile_open(dist_path, 'w:gz') as dist:
+ with tarfile.open(dist_path, 'w:gz') as dist:
for filename, content in files:
file_bytes = io.BytesIO(content.encode('utf-8'))
file_info = tarfile.TarInfo(name=filename)