From 301002ab7e5fbe48496e2057b3b68c9a9145e78f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 9 Jun 2020 11:01:53 +0200 Subject: [PATCH] Cleanups - Remove obsolete sections from setup.cfg - Remove install_command from tox.ini, the default is fine - Remove Babel from requirements, it's not needed for running. - Remove babel.cfg and openstack-common.conf as obsolete files. - Use TOX_CONSTRAINTS_FILE instead of obsolete UPPER_CONSTRAINTS_FILE. - Switch to hacking 3.1.0 - Remove hacking and friends from lower-constraints, they are not needed there. - Remove usage of six. Change-Id: Ie14af01447aca8c11de082ea64fabb6db2b0d434 --- babel.cfg | 2 -- .../tests/functional/test_brick_client.py | 5 +++-- lower-constraints.txt | 7 ------- openstack-common.conf | 6 ------ setup.cfg | 14 -------------- test-requirements.txt | 2 +- tox.ini | 10 +++------- 7 files changed, 7 insertions(+), 39 deletions(-) delete mode 100644 babel.cfg delete mode 100644 openstack-common.conf diff --git a/babel.cfg b/babel.cfg deleted file mode 100644 index 15cd6cb..0000000 --- a/babel.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[python: **.py] - diff --git a/brick_cinderclient_ext/tests/functional/test_brick_client.py b/brick_cinderclient_ext/tests/functional/test_brick_client.py index 459f5b4..71419a9 100644 --- a/brick_cinderclient_ext/tests/functional/test_brick_client.py +++ b/brick_cinderclient_ext/tests/functional/test_brick_client.py @@ -10,11 +10,12 @@ # License for the specific language governing permissions and limitations # under the License. +import configparser import os from cinderclient import client as c_client from oslotest import base -import six + from brick_cinderclient_ext import client @@ -38,7 +39,7 @@ def credentials(): tenant_name = os.environ.get('OS_TENANT_NAME') auth_url = os.environ.get('OS_AUTH_URL') - config = six.moves.configparser.RawConfigParser() + config = configparser.RawConfigParser() if config.read(_CREDS_FILE): username = username or config.get('admin', 'user') password = password or config.get('admin', 'pass') diff --git a/lower-constraints.txt b/lower-constraints.txt index 31eae44..2b78be7 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 certifi==2018.1.18 cffi==1.11.5 chardet==3.0.4 @@ -16,10 +15,8 @@ eventlet==0.20.0 extras==1.0.0 fasteners==0.14.1 fixtures==3.0.0 -flake8==2.2.4 future==0.16.0 greenlet==0.4.13 -hacking==2.0.0 idna==2.6 imagesize==1.0.0 iso8601==0.1.12 @@ -27,7 +24,6 @@ Jinja2==2.10 keystoneauth1==3.4.0 linecache2==1.0.0 MarkupSafe==1.0 -mccabe==0.2.1 mock==2.0.0 monotonic==1.4 mox3==0.25.0 @@ -51,10 +47,8 @@ oslotest==3.2.0 Paste==2.0.3 PasteDeploy==1.5.2 pbr==2.0.0 -pep8==1.5.7 prettytable==0.7.2 pycparser==2.18 -pyflakes==0.8.1 Pygments==2.2.0 pyinotify==0.9.6 pyparsing==2.2.0 @@ -72,7 +66,6 @@ retrying==1.3.3 rfc3986==1.1.0 Routes==2.4.1 simplejson==3.13.2 -six==1.11.0 snowballstemmer==1.2.1 stestr==1.0.0 stevedore==1.28.0 diff --git a/openstack-common.conf b/openstack-common.conf deleted file mode 100644 index 2b06aee..0000000 --- a/openstack-common.conf +++ /dev/null @@ -1,6 +0,0 @@ -[DEFAULT] - -# The list of modules to copy from oslo-incubator.git - -# The base module to hold the copy of openstack.common -base=brick-python-cinderclient-ext diff --git a/setup.cfg b/setup.cfg index c776d94..663713a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,17 +25,3 @@ classifier = packages = brick_cinderclient_ext brick_python_cinderclient_ext - -[compile_catalog] -directory = brick-cinderclient-ext/locale -domain = brick-cinderclient-ext - -[update_catalog] -domain = brick-cinderclient-ext -output_dir = brick-cinderclient-ext/locale -input_file = brick-cinderclient-ext/locale/brick-cinderclient-ext.pot - -[extract_messages] -keywords = _ gettext ngettext l_ lazy_gettext -mapping_file = babel.cfg -output_file = brick-cinderclient-ext/locale/brick-cinderclient-ext.pot diff --git a/test-requirements.txt b/test-requirements.txt index d1fa5b4..a17b19e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=3.0.1,<3.1.0 # Apache-2.0 +hacking>=3.1.0,<3.2.0 # Apache-2.0 python-cinderclient>=3.3.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 2347ed0..ddf58e8 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,6 @@ ignore_basepython_conflict=true [testenv] basepython = python3 usedevelop = True -install_command = pip install {opts} {packages} setenv = VIRTUAL_ENV={envdir} OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 @@ -20,7 +19,7 @@ setenv = VIRTUAL_ENV={envdir} passenv = *_proxy *_PROXY deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt commands = @@ -63,16 +62,13 @@ commands = [testenv:docs] deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = sphinx-build -b html doc/source doc/build/html [testenv:releasenotes] -deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} - -r{toxinidir}/requirements.txt - -r{toxinidir}/doc/requirements.txt +deps = {[testenv:docs]deps} commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:debug]