From b419a23ce181e890a9c078727e86ba2611a9c533 Mon Sep 17 00:00:00 2001 From: manchandavishal Date: Tue, 16 Feb 2021 05:45:14 +0000 Subject: [PATCH] Use TOX_CONSTRAINTS_FILE UPPER_CONSTRAINTS_FILE is old name and deprecated. This allows to use upper-constraints file as more readable way instead of UPPER_CONSTRAINTS_FILE=. For more info. please refer [1]. It also import ugettext_lazy in zaqar_ui/api/rest/zaqar.py file to fix pep8 issue. [1] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file Change-Id: I4e0c00b6d01470f59a6fa5799eaa10d3e5e94f61 --- tox.ini | 4 ++-- zaqar_ui/api/rest/zaqar.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 0e416f6..8e2d4b1 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ setenv = VIRTUAL_ENV={envdir} NOSE_OPENSTACK_SHOW_ELAPSED=1 DJANGO_SETTINGS_MODULE=zaqar_ui.test.settings deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} + -c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = @@ -79,7 +79,7 @@ commands = [testenv:docs] deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} + -c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} # zaqar-ui doc generated the module reference, # so requirements.txt should be here to apply upper-constraints -r{toxinidir}/requirements.txt diff --git a/zaqar_ui/api/rest/zaqar.py b/zaqar_ui/api/rest/zaqar.py index 55b3983..4788d9c 100644 --- a/zaqar_ui/api/rest/zaqar.py +++ b/zaqar_ui/api/rest/zaqar.py @@ -15,6 +15,7 @@ import json import yaml +from django.utils.translation import ugettext_lazy as _ from django.views import generic from openstack_dashboard.api.rest import urls from openstack_dashboard.api.rest import utils as rest_utils