From: Ben Darnell Date: Fri, 30 Jul 2010 00:03:40 +0000 (-0700) Subject: Make all internal imports of tornado modules absolute X-Git-Tag: v1.1.0~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28adce306aa583e92a5245bee7f449345e4e5cc9;p=thirdparty%2Ftornado.git Make all internal imports of tornado modules absolute --- diff --git a/tornado/auth.py b/tornado/auth.py index 457511909..a410173ef 100644 --- a/tornado/auth.py +++ b/tornado/auth.py @@ -49,14 +49,15 @@ import binascii import cgi import hashlib import hmac -import httpclient -import escape import logging import time import urllib import urlparse import uuid +from tornado import httpclient +from tornado import escape + class OpenIdMixin(object): """Abstract implementation of OpenID and Attribute Exchange. diff --git a/tornado/autoreload.py b/tornado/autoreload.py index 876c76d73..69738bdc5 100644 --- a/tornado/autoreload.py +++ b/tornado/autoreload.py @@ -21,12 +21,13 @@ and Google AppEngine. """ import functools -import ioloop import logging import os import sys import types +from tornado import ioloop + try: import signal except ImportError: diff --git a/tornado/httpclient.py b/tornado/httpclient.py index 6abcc747e..522f8ce37 100644 --- a/tornado/httpclient.py +++ b/tornado/httpclient.py @@ -18,22 +18,23 @@ from __future__ import with_statement +import cStringIO import calendar import collections -import cStringIO import email.utils import errno -import escape import httplib -import httputil -import ioloop import logging import pycurl -import stack_context import sys import time import weakref +from tornado import escape +from tornado import httputil +from tornado import ioloop +from tornado import stack_context + class HTTPClient(object): """A blocking HTTP client backed with pycurl. diff --git a/tornado/httpserver.py b/tornado/httpserver.py index 267960a45..8c4cee9dd 100644 --- a/tornado/httpserver.py +++ b/tornado/httpserver.py @@ -18,15 +18,16 @@ import cgi import errno -import httputil -import ioloop -import iostream import logging import os import socket import time import urlparse +from tornado import httputil +from tornado import ioloop +from tornado import iostream + try: import fcntl except ImportError: diff --git a/tornado/ioloop.py b/tornado/ioloop.py index 97220314c..63b4e3e65 100644 --- a/tornado/ioloop.py +++ b/tornado/ioloop.py @@ -21,10 +21,11 @@ import errno import os import logging import select -import stack_context import time import traceback +from tornado import stack_context + try: import signal except ImportError: diff --git a/tornado/iostream.py b/tornado/iostream.py index c22ef2cf8..6ea104279 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -17,10 +17,11 @@ """A utility class to write to and read from a non-blocking socket.""" import errno -import ioloop import logging import socket +from tornado import ioloop + class IOStream(object): """A utility class to write to and read from a non-blocking socket. diff --git a/tornado/s3server.py b/tornado/s3server.py index 2e8a97de2..b739c6c3b 100644 --- a/tornado/s3server.py +++ b/tornado/s3server.py @@ -33,15 +33,15 @@ S3 client with this module: import bisect import datetime -import escape import hashlib -import httpserver -import ioloop import os import os.path import urllib -import web +from tornado import escape +from tornado import httpserver +from tornado import ioloop +from tornado import web def start(port, root_directory="/tmp/s3", bucket_depth=0): """Starts the mock S3 server on the given port at the given path.""" diff --git a/tornado/template.py b/tornado/template.py index b807cc68a..aa52c23d6 100644 --- a/tornado/template.py +++ b/tornado/template.py @@ -83,11 +83,12 @@ from __future__ import with_statement import cStringIO import datetime -import escape import logging import os.path import re +from tornado import escape + class Template(object): """A compiled template. diff --git a/tornado/web.py b/tornado/web.py index 2dd2686fa..d8309e25d 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -45,35 +45,36 @@ getting started guide. from __future__ import with_statement +import Cookie import base64 import binascii +import cStringIO import calendar import contextlib -import Cookie -import cStringIO import datetime import email.utils -import escape import functools import gzip import hashlib import hmac import httplib -import locale import logging import mimetypes import os.path import re -import stack_context import stat import sys -import template import time import types import urllib import urlparse import uuid +from tornado import escape +from tornado import locale +from tornado import stack_context +from tornado import template + class RequestHandler(object): """Subclass this class and define get() or post() to make a handler. diff --git a/tornado/wsgi.py b/tornado/wsgi.py index de3566967..f2b82c57d 100644 --- a/tornado/wsgi.py +++ b/tornado/wsgi.py @@ -50,16 +50,17 @@ frameworks on the Tornado HTTP server and I/O loop. See WSGIContainer for details and documentation. """ -import cgi import cStringIO -import escape +import cgi import httplib -import httputil import logging import sys import time import urllib -import web + +from tornado import escape +from tornado import httputil +from tornado import web class WSGIApplication(web.Application): """A WSGI-equivalent of web.Application.