Remove six.moves
Remove six.moves Replace the following items with Python 3 style code. - six.moves.urllib - six.moves.http_client - six.moves.configparser - six.moves.cStringIO Change-Id: I004b6b9a81079c67451395bfe31ec75d58802c16
This commit is contained in:
parent
c1be8a41d9
commit
91ba6d1d7c
@ -25,7 +25,7 @@ import traceback
|
||||
import eventlet
|
||||
from oslo_log import log as logging
|
||||
import proboscis
|
||||
from six.moves import urllib
|
||||
import urllib
|
||||
import wsgi_intercept
|
||||
from wsgi_intercept.httplib2_intercept import install as wsgi_install
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
import fnmatch
|
||||
import json
|
||||
from collections import OrderedDict
|
||||
import io
|
||||
import os
|
||||
import re
|
||||
import six
|
||||
@ -22,7 +23,6 @@ import sys
|
||||
|
||||
from pylint import lint
|
||||
from pylint.reporters import text
|
||||
from six.moves import cStringIO as csio
|
||||
|
||||
DEFAULT_CONFIG_FILE = "tools/trove-pylint.config"
|
||||
DEFAULT_IGNORED_FILES = ['trove/tests']
|
||||
@ -210,7 +210,7 @@ class LintRunner(object):
|
||||
def dolint(self, filename):
|
||||
exceptions = set()
|
||||
|
||||
buffer = csio()
|
||||
buffer = io.StringIO()
|
||||
reporter = ParseableTextReporter(output=buffer)
|
||||
options = list(self.config.get('options'))
|
||||
options.append(filename)
|
||||
|
@ -23,9 +23,9 @@ import math
|
||||
import re
|
||||
import time
|
||||
|
||||
from http import client as http_client
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import importutils
|
||||
from six.moves import http_client
|
||||
import webob.dec
|
||||
import webob.exc
|
||||
|
||||
|
@ -16,12 +16,12 @@
|
||||
import abc
|
||||
import ast
|
||||
import csv
|
||||
import configparser
|
||||
import io
|
||||
import re
|
||||
import sys
|
||||
|
||||
import six
|
||||
from six.moves import configparser
|
||||
import xmltodict
|
||||
import yaml
|
||||
|
||||
|
@ -18,10 +18,10 @@ import re
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import encodeutils
|
||||
import six
|
||||
from six.moves import urllib
|
||||
import sqlalchemy
|
||||
from sqlalchemy import exc
|
||||
from sqlalchemy.sql.expression import text
|
||||
import urllib
|
||||
|
||||
from trove.common import cfg
|
||||
from trove.common import exception
|
||||
|
@ -13,6 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from http import client as http_client
|
||||
from hashlib import md5
|
||||
from unittest.mock import MagicMock, patch
|
||||
import json
|
||||
@ -24,7 +25,6 @@ import uuid
|
||||
|
||||
from oslo_log import log as logging
|
||||
import six
|
||||
from six.moves import http_client
|
||||
from swiftclient import client as swift
|
||||
|
||||
|
||||
|
@ -13,12 +13,11 @@
|
||||
# under the License.
|
||||
|
||||
|
||||
import configparser
|
||||
import os
|
||||
import pkg_resources
|
||||
from unittest import mock
|
||||
|
||||
from six.moves import configparser as config_parser
|
||||
|
||||
import trove
|
||||
from trove.common import extensions
|
||||
from trove.extensions.routes.mgmt import Mgmt
|
||||
@ -76,7 +75,7 @@ class TestExtensionLoading(trove_testtools.TestCase):
|
||||
setup_path = "%s/setup.cfg" % trove_base
|
||||
# check if we are running as unit test without module installed
|
||||
if os.path.isfile(setup_path):
|
||||
parser = config_parser.ConfigParser()
|
||||
parser = configparser.ConfigParser()
|
||||
parser.read(setup_path)
|
||||
entry_points = parser.get(
|
||||
'entry_points', extensions.ExtensionManager.EXT_NAMESPACE)
|
||||
|
@ -18,10 +18,10 @@ Tests dealing with HTTP rate-limiting.
|
||||
"""
|
||||
|
||||
|
||||
from http import client as http_client
|
||||
from unittest.mock import Mock, MagicMock, patch
|
||||
from oslo_serialization import jsonutils
|
||||
import six
|
||||
from six.moves import http_client
|
||||
import webob
|
||||
|
||||
from trove.common import limits
|
||||
|
Loading…
Reference in New Issue
Block a user