From 48bde4d38f0b76c5694c3c6e10e1b96056353ec2 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Wed, 1 Apr 2020 15:07:33 +0900 Subject: [PATCH] Cleanup python 2.7 support * Remove six usage * Remove python 2.7 stanza from setup.py * Update supported python versions in setup.cfg * Remove i18n related sections in setup.cfg as tempest-horizon has no translation support * Remove unused requirements (oslo_log and babel) from requirements.txt Change-Id: Ifd530546bfb5ae25e01e72a0e3c02f963d9d04d2 --- requirements.txt | 3 --- setup.cfg | 23 ++++--------------- setup.py | 9 -------- .../scenario/test_dashboard_basic_ops.py | 8 +++---- 4 files changed, 8 insertions(+), 35 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7a29207..e683dbf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,8 +3,5 @@ # process, which may cause wedges in the gate later. pbr!=2.1.0,>=2.0.0 # Apache-2.0 -Babel!=2.4.0,>=2.3.4 # BSD oslo.config>=4.6.0 # Apache-2.0 -oslo.log>=3.30.0 # Apache-2.0 -six>=1.10.0 # MIT tempest>=17.1.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index 88a6eab..d2c1556 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,7 +5,7 @@ description-file = README.rst author = OpenStack author-email = openstack-discuss@lists.openstack.org -home-page = http://www.openstack.org/ +home-page = https://opendev.org/openstack/tempest-horizon classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,29 +13,14 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 - Programming Language :: Python :: 3.3 - Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 [files] packages = tempest_horizon + [entry_points] tempest.test_plugins = horizon = tempest_horizon.plugin:HorizonTempestPlugin - -[compile_catalog] -directory = tempest_horizon/locale -domain = tempest_horizon - -[update_catalog] -domain = tempest_horizon -output_dir = tempest_horizon/locale -input_file = tempest_horizon/locale/tempest_horizon.pot - -[extract_messages] -keywords = _ gettext ngettext l_ lazy_gettext -mapping_file = babel.cfg -output_file = tempest_horizon/locale/tempest_horizon.pot 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/tempest_horizon/tests/scenario/test_dashboard_basic_ops.py b/tempest_horizon/tests/scenario/test_dashboard_basic_ops.py index d2fa78c..84c20a9 100644 --- a/tempest_horizon/tests/scenario/test_dashboard_basic_ops.py +++ b/tempest_horizon/tests/scenario/test_dashboard_basic_ops.py @@ -12,9 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. -from six.moves import html_parser as HTMLParser -from six.moves.urllib import parse -from six.moves.urllib import request +import html.parser +from urllib import parse +from urllib import request from tempest import config from tempest.lib import decorators @@ -25,7 +25,7 @@ import ssl CONF = config.CONF -class HorizonHTMLParser(HTMLParser.HTMLParser): +class HorizonHTMLParser(html.parser.HTMLParser): csrf_token = None region = None login = None