summaryrefslogtreecommitdiff
path: root/django/core/servers
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-07-20 16:16:57 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-07-22 09:29:56 +0200
commitca07fda2efea24cb43423b884fa4648d44e52963 (patch)
tree5c172bf2155b58e380363d3e82ca2ef14afd163f /django/core/servers
parent0d914d08a0d7b5a1521f498a8047971fe6cd61e7 (diff)
[py3] Switched to Python 3-compatible imports.
xrange/range will be dealt with in a separate commit due to the huge number of changes.
Diffstat (limited to 'django/core/servers')
-rw-r--r--django/core/servers/basehttp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/servers/basehttp.py b/django/core/servers/basehttp.py
index f67b105397..2db4e5ef6a 100644
--- a/django/core/servers/basehttp.py
+++ b/django/core/servers/basehttp.py
@@ -16,7 +16,7 @@ try:
except ImportError: # Python 2
from urllib import unquote
from urlparse import urljoin
-from SocketServer import ThreadingMixIn
+from django.utils.six.moves import socketserver
from wsgiref import simple_server
from wsgiref.util import FileWrapper # for backwards compatibility
@@ -200,7 +200,7 @@ class WSGIRequestHandler(simple_server.WSGIRequestHandler, object):
def run(addr, port, wsgi_handler, ipv6=False, threading=False):
server_address = (addr, port)
if threading:
- httpd_cls = type('WSGIServer', (ThreadingMixIn, WSGIServer), {})
+ httpd_cls = type('WSGIServer', (socketserver.ThreadingMixIn, WSGIServer), {})
else:
httpd_cls = WSGIServer
httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)