Merge pull request #491 from vladimir-v-diaz/drop_py26_support

Drop py26 support
This commit is contained in:
Vladimir Diaz 2017-09-21 17:29:59 -04:00 committed by GitHub
commit 87b84b4322
19 changed files with 18 additions and 119 deletions

View file

@ -95,7 +95,6 @@
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',

View file

@ -36,13 +36,6 @@
import glob
import random
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
# Generate a list of pathnames that match a pattern (i.e., that begin with
# 'test_' and end with '.py'. A shell-style wildcard is used with glob() to
# match desired filenames. All the tests matching the pattern will be loaded

View file

@ -42,13 +42,7 @@
import subprocess
import logging
import sys
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import unittest
import tuf
import tuf.formats

View file

@ -22,6 +22,7 @@
import logging
import tempfile
import shutil
import unittest
import tuf
import tuf.log

View file

@ -45,13 +45,7 @@
import subprocess
import logging
import sys
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import unittest
import tuf
import tuf.formats

View file

@ -47,13 +47,7 @@
import subprocess
import logging
import sys
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import unittest
import tuf.formats
import tuf.log

View file

@ -50,13 +50,7 @@
import subprocess
import logging
import sys
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import unittest
import tuf.formats
import tuf.log

View file

@ -32,6 +32,7 @@
import time
import copy
import json
import unittest
import tuf
import tuf.roledb
@ -43,13 +44,6 @@
import securesystemslib
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
logger = logging.getLogger('tuf.test_interpose_updater')

View file

@ -43,13 +43,7 @@
import random
import subprocess
import sys
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import unittest
import tuf
import tuf.log

View file

@ -44,13 +44,7 @@
import subprocess
import logging
import sys
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import unittest
import tuf.exceptions
import tuf.log

View file

@ -36,6 +36,7 @@
import logging
import time
import shutil
import unittest
import tuf
import tuf.log
@ -45,13 +46,6 @@
import tuf.unittest_toolbox as unittest_toolbox
import tuf.repository_tool as repo_tool
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
logger = logging.getLogger('test_multiple_repositories_integration')
repo_tool.disable_console_log_messages()

View file

@ -45,13 +45,7 @@
import subprocess
import logging
import sys
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import unittest
import tuf.formats
import tuf.log
@ -62,8 +56,8 @@
import securesystemslib
import six
# The repository tool is imported and logs console messages by default. Disable
# console log messages generated by this unit test.
# The repository tool is imported and logs console messages by default.
# Disable console log messages generated by this unit test.
repo_tool.disable_console_log_messages()
logger = logging.getLogger('tuf.test_replay_attack')

View file

@ -34,13 +34,7 @@
import shutil
import stat
import sys
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import unittest
import tuf
import tuf.formats

View file

@ -35,13 +35,6 @@
import sys
import errno
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import tuf
import tuf.log
import tuf.formats

View file

@ -27,12 +27,7 @@
import tempfile
import shutil
import sys
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import unittest
import tuf
import tuf.log

View file

@ -48,13 +48,7 @@
import subprocess
import logging
import sys
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import unittest
import tuf.log
import tuf.client.updater as updater

View file

@ -47,13 +47,7 @@
import random
import subprocess
import sys
# 'unittest2' required for testing under Python < 2.7.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
import unittest
import tuf
import tuf.log

12
tox.ini
View file

@ -4,8 +4,7 @@
# and then run "tox" from this directory.
[tox]
#envlist = py26, py27, py35
envlist = py27
envlist = py27, py35
[testenv]
changedir = tests
@ -19,12 +18,3 @@ deps =
-r{toxinidir}/requirements.txt
install_command = pip install --pre {opts} {packages}
[testenv:py26]
deps =
-r{toxinidir}/requirements.txt
unittest2
importlib
install_command = pip install --pre {opts} {packages}

View file

@ -44,7 +44,7 @@
import six
# 'ssl.match_hostname' was added in Python 3.2. The vendored version is needed
# for Python 2.6 and 2.7.
# for Python 2.7.
try:
from ssl import match_hostname, CertificateError