[ussuri][goal] Drop python 2.7 support

OpenStack is dropping the py2.7 support in ussuri cycle.

Fix test_titles.py for changed generator syntax.

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I334a97d3a0d144b233f51dc864eb56eb6057a064
This commit is contained in:
Ghanshyam Mann 2019-12-13 19:08:09 +00:00 committed by Andreas Jaeger
parent 2dddc9c109
commit e2fd901625
4 changed files with 6 additions and 8 deletions

View File

@ -3,7 +3,7 @@
- openstack-specs-jobs
check:
jobs:
- openstack-tox-py27
- openstack-tox-py36
gate:
jobs:
- openstack-tox-py27
- openstack-tox-py36

View File

@ -1,5 +1,4 @@
openstackdocstheme>=1.11.0
sphinx!=1.6.6,!=1.6.7,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7;python_version>='3.4' # BSD
testrepository>=0.0.18
testtools>=0.9.34

View File

@ -111,7 +111,7 @@ class TestTitles(testtools.TestCase):
# Get the current release directory - since we're moving up
# alphabetically, grab the highest name in the spec directory
generator = os.walk('specs')
dirname, subdirs, files = generator.next()
dirname, subdirs, files = next(generator)
current_release = max(subdirs)
found = False
for dirname, subdirs, files in generator:

View File

@ -1,9 +1,10 @@
[tox]
minversion = 1.6
envlist = docs,py27
envlist = docs,py3
skipsdist = True
[testenv]
basepython = python3
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
@ -11,11 +12,9 @@ deps = -r{toxinidir}/requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}'
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[testenv:spelling]
@ -23,4 +22,4 @@ deps =
-r{toxinidir}/requirements.txt
sphinxcontrib-spelling
PyEnchant
commands = sphinx-build -b spelling doc/source doc/build/spelling
commands = sphinx-build -b spelling doc/source doc/build/spelling