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
- Remove install_command from tox.ini, the default is fine
- Use TOX_CONSTRAINTS_FILE instead of obsolete UPPER_CONSTRAINTS_FILE.
- Update hacking to current version 3.1.0, fix problems found.

Change-Id: I86c18b4c73f9b3dc0b3d804559d825dac5a78436
This commit is contained in:
Andreas Jaeger 2020-06-09 13:52:39 +02:00
parent cae8625487
commit 6d253ca7f1
8 changed files with 19 additions and 37 deletions

View File

@ -455,8 +455,7 @@ class RaidConfig(generic.View):
@urls.register
class DriverDetails(generic.View):
url_regex = r'ironic/drivers/(?P<driver_name>[0-9a-zA-Z_-]+)$'. \
format(LOGICAL_NAME_PATTERN)
url_regex = r'ironic/drivers/(?P<driver_name>[0-9a-zA-Z_-]+)$'
@rest_utils.ajax()
def get(self, request, driver_name):

View File

@ -40,4 +40,5 @@ class Ironic(horizon.Panel):
else:
return True
dashboard.Admin.register(Ironic)

View File

@ -19,22 +19,22 @@ from openstack_dashboard.test.settings import * # noqa
# pop these keys to avoid log warnings about deprecation
# update_dashboards will populate them anyway
HORIZON_CONFIG.pop('dashboards', None)
HORIZON_CONFIG.pop('default_dashboard', None)
HORIZON_CONFIG.pop('dashboards', None) # noqa: F405
HORIZON_CONFIG.pop('default_dashboard', None) # noqa: F405
# Update the dashboards with ironic_ui
import ironic_ui.enabled
import openstack_dashboard.enabled
from openstack_dashboard.utils import settings
import ironic_ui.enabled # noqa: E402
import openstack_dashboard.enabled # noqa: E402
from openstack_dashboard.utils import settings # noqa: E402
settings.update_dashboards(
[
ironic_ui.enabled,
openstack_dashboard.enabled,
],
HORIZON_CONFIG,
INSTALLED_APPS
HORIZON_CONFIG, # noqa: F405
INSTALLED_APPS # noqa: F405
)
# Ensure any duplicate apps are removed after the update_dashboards call
INSTALLED_APPS = list(set(INSTALLED_APPS))
INSTALLED_APPS = list(set(INSTALLED_APPS)) # noqa: F405

View File

@ -1,7 +1,6 @@
alabaster==0.7.10
appdirs==1.4.3
asn1crypto==0.24.0
Babel==2.5.3
certifi==2018.1.18
cffi==1.11.5
chardet==3.0.4

View File

@ -6,6 +6,7 @@ description-file =
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/ironic-ui/latest/
python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@ -13,24 +14,13 @@ 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
Programming Language :: Python :: 3.8
[pbr]
autodoc_index_modules = True
autodoc_exclude_modules =
ironic_ui.test.*
api_doc_dir = contributor/api
[files]
packages =
ironic_ui
[upload_sphinx]
upload-dir = doc/build/html
[compile_catalog]
directory = ironic_ui/locale
domain = ironic-ui

View File

@ -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)

View File

@ -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!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking>=3.1.0,<=3.2.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD

View File

@ -14,7 +14,7 @@ setenv = VIRTUAL_ENV={envdir}
NOSE_OPENSTACK_YELLOW=0.025
NOSE_OPENSTACK_SHOW_ELAPSED=1
DJANGO_SETTINGS_MODULE=ironic_ui.test.settings
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
@ -47,7 +47,7 @@ commands = python setup.py test --coverage --testr-args='{posargs}'
[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}/doc/requirements.txt
commands =
sphinx-build -W -b html doc/source doc/build/html
@ -66,11 +66,13 @@ commands = oslo_debug_helper -t ironic_ui/test/tests {posargs}
show-source = True
builtins = _
# [W503] Line break before binary operator.
ignore = W503
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:releasenotes]
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}/doc/requirements.txt
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html