From 3017e180f00d3f7f8f7b2eb9099e601806315dfe Mon Sep 17 00:00:00 2001 From: pengyuesheng Date: Fri, 27 Dec 2019 16:13:44 +0800 Subject: [PATCH] Drop python 2.7 support and testing Ussuri Communtiy-wide goal: https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html Change-Id: Ie875138bd1b773f460698e1eacc9dab542318e30 Sem-Ver: api-break --- .zuul.yaml | 2 -- doc/requirements.txt | 3 +-- .../drop-python27-support-b421329839e69d41.yaml | 5 +++++ setup.cfg | 14 +++----------- tox.ini | 8 ++++---- 5 files changed, 13 insertions(+), 19 deletions(-) create mode 100644 releasenotes/notes/drop-python27-support-b421329839e69d41.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 35eecfd..a60d493 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,10 +1,8 @@ - project: templates: - check-requirements - - lib-forward-testing - lib-forward-testing-python3 - openstack-lower-constraints-jobs - - openstack-python-jobs - openstack-python3-ussuri-jobs - periodic-stable-jobs - publish-openstack-docs-pti diff --git a/doc/requirements.txt b/doc/requirements.txt index 390e23d..e1f921e 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -3,7 +3,6 @@ # process, which may cause wedges in the gate later. # These are needed for docs generation openstackdocstheme>=1.20.0 # Apache-2.0 -sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD -sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD +sphinx>=1.8.0,!=2.1.0 # BSD reno>=2.5.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD diff --git a/releasenotes/notes/drop-python27-support-b421329839e69d41.yaml b/releasenotes/notes/drop-python27-support-b421329839e69d41.yaml new file mode 100644 index 0000000..ac8022e --- /dev/null +++ b/releasenotes/notes/drop-python27-support-b421329839e69d41.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Python 2.7 is no longer supported. The minimum supported version of Python + is now Python 3. diff --git a/setup.cfg b/setup.cfg index 022998d..ff7e683 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/oslo.context/latest/ +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,25 +14,16 @@ 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 = oslo_context -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 -warning-is-error = 1 - -[upload_sphinx] -upload-dir = doc/build/html - [compile_catalog] directory = oslo_context/locale domain = oslo_context diff --git a/tox.ini b/tox.ini index 4886b40..ce03feb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 3.1 -envlist = py27,py37,pep8 -ignore_basepython_conflict = True +envlist = py37,pep8 +ignore_basepython_conflict = true [testenv] basepython = python3 @@ -13,6 +13,7 @@ commands = stestr run --slowest {posargs} [testenv:pep8] deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt commands = flake8 @@ -42,8 +43,7 @@ commands = [flake8] # E123, E125 skipped as they are invalid PEP-8. - -show-source = True +show-source = true ignore = E123,E125 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build