[ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle. os-testr is ready with python 3 and ok to drop the python 2.7 support. Complete discussion & schedule can be found in - http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html - https://etherpad.openstack.org/p/drop-python2-support Ussuri Communtiy-wide goal: https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html Switch to using sphinx-build, remove cruft from setup.cfg, setup.py, tox.ini, conf.py. Update hacking version to support python3 properly. Fix problems found by pep8. Change-Id: I6ab22dda05132a735bd9e5caf16cc2bd172b06cc
This commit is contained in:
parent
8859449359
commit
fcf791b38a
|
@ -1,7 +1,6 @@
|
|||
- project:
|
||||
templates:
|
||||
- check-requirements
|
||||
- openstack-python-jobs
|
||||
- openstack-python3-train-jobs
|
||||
- openstack-python3-ussuri-jobs
|
||||
- publish-openstack-docs-pti
|
||||
- release-notes-jobs-python3
|
||||
|
|
|
@ -3,5 +3,4 @@
|
|||
# process, which may cause wedges in the gate later.
|
||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
|
||||
|
|
|
@ -31,9 +31,6 @@ repository_name = 'openstack/os-testr'
|
|||
bug_project = 'os-testr'
|
||||
bug_tag = ''
|
||||
|
||||
# Must set this variable to include year, month, day, hours, and minutes.
|
||||
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
||||
|
||||
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||
# text edit cycles.
|
||||
# execute "export SPHINX_DEBUG=1" in your terminal to disable
|
||||
|
|
|
@ -279,5 +279,6 @@ def ostestr(args):
|
|||
def main():
|
||||
exit(ostestr(sys.argv[1:]))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -209,7 +209,7 @@ test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
|
|||
$LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
||||
group_regex=([^\.]+\.)+
|
||||
group_regex=([^\\.]+\\.)+
|
||||
"""
|
||||
with io.StringIO() as testrconf_data_file:
|
||||
testrconf_data_file.write(testrconf_data)
|
||||
|
@ -221,7 +221,7 @@ group_regex=([^\.]+\.)+
|
|||
# validate the discovery of the options from the legacy
|
||||
# .testr.conf
|
||||
self.assertEqual(parsed_values, ('mytestdir', None,
|
||||
'([^\.]+\.)+'))
|
||||
r'([^\.]+\.)+'))
|
||||
|
||||
def test_parse_legacy_testrconf_topdir(self):
|
||||
'''Test parse_testrconf
|
||||
|
@ -238,7 +238,7 @@ test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
|
|||
$LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
||||
group_regex=([^\.]+\.)+
|
||||
group_regex=([^\\.]+\\.)+
|
||||
"""
|
||||
with io.StringIO() as testrconf_data_file:
|
||||
testrconf_data_file.write(testrconf_data)
|
||||
|
@ -250,4 +250,4 @@ group_regex=([^\.]+\.)+
|
|||
# validate the discovery of the options from the legacy
|
||||
# .testr.conf
|
||||
self.assertEqual(parsed_values, ('mytestdir', '..',
|
||||
'([^\.]+\.)+'))
|
||||
r'([^\.]+\.)+'))
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
Python 2.7 support has been dropped. Last release of os-testr
|
||||
to support python 2.7 is 1.1.0. The minimum version of Python now
|
||||
supported by os-testr is Python 3.6.
|
13
setup.cfg
13
setup.cfg
|
@ -6,6 +6,7 @@ description-file =
|
|||
author = OpenStack
|
||||
author-email = openstack-discuss@lists.openstack.org
|
||||
home-page = https://docs.openstack.org/os-testr/latest/
|
||||
python-requires = >=3.6
|
||||
classifier =
|
||||
Environment :: OpenStack
|
||||
Intended Audience :: Information Technology
|
||||
|
@ -13,11 +14,11 @@ 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
|
||||
Programming Language :: Python :: 3 :: Only
|
||||
Programming Language :: Python :: Implementation :: CPython
|
||||
|
||||
[files]
|
||||
packages =
|
||||
|
@ -30,11 +31,3 @@ console_scripts =
|
|||
subunit2html = os_testr.subunit2html:main
|
||||
generate-subunit = os_testr.generate_subunit:main
|
||||
|
||||
[build_sphinx]
|
||||
source-dir = doc/source
|
||||
build-dir = doc/build
|
||||
all_files = 1
|
||||
warning-is-error = 1
|
||||
|
||||
[upload_sphinx]
|
||||
upload-dir = doc/build/html
|
||||
|
|
8
setup.py
8
setup.py
|
@ -16,14 +16,6 @@
|
|||
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
|
||||
import setuptools
|
||||
|
||||
# In python < 2.7.4, a lazy loading of package `pbr` will break
|
||||
# setuptools if some other modules registered functions in `atexit`.
|
||||
# solution from: http://bugs.python.org/issue15881#msg170215
|
||||
try:
|
||||
import multiprocessing # noqa
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr>=2.0.0'],
|
||||
pbr=True)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
hacking>=1.1.0,<1.2.0 # Apache-2.0
|
||||
hacking>=2.0,<2.1 # Apache-2.0
|
||||
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
|
|
24
tox.ini
24
tox.ini
|
@ -1,11 +1,13 @@
|
|||
[tox]
|
||||
minversion = 2.0
|
||||
envlist = py27,py36,py37,pypy,pep8
|
||||
skipsdist = True
|
||||
minversion = 3.1.1
|
||||
envlist = py36,py37,pypy,pep8
|
||||
# Need to set to False to have CHANGES generated
|
||||
skipsdist = false
|
||||
ignore_basepython_conflict = True
|
||||
|
||||
[testenv]
|
||||
basepython = python3
|
||||
usedevelop = True
|
||||
install_command = pip install -U {opts} {packages}
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
OS_STDOUT_CAPTURE=1
|
||||
|
@ -21,15 +23,12 @@ commands =
|
|||
ostestr {posargs}
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
commands = flake8
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
PYTHON=coverage run --source os_testr --parallel-mode
|
||||
|
@ -40,19 +39,17 @@ commands =
|
|||
coverage xml -o cover/coverage.xml
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/doc/requirements.txt
|
||||
commands = python setup.py build_sphinx
|
||||
commands =
|
||||
sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html
|
||||
|
||||
[testenv:debug]
|
||||
basepython = python3
|
||||
commands = oslo_debug_helper {posargs}
|
||||
|
||||
[testenv:releasenotes]
|
||||
basepython = python3
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/requirements.txt
|
||||
|
@ -67,8 +64,9 @@ whitelist_externals = rm
|
|||
# E123, E125 skipped as they are invalid PEP-8.
|
||||
# E731 skipped as assign a lambda expression
|
||||
# H405 skipped as it wrongly recognizes a multiline string as docstring
|
||||
|
||||
# W504 line break after binary operator (W503 and W504 are incompatible
|
||||
# and we need to choose one of them.
|
||||
show-source = True
|
||||
ignore = E123,E125,E731,H405
|
||||
ignore = E123,E125,E731,H405,W504
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||
|
|
Loading…
Reference in New Issue