From c78160c652256af40ddf7c85bcab4a2127c84a92 Mon Sep 17 00:00:00 2001 From: pengyuesheng Date: Wed, 25 Dec 2019 17:39:45 +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 Remove explicit listed jobs from check queue, they are in the templates. - Update jobs - Remove python 2.7 stanza from setup.py - Add requires on python >= 3.6 to setup.cfg so that pypi and pip know about the requirement - Remove obsolete sections from setup.cfg: * Wheel is not needed for python 3 only repo * Some other sections are obsolete - Update classifiers - Update requirements, no need for python_version anymore Co-Authored-By: Andreas Jaeger Change-Id: I4a1976c78b0fe69cc1b423c516d557838cb6d59b --- doc/requirements.txt | 3 +-- .../drop-python-2-7-73d3113c69d724d6.yaml | 5 +++++ setup.cfg | 21 +++---------------- setup.py | 9 -------- tox.ini | 6 ++++-- zuul.d/layout.yaml | 6 +----- 6 files changed, 14 insertions(+), 36 deletions(-) create mode 100644 releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml diff --git a/doc/requirements.txt b/doc/requirements.txt index ee95685..6685e70 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,5 +1,4 @@ # Even if we do not build doc with python 2, we have to # push that content due to some global check. -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 openstackdocstheme>=1.20.0 # Apache-2.0 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..fcc3ba0 --- /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 paunch is Python 3.6. diff --git a/setup.cfg b/setup.cfg index 58a01c3..5486114 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/paunch/latest/ +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,8 +14,8 @@ 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 :: Implementation :: CPython + Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 @@ -34,14 +35,6 @@ paunch = list = paunch.cmd:List debug = paunch.cmd:Debug -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 - -[upload_sphinx] -upload-dir = doc/build/html - [compile_catalog] directory = paunch/locale domain = paunch @@ -55,11 +48,3 @@ input_file = paunch/locale/paunch.pot keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg output_file = paunch/locale/paunch.pot - -[build_releasenotes] -all_files = 1 -build-dir = releasenotes/build -source-dir = releasenotes/source - -[wheel] -universal = 1 diff --git a/setup.py b/setup.py index 782bb21..0cdc8c2 100644 --- a/setup.py +++ b/setup.py @@ -13,17 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# 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>=1.8'], pbr=True) diff --git a/tox.ini b/tox.ini index 8ed9893..503ea83 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,8 @@ [tox] -minversion = 2.0 +minversion = 3.1.1 envlist = pep8,py37 skipsdist = False +ignore_basepython_conflict = True [testenv] basepython = python3 @@ -38,7 +39,8 @@ commands = [testenv:docs] deps = -r{toxinidir}/doc/requirements.txt -r{toxinidir}/test-requirements.txt -commands = python setup.py build_sphinx +commands = + sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html [testenv:releasenotes] deps = -r{toxinidir}/doc/requirements.txt diff --git a/zuul.d/layout.yaml b/zuul.d/layout.yaml index a890b28..e65ebc9 100644 --- a/zuul.d/layout.yaml +++ b/zuul.d/layout.yaml @@ -1,15 +1,11 @@ - project: templates: - - openstack-python3-ussuri-jobs - check-requirements + - openstack-python3-ussuri-jobs - publish-openstack-docs-pti - - openstack-python-jobs - release-notes-jobs-python3 check: jobs: - - openstack-tox-pep8 - - openstack-tox-py36 - - openstack-tox-py37 - tripleo-ci-centos-8-scenario004-standalone: dependencies: - openstack-tox-pep8