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 - Switch to using sphinx-build - Cleanup */source/conf.py to remove now obsolete content. - Use newer openstackdocstheme version - Use mock from unittest;leave it in test-requirements for now since otherwise lower-constraints fails since some repos expect mock to be installed without requiring it. - Remove future imports, not needed for python3 - Update to newer hacking version for python3, disable one warning. Remove hacking requirements from lower-constraints, they are not needed there. - Cleanup tox.ini, move basepython to top - Update horizon requirement for ussuri Change-Id: I1753bce3ac4fc4248783c0669cacab2e037e62fe
This commit is contained in:
parent
58c6bfcfba
commit
30bb75d744
@ -2,6 +2,5 @@
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
|
||||
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
|
||||
openstackdocstheme>=1.31.2 # Apache-2.0
|
||||
sphinx>=1.8.0,!=2.1.0 # BSD
|
||||
|
@ -119,6 +119,3 @@ latex_elements = {
|
||||
repository_name = 'openstack/watcher-dashboard'
|
||||
bug_project = 'watcher-dashboard'
|
||||
bug_tag = ''
|
||||
|
||||
# Must set this variable to include year, month, day, hours, and minutes.
|
||||
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
||||
|
@ -24,10 +24,8 @@ dulwich==0.19.0
|
||||
extras==1.0.0
|
||||
fasteners==0.14.1
|
||||
fixtures==3.0.0
|
||||
flake8==2.5.5
|
||||
futurist==1.6.0
|
||||
hacking==0.12.0
|
||||
horizon==17.1.0
|
||||
horizon==18.2.0
|
||||
httplib2==0.10.3
|
||||
idna==2.6
|
||||
imagesize==1.0.0
|
||||
@ -40,14 +38,13 @@ jsonschema==2.6.0
|
||||
keystoneauth1==3.4.0
|
||||
linecache2==1.0.0
|
||||
MarkupSafe==1.0
|
||||
mccabe==0.2.1
|
||||
mock==2.0.0
|
||||
monotonic==1.4
|
||||
msgpack==0.5.6
|
||||
munch==2.2.0
|
||||
netaddr==0.7.19
|
||||
netifaces==0.10.6
|
||||
openstackdocstheme==1.18.1
|
||||
openstackdocstheme==1.31.2
|
||||
openstacksdk==0.12.0
|
||||
os-client-config==1.29.0
|
||||
os-service-types==1.2.0
|
||||
@ -61,11 +58,9 @@ oslo.utils==3.36.0
|
||||
osprofiler==2.3.0
|
||||
packaging==17.1
|
||||
pbr==2.0.0
|
||||
pep8==1.5.7
|
||||
Pint==0.8.1
|
||||
prettytable==0.7.2
|
||||
pycparser==2.18
|
||||
pyflakes==0.8.1
|
||||
Pygments==2.2.0
|
||||
pymongo==3.6.1
|
||||
pyOpenSSL==17.5.0
|
||||
|
@ -113,10 +113,6 @@ repository_name = 'openstack/watcher-dashboard'
|
||||
bug_project = 'watcher-dashboard'
|
||||
bug_tag = ''
|
||||
|
||||
# Must set this variable to include year, month, day, hours, and minutes.
|
||||
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
||||
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||
|
||||
horizon>=17.1.0 # Apache-2.0
|
||||
horizon>=18.2.0 # Apache-2.0
|
||||
|
||||
PyYAML>=3.12 # MIT
|
||||
python-watcherclient>=1.1.0 # Apache-2.0
|
||||
|
@ -6,6 +6,7 @@ description-file =
|
||||
author = OpenStack
|
||||
author-email = openstack-discuss@lists.openstack.org
|
||||
home-page = https://docs.openstack.org/watcher-dashboard/latest
|
||||
python-requires = >=3.6
|
||||
classifier =
|
||||
Development Status :: 5 - Production/Stable
|
||||
Environment :: OpenStack
|
||||
@ -17,6 +18,8 @@ classifier =
|
||||
Operating System :: OS Independent
|
||||
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
|
||||
@ -26,11 +29,6 @@ classifier =
|
||||
packages =
|
||||
watcher_dashboard
|
||||
|
||||
[build_sphinx]
|
||||
all_files = 1
|
||||
build-dir = doc/build
|
||||
source-dir = doc/source
|
||||
|
||||
[nosetests]
|
||||
verbosity=2
|
||||
detailed-errors=1
|
||||
|
9
setup.py
9
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)
|
||||
|
@ -3,7 +3,7 @@
|
||||
# process, which may cause wedges in the gate later.
|
||||
# Hacking already pins down pep8, pyflakes and flake8
|
||||
|
||||
hacking>=1.1.0,<1.2.0 # Apache-2.0
|
||||
hacking>=3.0,<3.1.0 # Apache-2.0
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
mock>=2.0.0 # BSD
|
||||
python-subunit>=1.0.0 # Apache-2.0/BSD
|
||||
@ -14,7 +14,6 @@ testtools>=2.2.0 # MIT
|
||||
xvfbwrapper>=0.1.3 #license: MIT
|
||||
|
||||
# Doc requirements
|
||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
|
||||
openstackdocstheme>=1.31.2 # Apache-2.0
|
||||
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
|
@ -22,8 +22,6 @@ environment, it should be kept strictly compatible with Python 2.6.
|
||||
Synced in from openstack-common
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import optparse
|
||||
import os
|
||||
import subprocess
|
||||
|
14
tox.ini
14
tox.ini
@ -4,6 +4,7 @@ envlist = py37,py36,pep8
|
||||
skipsdist = True
|
||||
|
||||
[testenv]
|
||||
basepython = python3
|
||||
usedevelop = True
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
DJANGO_SETTINGS_MODULE=watcher_dashboard.test.settings
|
||||
@ -26,31 +27,25 @@ commands =
|
||||
watcher_dashboard
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
commands = flake8
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:releasenotes]
|
||||
basepython = python3
|
||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/doc/requirements.txt
|
||||
commands = python setup.py build_sphinx
|
||||
commands = sphinx-build -W -b html doc/source doc/build/html
|
||||
|
||||
[testenv:pdf-docs]
|
||||
basepython = python3
|
||||
envdir = {toxworkdir}/docs
|
||||
deps = {[testenv:docs]deps}
|
||||
whitelist_externals =
|
||||
@ -62,19 +57,18 @@ commands =
|
||||
make -C doc/build/pdf
|
||||
|
||||
[testenv:debug]
|
||||
basepython = python3
|
||||
commands = oslo_debug_helper {posargs}
|
||||
|
||||
[flake8]
|
||||
# F405 TEMPLATES may be undefined, or defined from star imports
|
||||
# (because it is not easy to avoid this in openstack_dashboard.test.settings)
|
||||
ignore = F405
|
||||
# W504 line break after binary operator
|
||||
ignore = F405,W504
|
||||
show-source = True
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject,tools
|
||||
|
||||
[testenv:lower-constraints]
|
||||
basepython = python3
|
||||
deps =
|
||||
-c{toxinidir}/lower-constraints.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
@ -10,8 +10,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
from django.conf import settings
|
||||
|
@ -13,8 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
import horizon.exceptions
|
||||
|
@ -13,8 +13,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from django import urls
|
||||
import mock
|
||||
|
||||
from watcher_dashboard import api
|
||||
from watcher_dashboard.test import helpers as test
|
||||
|
@ -13,8 +13,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from django import urls
|
||||
import mock
|
||||
|
||||
from watcher_dashboard import api
|
||||
from watcher_dashboard.test import helpers as test
|
||||
|
@ -13,8 +13,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from unittest import mock
|
||||
|
||||
from django import urls
|
||||
import mock
|
||||
|
||||
from watcher_dashboard import api
|
||||
from watcher_dashboard.test import helpers as test
|
||||
|
@ -13,8 +13,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from watcher_dashboard import api
|
||||
from watcher_dashboard.test import helpers as test
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from openstack_dashboard.test import helpers
|
||||
|
||||
|
@ -13,8 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
|
||||
from horizon.test import helpers as test
|
||||
|
Loading…
Reference in New Issue
Block a user