From 32a1b6e94845b081e9c00d235320b2014cf18d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Mon, 3 Feb 2020 17:47:44 +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: I15cc79159b603e232e442e202c78d6c56dc73252 --- .zuul.yaml | 29 +------------------ doc/requirements.txt | 3 +- lower-constraints.txt | 1 - ...rop-python27-support-5ef2f365d8930483.yaml | 5 ++++ setup.cfg | 8 ++--- setup.py | 8 ----- tox.ini | 25 ++-------------- 7 files changed, 12 insertions(+), 67 deletions(-) create mode 100644 releasenotes/notes/drop-python27-support-5ef2f365d8930483.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 2c4b0ed4b..766436019 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,23 +1,3 @@ -- job: - name: oslo.messaging-tox-py27-func-amqp1 - parent: openstack-tox-py27 - vars: - tox_envlist: py27-func-amqp1 - -- job: - name: oslo.messaging-tox-py27-func-kafka - parent: openstack-tox-py27 - vars: - tox_envlist: py27-func-kafka - bindep_profile: kafka - -- job: - name: oslo.messaging-tox-py27-func-rabbit - parent: openstack-tox-py27 - vars: - tox_envlist: py27-func-rabbit - bindep_profile: rabbit - - job: name: oslo.messaging-tox-py36-func-amqp1 parent: openstack-tox-py36 @@ -150,22 +130,15 @@ - project: templates: - check-requirements - - lib-forward-testing - lib-forward-testing-python3 - openstack-cover-jobs - openstack-lower-constraints-jobs - - openstack-python-jobs - openstack-python3-ussuri-jobs - periodic-stable-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 check: jobs: - - oslo.messaging-tox-py27-func-rabbit - - oslo.messaging-tox-py27-func-amqp1: - voting: false - - oslo.messaging-tox-py27-func-kafka: - voting: false - oslo.messaging-tox-py36-func-rabbit: voting: false - oslo.messaging-tox-py36-func-amqp1: @@ -190,5 +163,5 @@ gate: jobs: - - oslo.messaging-tox-py27-func-rabbit + - oslo.messaging-tox-py36-func-rabbit - oslo.messaging-src-dsvm-full-rabbit diff --git a/doc/requirements.txt b/doc/requirements.txt index a6e137e7b..c60c647a7 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -3,8 +3,7 @@ # process, which may cause wedges in the gate later. 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 # imported when the source code is parsed for generating documentation: diff --git a/lower-constraints.txt b/lower-constraints.txt index abf4267a0..db63fe6ac 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -18,7 +18,6 @@ extras==1.0.0 fasteners==0.7.0 fixtures==3.0.0 flake8==2.5.5 -futures==3.0.0;python_version=='2.7' or python_version=='2.6' # BSD futurist==1.2.0 gitdb==0.6.4 GitPython==1.0.1 diff --git a/releasenotes/notes/drop-python27-support-5ef2f365d8930483.yaml b/releasenotes/notes/drop-python27-support-5ef2f365d8930483.yaml new file mode 100644 index 000000000..c5195c081 --- /dev/null +++ b/releasenotes/notes/drop-python27-support-5ef2f365d8930483.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Support for Python 2.7 has been dropped. The latest version of Python now + supported is Python 3.6. diff --git a/setup.cfg b/setup.cfg index 5e5b98507..ecacb87d9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,6 +6,7 @@ summary = Oslo Messaging API description-file = README.rst home-page = https://docs.openstack.org/oslo.messaging/latest/ +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Developers @@ -13,11 +14,11 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: OS Independent 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 [extras] # package dependencies for optional (non-rabbitmq) messaging drivers. @@ -65,9 +66,6 @@ oslo.messaging.notify.drivers = oslo.config.opts = oslo.messaging = oslo_messaging.opts:list_opts -[bdist_wheel] -universal = 1 - [compile_catalog] directory = oslo_messaging/locale domain = oslo_messaging diff --git a/setup.py b/setup.py index 566d84432..f63cc23c5 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/tox.ini b/tox.ini index 6b577af5e..2e529b1bf 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 @@ -42,33 +42,12 @@ commands = rm -fr doc/build sphinx-build -W --keep-going -b html doc/source doc/build/html -[testenv:py27-func-rabbit] -setenv = - {[testenv]setenv} - TRANSPORT_DRIVER=rabbit -commands = pifpaf run rabbitmq -- stestr run --slowest {posargs:oslo_messaging.tests.functional} - [testenv:py36-func-rabbit] setenv = {[testenv]setenv} TRANSPORT_DRIVER=rabbit commands = pifpaf run rabbitmq -- stestr run --slowest {posargs:oslo_messaging.tests.functional} -[testenv:py27-func-kafka] -setenv = - {[testenv]setenv} - TRANSPORT_URL=kafka://127.0.0.1:9092/ - OS_GROUP_REGEX=oslo_messaging.tests.functional -commands = {toxinidir}/setup-test-env-kafka.sh stestr run --slowest {posargs:oslo_messaging.tests.functional} - -[testenv:py27-func-amqp1] -setenv = - {[testenv]setenv} - TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:5672// - ENVNAME={envname} - WORKDIR={toxworkdir} -commands = {toxinidir}/tools/setup-test-env-amqp1.sh stestr run --slowest {posargs:oslo_messaging.tests.functional} - [testenv:py36-func-amqp1] setenv = {[testenv]setenv}