diff --git a/.zuul.yaml b/.zuul.yaml index c6f25e1d5..fb51de971 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -2,11 +2,17 @@ check: jobs: - murano-dashboard-sanity-check - - openstack-tox-lower-constraints + - horizon-openstack-tox-py35dj20: + required-projects: + openstack/horizon gate: jobs: - openstack-tox-lower-constraints + - horizon-openstack-tox-py35dj20: + required-projects: + openstack/horizon + - job: name: murano-dashboard-sanity-check parent: legacy-dsvm-base diff --git a/lower-constraints.txt b/lower-constraints.txt index 02ad98938..3c0990e34 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -1,9 +1,9 @@ alabaster==0.7.10 appdirs==1.4.3 asn1crypto==0.24.0 -Babel==2.5.3 +Babel==2.3.4 beautifulsoup4==4.6.0 -castellan==0.17.0 +castellan==0.16.0 certifi==2018.1.18 cffi==1.11.5 chardet==3.0.4 @@ -11,17 +11,17 @@ cliff==2.11.0 cmd2==0.8.1 colorama==0.3.9 contextlib2==0.5.5 -coverage==4.5.1 +coverage==4.0 cryptography==2.1.4 debtcollector==1.19.0 decorator==4.2.1 deprecation==2.0 -Django==1.11.11 +Django==1.11 django-appconf==1.0.2 django-babel==0.6.2 -django-compressor==2.2 -django-formtools==2.1 -django-nose==1.4.5 +django-compressor==2.0 +django-formtools==1.0 +django-nose==1.4.4 django-pyscss==2.0.2 docutils==0.14 dogpile.cache==0.6.5 @@ -32,10 +32,10 @@ fixtures==3.0.0 flake8==2.5.5 futurist==1.6.0 hacking==0.12.0 -horizon==13.0.0 +horizon==14.0.0.0b1 idna==2.6 imagesize==1.0.0 -iso8601==0.1.12 +iso8601==0.1.11 Jinja2==2.10 jmespath==0.9.3 jsonpatch==1.21 @@ -47,17 +47,17 @@ MarkupSafe==1.0 mccabe==0.2.1 mock==2.0.0 monotonic==1.4 -mox3==0.25.0 +mox3==0.20.0 msgpack==0.5.6 munch==2.2.0 murano-pkg-check==0.3.0 netaddr==0.7.19 netifaces==0.10.6 -nodeenv==1.2.0 +nodeenv==0.9.4 nose==1.3.7 -nosehtmloutput==0.0.5 -openstack.nose-plugin==0.11 -openstackdocstheme==1.20.0 +nosehtmloutput==0.0.3 +openstack.nose-plugin==0.7 +openstackdocstheme==1.18.1 openstacksdk==0.12.0 os-client-config==1.29.0 os-service-types==1.2.0 @@ -66,13 +66,13 @@ oslo.concurrency==3.26.0 oslo.config==5.2.0 oslo.context==2.20.0 oslo.i18n==3.20.0 -oslo.log==3.37.0 +oslo.log==3.36.0 oslo.policy==1.34.0 oslo.serialization==2.25.0 oslo.utils==3.36.0 osprofiler==2.0.0 packaging==17.1 -pbr==3.1.1 +pbr==2.0.0 pep8==1.5.7 Pint==0.8.1 ply==3.11 @@ -92,28 +92,28 @@ python-dateutil==2.7.0 python-glanceclient==2.9.1 python-keystoneclient==3.15.0 python-mimeparse==1.6.0 -python-muranoclient==1.0.1 +python-muranoclient==0.8.2 python-neutronclient==6.7.0 python-novaclient==10.1.0 python-swiftclient==3.5.0 -pytz==2018.3 +pytz==2013.6 PyYAML==3.12 rcssmin==1.0.6 -reno==2.7.0 +reno==2.5.0 requests==2.18.4 requestsexceptions==1.4.0 rfc3986==1.1.0 rjsmin==1.0.12 -selenium==3.11.0 -semantic-version==2.6.0 +selenium==2.50.1 +semantic-version==2.3.1 simplejson==3.13.2 -six==1.11.0 +six==1.10.0 snowballstemmer==1.2.1 -Sphinx==1.6.5 +Sphinx==1.6.2 sphinxcontrib-websupport==1.0.1 stevedore==1.28.0 termcolor==1.1.0 -testtools==2.3.0 +testtools==2.2.0 traceback2==1.4.0 unittest2==1.1.0 urllib3==1.22 diff --git a/muranodashboard/catalog/views.py b/muranodashboard/catalog/views.py index d9d45b74e..cd7b02edd 100644 --- a/muranodashboard/catalog/views.py +++ b/muranodashboard/catalog/views.py @@ -25,7 +25,7 @@ from django.conf import settings from django.contrib import auth from django.contrib.auth import decorators as auth_dec from django.contrib.staticfiles.templatetags.staticfiles import static -from django.core.urlresolvers import reverse +from django.urls import reverse # django.contrib.formtools migration to django 1.8 # https://docs.djangoproject.com/en/1.8/ref/contrib/formtools/ try: @@ -407,7 +407,7 @@ class Wizard(generic_views.PageTitleMixin, views.ModalFormMixin, LazyWizard): messages.success(self.request, message) if do_redirect: - return http.HttpResponseRedirect(env_url) + return http.HttpResponseRedirect(bytes(env_url)) else: srv_id = getattr(srv, '?')['id'] return self.create_hacked_response( diff --git a/muranodashboard/categories/tables.py b/muranodashboard/categories/tables.py index 96c08113c..39bb980b2 100644 --- a/muranodashboard/categories/tables.py +++ b/muranodashboard/categories/tables.py @@ -13,7 +13,7 @@ # under the License. from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy from horizon import exceptions diff --git a/muranodashboard/categories/views.py b/muranodashboard/categories/views.py index 6b0934e2e..b77b7a157 100644 --- a/muranodashboard/categories/views.py +++ b/muranodashboard/categories/views.py @@ -14,7 +14,7 @@ import itertools -from django.core.urlresolvers import reverse_lazy +from django.urls import reverse_lazy from django.utils.translation import ugettext_lazy as _ from horizon.forms import views from horizon import tables as horizon_tables diff --git a/muranodashboard/dynamic_ui/fields.py b/muranodashboard/dynamic_ui/fields.py index f9c316d79..27c71d399 100644 --- a/muranodashboard/dynamic_ui/fields.py +++ b/muranodashboard/dynamic_ui/fields.py @@ -17,11 +17,11 @@ import copy import json import re -from django.core.urlresolvers import reverse from django.core import validators as django_validator from django import forms from django.forms import widgets from django.template import defaultfilters +from django.urls import reverse from django.utils.encoding import force_text from django.utils import html from django.utils.translation import ugettext_lazy as _ diff --git a/muranodashboard/environments/tables.py b/muranodashboard/environments/tables.py index b2e086dfc..9e2b3e7f1 100644 --- a/muranodashboard/environments/tables.py +++ b/muranodashboard/environments/tables.py @@ -14,11 +14,10 @@ import json -from django.core.urlresolvers import reverse from django import http as django_http -from django import shortcuts from django import template from django.template import defaultfilters +from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy @@ -378,9 +377,9 @@ class DeployThisEnvironment(tables.Action): exceptions.handle( request, msg, redirect=reverse('horizon:app-catalog:environments:index')) - return shortcuts.redirect( - reverse('horizon:app-catalog:environments:services', - args=(environment_id,))) + redirect_to = reverse('horizon:app-catalog:environments:services', + args=(environment_id,)) + return django_http.HttpResponseRedirect(bytes(redirect_to)) class ShowEnvironmentServices(tables.LinkAction): diff --git a/muranodashboard/environments/tabs.py b/muranodashboard/environments/tabs.py index 542c6d7b2..d11cd2682 100644 --- a/muranodashboard/environments/tabs.py +++ b/muranodashboard/environments/tabs.py @@ -16,7 +16,7 @@ import collections import json from django.conf import settings -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from heat_dashboard.api import heat as heat_api diff --git a/muranodashboard/environments/topology.py b/muranodashboard/environments/topology.py index 80a74cdfd..63955838b 100644 --- a/muranodashboard/environments/topology.py +++ b/muranodashboard/environments/topology.py @@ -15,8 +15,8 @@ import json from django.contrib.staticfiles.templatetags.staticfiles import static -from django.core.urlresolvers import reverse from django.template import loader +from django.urls import reverse import six diff --git a/muranodashboard/environments/views.py b/muranodashboard/environments/views.py index 88e0bce71..530f0acde 100644 --- a/muranodashboard/environments/views.py +++ b/muranodashboard/environments/views.py @@ -15,9 +15,9 @@ import base64 import json -from django.core.urlresolvers import reverse -from django.core.urlresolvers import reverse_lazy from django import http +from django.urls import reverse +from django.urls import reverse_lazy from django.utils.translation import ugettext_lazy as _ from django.views import generic from horizon import conf diff --git a/muranodashboard/images/forms.py b/muranodashboard/images/forms.py index af8eca536..c7adf26f3 100644 --- a/muranodashboard/images/forms.py +++ b/muranodashboard/images/forms.py @@ -15,8 +15,8 @@ import json from django.conf import settings -from django.core.urlresolvers import reverse from django import forms +from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon import forms as horizon_forms diff --git a/muranodashboard/images/tables.py b/muranodashboard/images/tables.py index 9852bbbd0..51e0a46ae 100644 --- a/muranodashboard/images/tables.py +++ b/muranodashboard/images/tables.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy from horizon import exceptions diff --git a/muranodashboard/images/views.py b/muranodashboard/images/views.py index 6c11b9efe..c38686c2c 100644 --- a/muranodashboard/images/views.py +++ b/muranodashboard/images/views.py @@ -14,8 +14,8 @@ import itertools -from django.core.urlresolvers import reverse -from django.core.urlresolvers import reverse_lazy +from django.urls import reverse +from django.urls import reverse_lazy from django.utils.translation import ugettext_lazy as _ from horizon import exceptions diff --git a/muranodashboard/packages/forms.py b/muranodashboard/packages/forms.py index 73be7fe1a..6d4216cc6 100644 --- a/muranodashboard/packages/forms.py +++ b/muranodashboard/packages/forms.py @@ -15,9 +15,9 @@ import json import sys -from django.core.urlresolvers import reverse from django.core import validators from django import forms +from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon import forms as horizon_forms diff --git a/muranodashboard/packages/tables.py b/muranodashboard/packages/tables.py index 72103c170..b360d676c 100644 --- a/muranodashboard/packages/tables.py +++ b/muranodashboard/packages/tables.py @@ -12,8 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. -from django.core.urlresolvers import reverse from django.template import defaultfilters +from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy from horizon import exceptions diff --git a/muranodashboard/packages/views.py b/muranodashboard/packages/views.py index 74b059625..04dca2270 100644 --- a/muranodashboard/packages/views.py +++ b/muranodashboard/packages/views.py @@ -16,9 +16,9 @@ import json import sys from django.core.files import storage -from django.core.urlresolvers import reverse -from django.core.urlresolvers import reverse_lazy from django import http +from django.urls import reverse +from django.urls import reverse_lazy from django.utils.translation import ugettext_lazy as _ # django.contrib.formtools migration to django 1.8 # https://docs.djangoproject.com/en/1.8/ref/contrib/formtools/ @@ -309,7 +309,7 @@ class ImportBundleWizard(horizon_views.PageTitleMixin, views.ModalFormMixin, msg = _('Bundle successfully imported.') LOG.info(msg) messages.success(self.request, msg) - return http.HttpResponseRedirect(redirect) + return http.HttpResponseRedirect(bytes(redirect)) class ImportPackageWizard(horizon_views.PageTitleMixin, views.ModalFormMixin, @@ -408,7 +408,7 @@ class ImportPackageWizard(horizon_views.PageTitleMixin, views.ModalFormMixin, msg = _('Package parameters successfully updated.') LOG.info(msg) messages.success(self.request, msg) - return http.HttpResponseRedirect(redirect) + return http.HttpResponseRedirect(bytes(redirect)) def _handle_exception(self, original_e): exc_info = sys.exc_info() diff --git a/requirements.txt b/requirements.txt index e03cbc7a6..fc18c9681 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,8 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0 beautifulsoup4>=4.6.0 # MIT -Django<2.0,>=1.11 # BSD +Django<2;python_version<'3.0' # BSD +Django<2.1;python_version>='3.0' # BSD django-formtools>=1.0 # BSD iso8601>=0.1.11 # MIT six>=1.10.0 # MIT diff --git a/tox.ini b/tox.ini index b05e563ee..39ef86831 100644 --- a/tox.ini +++ b/tox.ini @@ -70,3 +70,9 @@ deps = -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt http://tarballs.openstack.org/heat-dashboard/heat-dashboard-master.tar.gz + +[testenv:py35dj20] +basepython = python3.5 +commands = + pip install django>=2.0,<2.1 + {[testenv]commands}