From 602e70cb552b984ea157c625051b1ac3f6565fe9 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 17 Apr 2020 10:50:32 +0200 Subject: [PATCH] Cleanup py27 support This repo is now testing only with Python 3, so let's make a few cleanups: - 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 - Update classifiers - Use newer openstackdocstheme, Sphinx, os-api-ref versions, remove unused mock requirement Change-Id: If7db350ea55a5edf7055ce049d27d9412b0e40bc --- doc/requirements.txt | 7 +++---- lower-constraints.txt | 4 ++-- setup.cfg | 13 +++---------- setup.py | 9 --------- 4 files changed, 8 insertions(+), 25 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 4cd964f84d4..8f984b5656a 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,10 +1,9 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -openstackdocstheme>=1.20.0 # Apache-2.0 +openstackdocstheme>=2.0.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.3 # BSD -os-api-ref>=1.4.0 # Apache-2.0 +sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=2.0.0 # BSD +os-api-ref>=1.5.0 # Apache-2.0 sphinxcontrib-apidoc>=0.2.0 # BSD sphinx-feature-classification>=0.1.0 # Apache 2.0 -mock>=2.0.0 # BSD diff --git a/lower-constraints.txt b/lower-constraints.txt index 8efb3dce666..28c90ee70d2 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -63,7 +63,7 @@ netaddr==0.7.19 netifaces==0.10.6 networkx==1.11 oauth2client==1.5.0 -openstackdocstheme==1.20.0 +openstackdocstheme==2.0.0 os-api-ref==1.4.0 os-brick==2.2.0 os-client-config==1.29.0 @@ -134,7 +134,7 @@ rtslib-fb==2.1.65 six==1.10.0 smmap2==2.0.3 snowballstemmer==1.2.1 -Sphinx==1.6.5 +Sphinx==2.0.0 sphinx-feature-classification==0.1.0 sphinxcontrib-websupport==1.0.1 sqlalchemy-migrate==0.11.0 diff --git a/setup.cfg b/setup.cfg index 60acb86dbe1..fae7eb39887 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/cinder/latest/ +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,14 +14,12 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 -[global] -setup-hooks = - pbr.hooks.setup_hook - [files] data_files = etc/cinder = @@ -75,12 +74,6 @@ wsgi_scripts = cinder.database.migration_backend = sqlalchemy = oslo_db.sqlalchemy.migration - -[egg_info] -tag_build = -tag_date = 0 -tag_svn_revision = 0 - [compile_catalog] directory = cinder/locale domain = cinder diff --git a/setup.py b/setup.py index 566d84432ee..cd35c3c35bf 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>=2.0.0'], pbr=True)