From 1accaf2d8a77e3462749a7579b172e69071e2b8e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 17 Apr 2020 16:51: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 - Update requirements, no need for python_version anymore - Cleanup doc/source/conf.py to remove now obsolete content. - Use newer openstackdocstheme and Sphinx versions - Remove install_command from tox.ini, the default is fine - Remove hacking from doc/requirements, we don't need to autodoc it. - Remove Babel, this repo does not use it. Change-Id: I8ad7b5e6ef11ea51c587ff58bfc54aee4fcda9da --- doc/requirements.txt | 5 ++--- doc/source/conf.py | 16 +--------------- lower-constraints.txt | 5 ++--- releasenotes/source/conf.py | 5 ----- setup.cfg | 17 +++-------------- setup.py | 9 --------- test-requirements.txt | 2 +- 7 files changed, 9 insertions(+), 50 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index eb30f19b..271c18b2 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -3,13 +3,12 @@ # process, which may cause wedges in the gate later. # For generationg sphinx documentation -openstackdocstheme>=1.18.1 # Apache-2.0 +openstackdocstheme>=2.0.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD +sphinx>=2.0.0,!=2.1.0 # BSD sphinxcontrib-apidoc>=0.2.0 # BSD # For autodoc builds -hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD mock>=2.0.0 # BSD betamax>=0.7.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 97a5313c..dc24d293 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -12,8 +12,6 @@ # All configuration values have a default; values that are commented out # serve to show the default. -from __future__ import unicode_literals - import os import sys @@ -47,6 +45,7 @@ extensions = ['sphinx.ext.todo', apidoc_module_dir = '../../keystoneauth1' apidoc_output_dir = 'api' apidoc_excluded_paths = [ + 'hacking', 'tests/*', 'tests', 'test'] @@ -69,15 +68,6 @@ master_doc = 'index' project = 'keystoneauth1' copyright = 'OpenStack Contributors' -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -version_info = pbr.version.VersionInfo('keystoneauth1') -# The short X.Y version. -version = version_info.version_string() -# The full version, including alpha/beta/rc tags. -release = version_info.release_string() - # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None @@ -157,10 +147,6 @@ html_theme = 'openstackdocs' # so a file named "default.css" will overwrite the builtin "default.css". #html_static_path = ['static'] -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -html_last_updated_fmt = '%Y-%m-%d %H:%M' - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True diff --git a/lower-constraints.txt b/lower-constraints.txt index 2d288fda..1473b182 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -1,6 +1,5 @@ alabaster==0.7.10 appdirs==1.4.3 -Babel==2.5.3 bandit==1.1.0 betamax==0.7.0 certifi==2018.1.18 @@ -31,7 +30,7 @@ netaddr==0.7.19 netifaces==0.10.6 oauthlib==0.6.2 openstack-requirements==1.2.0 -openstackdocstheme==1.18.1 +openstackdocstheme==2.0.0 os-client-config==1.29.0 os-service-types==1.2.0 oslo.config==5.2.0 @@ -60,7 +59,7 @@ rfc3986==1.1.0 six==1.10.0 smmap2==2.0.3 snowballstemmer==1.2.1 -Sphinx==1.6.2 +Sphinx==2.0.0 sphinxcontrib-websupport==1.0.1 stestr==1.0.0 stevedore==1.20.0 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 26d35799..5ce88acb 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -146,11 +146,6 @@ html_static_path = ['_static'] # directly to the root of the documentation. # html_extra_path = [] -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' -html_last_updated_fmt = '%Y-%m-%d %H:%M' - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True diff --git a/setup.cfg b/setup.cfg index 0056504c..b1653b60 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/keystoneauth/latest/ +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,6 +14,8 @@ 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 @@ -57,17 +60,3 @@ keystoneauth1.plugin = v3samlpassword = keystoneauth1.extras._saml2._loading:Saml2Password v3applicationcredential = keystoneauth1.loading._plugins.identity.v3:ApplicationCredential v3multifactor = keystoneauth1.loading._plugins.identity.v3:MultiFactor - -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 -warning-is-error = 1 - -[pbr] -autodoc_tree_index_modules = True -autodoc_tree_excludes = setup.py - -[upload_sphinx] -upload-dir = doc/build/html - diff --git a/setup.py b/setup.py index 566d8443..cd35c3c3 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) diff --git a/test-requirements.txt b/test-requirements.txt index 7d3622ac..5f8071c8 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,7 +11,7 @@ coverage!=4.4,>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD mock>=2.0.0 # BSD oslo.config>=5.2.0 # Apache-2.0 -openstackdocstheme>=1.18.1 # Apache-2.0 +openstackdocstheme>=2.0.0 # Apache-2.0 oslo.utils>=3.33.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 betamax>=0.7.0 # Apache-2.0