From a5fe49a956650922655d69758d197a78b2a3a16c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 4 Feb 2020 20:32:42 +0100 Subject: [PATCH] [ussuri][goal] Drop python 2.7 support and testing OpenStack is dropping the py2.7 support in ussuri cycle. 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 Change-Id: Ibea136743f9a82d0e9ff35bc59f54a4c8afda74b --- .zuul.yaml | 1 - .../notes/drop-python-2-7-73d3113c69d724d6.yaml | 5 +++++ setup.cfg | 14 +++----------- setup.py | 8 -------- test-requirements.txt | 3 +-- tox.ini | 13 ++++--------- 6 files changed, 13 insertions(+), 31 deletions(-) create mode 100644 releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml diff --git a/.zuul.yaml b/.zuul.yaml index b6127c8..192d334 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,6 +1,5 @@ - project: templates: - - openstack-python-jobs - openstack-python3-ussuri-jobs - publish-openstack-docs-pti - check-requirements diff --git a/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml b/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml new file mode 100644 index 0000000..ecf95ef --- /dev/null +++ b/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. The minimum version of Python now + supported by os-service-types is Python 3.6. diff --git a/setup.cfg b/setup.cfg index b1f0d0e..bedcb94 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,6 +6,7 @@ description-file = author = OpenStack author-email = openstack-discuss@lists.openstack.org home-page = https://docs.openstack.org/os-service-types/latest/ +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,21 +14,12 @@ 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 = os_service_types - -[build_sphinx] -all-files = 1 -warning-is-error = 1 -source-dir = doc/source -build-dir = doc/build - -[upload_sphinx] -upload-dir = doc/build/html diff --git a/setup.py b/setup.py index 566d844..f63cc23 100644 --- a/setup.py +++ b/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) diff --git a/test-requirements.txt b/test-requirements.txt index 776d8a6..e4c2ccf 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,8 +6,7 @@ hacking>=1.1.0,<1.2.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD -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,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD +sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD stestr>=2.0.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 testscenarios>=0.4 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index f68cb91..df61544 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,12 @@ [tox] -minversion = 2.0 -envlist = py27,py37,pep8 +minversion = 3.1.0 +envlist = py37,pep8 +ignore_basepython_conflict = true skipsdist = True [testenv] +basepython = python3 usedevelop = True -install_command = pip install {opts} {packages} setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning @@ -16,15 +17,12 @@ deps = commands = stestr run --slowest {posargs} [testenv:pep8] -basepython = python3 commands = flake8 {posargs} [testenv:venv] -basepython = python3 commands = {posargs} [testenv:cover] -basepython = python3 setenv = PYTHON=coverage run --source os_service_types --parallel-mode commands = @@ -35,16 +33,13 @@ commands = coverage report [testenv:docs] -basepython = python3 commands = sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html [testenv:releasenotes] -basepython = python3 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:debug] -basepython = python3 commands = oslo_debug_helper {posargs} [flake8]