From 43e278c8be05a25edd17729ee2ab3de2be8044fe Mon Sep 17 00:00:00 2001 From: Clint Byrum Date: Mon, 14 Oct 2013 11:16:42 -0700 Subject: [PATCH] Fix python3 incompatible use of urlparse Use six to make it work. While we're not yet able to gate keystoneclient on py33, we still need keystoneclient to work when keystoneclient is included in other libraries' test suites. This was discovered while working on python3 for python-tuskarclient. Note that together with I65c28896d1551fd537dd7774e87bc479a477a7ab keystoneclient can be used safely in python-tuskarclient's py33 tests. Closes-bug: #1239802 Change-Id: Ie6d31dc5fae7e63bb31a5192fa6765fe35dd026a --- keystoneclient/generic/client.py | 2 +- keystoneclient/httpclient.py | 2 +- keystoneclient/tests/v2_0/fakes.py | 2 +- keystoneclient/tests/v3/utils.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keystoneclient/generic/client.py b/keystoneclient/generic/client.py index a1f807246..c0f2b5fea 100644 --- a/keystoneclient/generic/client.py +++ b/keystoneclient/generic/client.py @@ -16,7 +16,7 @@ # under the License. import logging -import urlparse +from six.moves.urllib import parse as urlparse from keystoneclient import exceptions from keystoneclient import httpclient diff --git a/keystoneclient/httpclient.py b/keystoneclient/httpclient.py index 7146d8c07..d947988d3 100644 --- a/keystoneclient/httpclient.py +++ b/keystoneclient/httpclient.py @@ -23,7 +23,7 @@ OpenStack Client interface. Handles the REST calls and responses. import copy import logging -import urlparse +from six.moves.urllib import parse as urlparse import requests import six diff --git a/keystoneclient/tests/v2_0/fakes.py b/keystoneclient/tests/v2_0/fakes.py index 09e7f20c1..55442a493 100644 --- a/keystoneclient/tests/v2_0/fakes.py +++ b/keystoneclient/tests/v2_0/fakes.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import urlparse +from six.moves.urllib import parse as urlparse from keystoneclient.tests import fakes from keystoneclient.tests.v2_0 import utils diff --git a/keystoneclient/tests/v3/utils.py b/keystoneclient/tests/v3/utils.py index 00a2c2b00..182e947c3 100644 --- a/keystoneclient/tests/v3/utils.py +++ b/keystoneclient/tests/v3/utils.py @@ -12,10 +12,10 @@ # License for the specific language governing permissions and limitations # under the License. -import urlparse import uuid import httpretty +from six.moves.urllib import parse as urlparse from keystoneclient.openstack.common import jsonutils from keystoneclient.tests import utils