From 339f23dcf5f87057758f84db1bb4b2969253b7d1 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 17 Apr 2020 17:05:58 +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 - Remove obsolete sections from setup.cfg - Update classifiers - Use newer openstackdocstheme and Sphinx versions - Cleanup */source/conf.py to remove now obsolete content. - Remove install_command from tox.ini, the default is fine Change-Id: Ib70fcdc751a1e84d3160558361a76bbd328f4625 --- doc/requirements.txt | 5 +++-- doc/source/conf.py | 3 --- releasenotes/source/conf.py | 4 ---- setup.cfg | 15 ++------------- setup.py | 9 --------- tox.ini | 1 - 6 files changed, 5 insertions(+), 32 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 9f38ada..ff2aedf 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,7 +1,8 @@ # 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.2 # BSD +sphinx>=2.0.0,!=2.1.0 # BSD sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 7d86e7c..a45aa73 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -31,9 +31,6 @@ repository_name = 'openstack/coverage2sql' bug_project = 'coverage2sql' bug_tag = '' -# Must set this variable to include year, month, day, hours, and minutes. -html_last_updated_fmt = '%Y-%m-%d %H:%M' - # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 65b59f2..0f93b08 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -138,10 +138,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 = '%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 c89bd55..46b91b5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,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 @@ -22,10 +24,6 @@ classifier = packages = coverage2sql -[global] -setup-hooks = - pbr.hooks.setup_hook - [entry_points] console_scripts = coverage2sql = coverage2sql.shell:main @@ -33,15 +31,6 @@ console_scripts = oslo.config.opts = coverage2sql.shell = coverage2sql.shell:list_opts -[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 = coverage2sql/locale domain = coverage2sql diff --git a/setup.py b/setup.py index 566d844..cd35c3c 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/tox.ini b/tox.ini index 4e9ebbd..07b4152 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,6 @@ ignore_basepython_conflict = True [testenv] basepython = python3 usedevelop = True -install_command = pip install -U --force-reinstall {opts} {packages} setenv = VIRTUAL_ENV={envdir} whitelist_externals = find deps = -r{toxinidir}/requirements.txt