diff --git a/glance/api/v2/images.py b/glance/api/v2/images.py index 1bc996af61..c82f2bdd81 100644 --- a/glance/api/v2/images.py +++ b/glance/api/v2/images.py @@ -17,6 +17,7 @@ import hashlib import http.client as http import os import re +import urllib.parse as urlparse from castellan.common import exception as castellan_exception from castellan import key_manager @@ -28,7 +29,6 @@ from oslo_serialization import jsonutils as json from oslo_utils import encodeutils from oslo_utils import timeutils as oslo_timeutils import requests -import six.moves.urllib.parse as urlparse import webob.exc from glance.api import common diff --git a/glance/api/v2/metadef_namespaces.py b/glance/api/v2/metadef_namespaces.py index 4feef91c72..f64be08099 100644 --- a/glance/api/v2/metadef_namespaces.py +++ b/glance/api/v2/metadef_namespaces.py @@ -14,12 +14,12 @@ # limitations under the License. import http.client as http +import urllib.parse as urlparse from oslo_config import cfg from oslo_log import log as logging from oslo_serialization import jsonutils from oslo_utils import encodeutils -import six.moves.urllib.parse as urlparse import webob.exc from wsme.rest import json diff --git a/glance/api/v2/tasks.py b/glance/api/v2/tasks.py index 21998adfc6..84a7194ba1 100644 --- a/glance/api/v2/tasks.py +++ b/glance/api/v2/tasks.py @@ -16,6 +16,7 @@ import copy import http.client as http +import urllib.parse as urlparse import debtcollector import glance_store @@ -25,7 +26,6 @@ import oslo_serialization.jsonutils as json from oslo_utils import encodeutils from oslo_utils import uuidutils import six -import six.moves.urllib.parse as urlparse import webob.exc from glance.api import common diff --git a/glance/api/versions.py b/glance/api/versions.py index d1c45163c4..f9278a2a43 100644 --- a/glance/api/versions.py +++ b/glance/api/versions.py @@ -14,11 +14,11 @@ # under the License. import http.client +import urllib from oslo_config import cfg from oslo_log import log as logging from oslo_serialization import jsonutils -from six.moves import urllib import webob.dec from glance.common import wsgi diff --git a/glance/async_/flows/ovf_process.py b/glance/async_/flows/ovf_process.py index 06b5c8b8c9..e6cd722474 100644 --- a/glance/async_/flows/ovf_process.py +++ b/glance/async_/flows/ovf_process.py @@ -17,6 +17,7 @@ import os import re import shutil import tarfile +import urllib try: from defusedxml import cElementTree as ET @@ -26,7 +27,6 @@ except ImportError: from oslo_config import cfg from oslo_log import log as logging from oslo_serialization import jsonutils as json -from six.moves import urllib from taskflow.patterns import linear_flow as lf from taskflow import task diff --git a/glance/async_/taskflow_executor.py b/glance/async_/taskflow_executor.py index 0951d5a7dc..da431e33c3 100644 --- a/glance/async_/taskflow_executor.py +++ b/glance/async_/taskflow_executor.py @@ -13,11 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +import urllib + from oslo_config import cfg from oslo_log import log as logging from oslo_utils import encodeutils from oslo_utils import excutils -from six.moves import urllib from stevedore import driver from taskflow import engines from taskflow.listeners import logging as llistener diff --git a/glance/cmd/replicator.py b/glance/cmd/replicator.py index af4ed5bcf8..489ed7c2b0 100644 --- a/glance/cmd/replicator.py +++ b/glance/cmd/replicator.py @@ -19,6 +19,7 @@ import http.client as http import os import sys +import urllib.parse as urlparse from oslo_config import cfg from oslo_log import log as logging @@ -26,7 +27,6 @@ from oslo_serialization import jsonutils from oslo_utils import encodeutils from oslo_utils import uuidutils import six -import six.moves.urllib.parse as urlparse from webob import exc from glance.common import config diff --git a/glance/common/auth.py b/glance/common/auth.py index c583b5fb26..9d14ad0666 100644 --- a/glance/common/auth.py +++ b/glance/common/auth.py @@ -31,12 +31,13 @@ Keystone (an identity management system). http://service_endpoint/ """ + import http.client as http +import urllib.parse as urlparse import httplib2 from keystoneclient import service_catalog as ks_service_catalog from oslo_serialization import jsonutils -import six.moves.urllib.parse as urlparse from glance.common import exception from glance.i18n import _ diff --git a/glance/common/client.py b/glance/common/client.py index 04a0ca8b09..119be7dd44 100644 --- a/glance/common/client.py +++ b/glance/common/client.py @@ -24,6 +24,7 @@ import functools import http.client import os import re +import urllib.parse as urlparse try: from eventlet.green import socket @@ -44,7 +45,6 @@ from oslo_log import log as logging from oslo_utils import encodeutils from oslo_utils import netutils import six -import six.moves.urllib.parse as urlparse from glance.common import auth from glance.common import exception diff --git a/glance/common/exception.py b/glance/common/exception.py index 4a046572ba..76c6fdb734 100644 --- a/glance/common/exception.py +++ b/glance/common/exception.py @@ -16,7 +16,7 @@ """Glance exception subclasses""" -import six.moves.urllib.parse as urlparse +import urllib.parse as urlparse from glance.i18n import _ diff --git a/glance/common/location_strategy/store_type.py b/glance/common/location_strategy/store_type.py index 2b649c4912..dca4536116 100644 --- a/glance/common/location_strategy/store_type.py +++ b/glance/common/location_strategy/store_type.py @@ -15,8 +15,9 @@ """Storage preference based location strategy module""" +import urllib.parse as urlparse + from oslo_config import cfg -import six.moves.urllib.parse as urlparse from glance.i18n import _ diff --git a/glance/common/scripts/utils.py b/glance/common/scripts/utils.py index d42e9df4e9..4a09d6fd43 100644 --- a/glance/common/scripts/utils.py +++ b/glance/common/scripts/utils.py @@ -21,10 +21,10 @@ __all__ = [ 'get_image_data_iter', ] +import urllib from oslo_log import log as logging from oslo_utils import timeutils -from six.moves import urllib from glance.common import exception from glance.i18n import _, _LE diff --git a/glance/common/store_utils.py b/glance/common/store_utils.py index abde406c1f..552f661f58 100644 --- a/glance/common/store_utils.py +++ b/glance/common/store_utils.py @@ -13,12 +13,12 @@ # under the License. import sys +import urllib.parse as urlparse import glance_store as store_api from oslo_config import cfg from oslo_log import log as logging from oslo_utils import encodeutils -import six.moves.urllib.parse as urlparse import glance.db as db_api from glance.i18n import _LE, _LW diff --git a/glance/common/utils.py b/glance/common/utils.py index 8c1b683b75..eb4ac43e1a 100644 --- a/glance/common/utils.py +++ b/glance/common/utils.py @@ -29,17 +29,17 @@ except ImportError: from eventlet.green import socket import functools -import glance_store import os import re +import urllib +import glance_store from oslo_config import cfg from oslo_log import log as logging from oslo_utils import excutils from oslo_utils import netutils from oslo_utils import strutils import six -from six.moves import urllib from webob import exc from glance.common import exception diff --git a/glance/tests/functional/__init__.py b/glance/tests/functional/__init__.py index 5a2d11aad1..14dab2d6c0 100644 --- a/glance/tests/functional/__init__.py +++ b/glance/tests/functional/__init__.py @@ -37,6 +37,7 @@ from testtools import content as ttc import textwrap import time from unittest import mock +import urllib.parse as urlparse import uuid import fixtures @@ -44,7 +45,6 @@ import glance_store from os_win import utilsfactory as os_win_utilsfactory from oslo_config import cfg from oslo_serialization import jsonutils -import six.moves.urllib.parse as urlparse import testtools import webob diff --git a/glance/tests/functional/v2/test_images.py b/glance/tests/functional/v2/test_images.py index 0740dbf56b..32a2e5818e 100644 --- a/glance/tests/functional/v2/test_images.py +++ b/glance/tests/functional/v2/test_images.py @@ -19,6 +19,7 @@ import os import subprocess import tempfile import time +import urllib import uuid import fixtures @@ -27,7 +28,6 @@ from oslo_serialization import jsonutils from oslo_utils.secretutils import md5 from oslo_utils import units import requests -from six.moves import urllib from glance.quota import keystone as ks_quota from glance.tests import functional diff --git a/glance/tests/unit/async_/flows/test_import.py b/glance/tests/unit/async_/flows/test_import.py index 8d4fc8c6ce..79f6b6de57 100644 --- a/glance/tests/unit/async_/flows/test_import.py +++ b/glance/tests/unit/async_/flows/test_import.py @@ -17,11 +17,11 @@ import io import json import os from unittest import mock +import urllib import glance_store from oslo_concurrency import processutils as putils from oslo_config import cfg -from six.moves import urllib from taskflow import task from taskflow.types import failure diff --git a/glance/tests/unit/common/scripts/image_import/test_main.py b/glance/tests/unit/common/scripts/image_import/test_main.py index 77f7e7f72d..5c9342c8a9 100644 --- a/glance/tests/unit/common/scripts/image_import/test_main.py +++ b/glance/tests/unit/common/scripts/image_import/test_main.py @@ -14,8 +14,7 @@ # under the License. from unittest import mock - -from six.moves import urllib +import urllib import glance.common.exception as exception from glance.common.scripts.image_import import main as image_import_script diff --git a/glance/tests/unit/common/scripts/test_scripts_utils.py b/glance/tests/unit/common/scripts/test_scripts_utils.py index 7bada7e51d..a7d8155801 100644 --- a/glance/tests/unit/common/scripts/test_scripts_utils.py +++ b/glance/tests/unit/common/scripts/test_scripts_utils.py @@ -14,8 +14,7 @@ # under the License. from unittest import mock - -from six.moves import urllib +import urllib from glance.common import exception from glance.common.scripts import utils as script_utils diff --git a/glance/tests/unit/utils.py b/glance/tests/unit/utils.py index ead1f08bb1..8362a42462 100644 --- a/glance/tests/unit/utils.py +++ b/glance/tests/unit/utils.py @@ -17,9 +17,9 @@ from cryptography import exceptions as crypto_exception import glance_store as store from unittest import mock +import urllib from oslo_config import cfg -from six.moves import urllib from glance.common import exception from glance.common import store_utils