From 9133f5ad6353a860aa632dbc090e26109b922701 Mon Sep 17 00:00:00 2001 From: Fengqian Gao Date: Wed, 12 Feb 2014 13:44:22 +0800 Subject: [PATCH] Use six.moves.urllib.parse instead of urlparse To keep Python 3.x compatibility, use six.moves.urllib.parse to replace urlparse. Partial-Bug: #1279611 Change-Id: Ie49589651ed80d8fc3196fb0750cbb04661c19cd --- openstack_dashboard/api/glance.py | 2 +- openstack_dashboard/api/keystone.py | 2 +- openstack_dashboard/dashboards/project/stacks/mappings.py | 2 +- requirements.txt | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/openstack_dashboard/api/glance.py b/openstack_dashboard/api/glance.py index 844fc0bb03..efb4652c74 100644 --- a/openstack_dashboard/api/glance.py +++ b/openstack_dashboard/api/glance.py @@ -23,9 +23,9 @@ from __future__ import absolute_import import itertools import logging import thread -import urlparse from django.conf import settings +import six.moves.urllib.parse as urlparse import glanceclient as glance_client diff --git a/openstack_dashboard/api/keystone.py b/openstack_dashboard/api/keystone.py index 50c197a8f1..d38d2632f3 100644 --- a/openstack_dashboard/api/keystone.py +++ b/openstack_dashboard/api/keystone.py @@ -20,10 +20,10 @@ # under the License. import logging -import urlparse from django.conf import settings from django.utils.translation import ugettext_lazy as _ +import six.moves.urllib.parse as urlparse from keystoneclient import exceptions as keystone_exceptions diff --git a/openstack_dashboard/dashboards/project/stacks/mappings.py b/openstack_dashboard/dashboards/project/stacks/mappings.py index 21f4505802..a570b0052f 100644 --- a/openstack_dashboard/dashboards/project/stacks/mappings.py +++ b/openstack_dashboard/dashboards/project/stacks/mappings.py @@ -15,10 +15,10 @@ import json import logging import re -import urlparse from django.core.urlresolvers import reverse from django.template.defaultfilters import register # noqa +import six.moves.urllib.parse as urlparse from openstack_dashboard.api import swift diff --git a/requirements.txt b/requirements.txt index 130226626f..bcdc5b82b1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,6 +18,7 @@ python-swiftclient>=1.6 python-ceilometerclient>=1.0.6 python-troveclient>=1.0.3 pytz>=2010h +six>=1.4.1 # Horizon Utility Requirements # for SECURE_KEY generation lockfile>=0.8