Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Drop support for Python 2.6 #34

Merged
merged 2 commits into from
Oct 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
3.0
~~~

* Dropped support for Python 2.6 and 3.1.

2.12.2
~~~~~~

Expand Down
7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
else []
),
py_modules=['ptr'],
python_requires='>=2.6',
python_requires='>=2.7,!=3.0,!=3.1',
install_requires=[
],
extras_require={
Expand All @@ -40,10 +40,6 @@
'collective.checkdocs',
'pytest-virtualenv',
],
'testing:python_version=="2.6"': [
# undeclared dependency of pytest-virtualenv
'importlib',
],
'docs': [
'sphinx',
'jaraco.packaging>=3.2',
Expand All @@ -57,7 +53,6 @@
"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",
Expand Down
16 changes: 1 addition & 15 deletions tests/test_ptr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import unicode_literals

import contextlib
import io
import os
import shutil
Expand All @@ -17,26 +16,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)
Expand Down