Drop py27 support

This bumps jobs to the current usurri template and drops compatibility
code for Python 2.7.

Change-Id: Ida03f9cca7d276ed8a449d21c0ba58330916e7d9
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-01-12 02:27:19 -06:00
parent f74f393218
commit c9a5abaa8e
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
8 changed files with 6 additions and 22 deletions

View File

@ -1,5 +1,4 @@
- project:
templates:
- openstack-python-jobs
- openstack-python3-train-jobs
- openstack-python3-ussuri-jobs
- publish-openstack-docs-pti

View File

@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
import argparse
import os
import platform

View File

@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
import os
from jinja2 import contextfilter

View File

@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from contextlib import closing
from contextlib import contextmanager
from email.parser import HeaderParser
@ -23,17 +21,15 @@ import os
import shutil
import tarfile
import tempfile
import urllib
import zipfile
import six
from six.moves.urllib.request import urlopen
def _download_file(url, dest_dir, dest_filename):
"""download a given url to a given destination directory and
destination filenamee"""
filename = os.path.join(dest_dir, dest_filename)
with closing(urlopen(url)) as response: # nosec
with closing(urllib.urlopen(url)) as response: # nosec
with open(filename, 'wb') as f:
while True:
buf = response.read(8192)
@ -68,7 +64,7 @@ def _extract_archive_to_tempdir(archive_filename):
def _find_archives(directories, basename):
"""return a list of archives in the given directories
or an empty list if no archive(s) can be found"""
if isinstance(directories, six.string_types):
if isinstance(directories, str):
directories = [directories]
return sorted(

View File

@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from packaging.requirements import Requirement
from packaging.version import Version

View File

@ -5,4 +5,3 @@ pymod2pkg!=0.8.0,>=0.7.0 # Apache-2.0
Jinja2>=2.10 # BSD License (3 clause)
PyYAML>=3.10 # MIT
packaging>=16.5 # Apache-2.0
six>=1.10.0 # MIT

View File

@ -14,8 +14,6 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7

View File

@ -1,10 +1,11 @@
[tox]
envlist = py27,py37,pypy,pep8
envlist = py37,pypy,pep8
minversion = 2.0
skipsdist = True
[testenv]
usedevelop = True
basepython = python3
install_command = pip install {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
OS_STDOUT_NOCAPTURE=False
@ -17,7 +18,6 @@ deps =
commands = stestr run {posargs}
[testenv:pep8]
basepython = python3
deps = {[testenv]deps}
flake8<3.8.0,>=3.7.0
bandit>=1.1.0
@ -26,14 +26,12 @@ commands =
bandit -r -s B701 renderspec -x tests
[testenv:venv]
basepython = python3
commands = {posargs}
[flake8]
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
python setup.py build_sphinx