diff --git a/swift/common/bufferedhttp.py b/swift/common/bufferedhttp.py index 2db36b155f..1294609133 100644 --- a/swift/common/bufferedhttp.py +++ b/swift/common/bufferedhttp.py @@ -38,7 +38,10 @@ from eventlet.green.httplib import CONTINUE, HTTPConnection, HTTPMessage, \ from six.moves.urllib.parse import quote import six -httplib = eventlet.import_patched('httplib') +if six.PY2: + httplib = eventlet.import_patched('httplib') +else: + httplib = eventlet.import_patched('http.client') httplib._MAXHEADERS = constraints.MAX_HEADER_COUNT diff --git a/swift/common/middleware/copy.py b/swift/common/middleware/copy.py index 1bb2234a05..9ef44a2243 100644 --- a/swift/common/middleware/copy.py +++ b/swift/common/middleware/copy.py @@ -132,7 +132,7 @@ backwards compatibility. At first chance, set ``object_post_as_copy`` to """ import os -from ConfigParser import ConfigParser, NoSectionError, NoOptionError +from six.moves.configparser import ConfigParser, NoSectionError, NoOptionError from six.moves.urllib.parse import quote, unquote from swift.common import utils diff --git a/test/probe/test_wsgi_servers.py b/test/probe/test_wsgi_servers.py index 437912dcf8..46175cf458 100644 --- a/test/probe/test_wsgi_servers.py +++ b/test/probe/test_wsgi_servers.py @@ -15,9 +15,11 @@ # limitations under the License. import unittest -import httplib + import random +from six.moves import http_client as httplib + from swift.common.storage_policy import POLICIES from swift.common.ring import Ring from swift.common.manager import Manager