From 88510d037ad5384dab90a045ecf6e108fc0e5e1d Mon Sep 17 00:00:00 2001 From: Fengqian Gao Date: Tue, 11 Feb 2014 16:32:32 +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. Change-Id: I81333ca4d6ed88b2d491657170f526cbe9671d1f --- ceilometer/alarm/notifier/rest.py | 2 +- ceilometer/objectstore/swift.py | 2 +- ceilometer/publisher/file.py | 2 +- ceilometer/publisher/rpc.py | 2 +- ceilometer/storage/__init__.py | 2 +- ceilometer/storage/impl_hbase.py | 2 +- ceilometer/storage/sqlalchemy/models.py | 2 +- ceilometer/tests/alarm/test_notifier.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ceilometer/alarm/notifier/rest.py b/ceilometer/alarm/notifier/rest.py index c5d366f5d..2d7d7c5d0 100644 --- a/ceilometer/alarm/notifier/rest.py +++ b/ceilometer/alarm/notifier/rest.py @@ -19,7 +19,7 @@ import eventlet import requests -import urlparse +import six.moves.urllib.parse as urlparse from oslo.config import cfg diff --git a/ceilometer/objectstore/swift.py b/ceilometer/objectstore/swift.py index 832111f8e..e85e0662c 100644 --- a/ceilometer/objectstore/swift.py +++ b/ceilometer/objectstore/swift.py @@ -19,7 +19,7 @@ """ from __future__ import absolute_import -import urlparse +import six.moves.urllib.parse as urlparse from keystoneclient import exceptions from oslo.config import cfg diff --git a/ceilometer/publisher/file.py b/ceilometer/publisher/file.py index 54274006b..9bad319e5 100644 --- a/ceilometer/publisher/file.py +++ b/ceilometer/publisher/file.py @@ -18,7 +18,7 @@ import logging import logging.handlers -import urlparse +import six.moves.urllib.parse as urlparse from ceilometer.openstack.common.gettextutils import _ # noqa from ceilometer.openstack.common import log diff --git a/ceilometer/publisher/rpc.py b/ceilometer/publisher/rpc.py index d9fafcebe..21ef84143 100644 --- a/ceilometer/publisher/rpc.py +++ b/ceilometer/publisher/rpc.py @@ -21,7 +21,7 @@ import itertools import operator -import urlparse +import six.moves.urllib.parse as urlparse from oslo.config import cfg diff --git a/ceilometer/storage/__init__.py b/ceilometer/storage/__init__.py index 7483809e6..728cc1780 100644 --- a/ceilometer/storage/__init__.py +++ b/ceilometer/storage/__init__.py @@ -18,7 +18,7 @@ """Storage backend management """ -import urlparse +import six.moves.urllib.parse as urlparse from oslo.config import cfg import six diff --git a/ceilometer/storage/impl_hbase.py b/ceilometer/storage/impl_hbase.py index ba4a64a46..0a8e64d64 100644 --- a/ceilometer/storage/impl_hbase.py +++ b/ceilometer/storage/impl_hbase.py @@ -25,7 +25,7 @@ import itertools import json import os import re -import urlparse +import six.moves.urllib.parse as urlparse import happybase diff --git a/ceilometer/storage/sqlalchemy/models.py b/ceilometer/storage/sqlalchemy/models.py index f276af125..a086c8b6f 100644 --- a/ceilometer/storage/sqlalchemy/models.py +++ b/ceilometer/storage/sqlalchemy/models.py @@ -19,7 +19,7 @@ SQLAlchemy models for Ceilometer data. """ import json -import urlparse +import six.moves.urllib.parse as urlparse from oslo.config import cfg from sqlalchemy import Column, Integer, String, Table, ForeignKey, \ diff --git a/ceilometer/tests/alarm/test_notifier.py b/ceilometer/tests/alarm/test_notifier.py index f7f4653ef..7e16fe49c 100644 --- a/ceilometer/tests/alarm/test_notifier.py +++ b/ceilometer/tests/alarm/test_notifier.py @@ -15,7 +15,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -import urlparse +import six.moves.urllib.parse as urlparse import mock import requests