diff --git a/examples/djangotest/testing/models.py b/examples/djangotest/testing/models.py index d49766e4..c37ea6f7 100755 --- a/examples/djangotest/testing/models.py +++ b/examples/djangotest/testing/models.py @@ -1,3 +1 @@ -from django.db import models - # Create your models here. \ No newline at end of file diff --git a/examples/djangotest/urls.py b/examples/djangotest/urls.py index ae319bf5..42627022 100755 --- a/examples/djangotest/urls.py +++ b/examples/djangotest/urls.py @@ -1,6 +1,8 @@ -from django.conf.urls.defaults import * +from django.conf.urls.defaults import patterns, url, handler404, handler500 urlpatterns = patterns('', url(r'^$', 'djangotest.testing.views.home'), ) +def __exported_functionality__(): + return [handler404, handler500] \ No newline at end of file diff --git a/gunicorn/http/__init__.py b/gunicorn/http/__init__.py index b443b09e..7f642738 100644 --- a/gunicorn/http/__init__.py +++ b/gunicorn/http/__init__.py @@ -5,4 +5,7 @@ from gunicorn.http.parser import HttpParser from gunicorn.http.request import HttpRequest, RequestError -from gunicorn.http.response import HttpResponse \ No newline at end of file +from gunicorn.http.response import HttpResponse + +def __exported_functionality__(): + return [HttpParser, HttpRequest, RequestError, HttpResponse] \ No newline at end of file diff --git a/gunicorn/http/request.py b/gunicorn/http/request.py index 31678559..4a839f66 100644 --- a/gunicorn/http/request.py +++ b/gunicorn/http/request.py @@ -4,14 +4,10 @@ # See the NOTICE for more information. -import errno -from ctypes import * import re import StringIO -import socket import sys from urllib import unquote -import array import logging from gunicorn import __version__ diff --git a/gunicorn/http/response.py b/gunicorn/http/response.py index 6e256900..f2c7fbe1 100644 --- a/gunicorn/http/response.py +++ b/gunicorn/http/response.py @@ -3,13 +3,7 @@ # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. -import errno -import socket -import select -import time - -import os -from gunicorn.util import http_date, write, read_partial, close +from gunicorn.util import http_date, write, close class HttpResponse(object): diff --git a/gunicorn/main.py b/gunicorn/main.py index 9c22806e..c35f4825 100644 --- a/gunicorn/main.py +++ b/gunicorn/main.py @@ -6,8 +6,6 @@ import logging import optparse as op -import os -import sys from gunicorn.arbiter import Arbiter diff --git a/gunicorn/util.py b/gunicorn/util.py index e19dbf2e..47edf765 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -5,7 +5,6 @@ import errno import fcntl -import os import select import socket import time diff --git a/gunicorn/worker.py b/gunicorn/worker.py index 7d90d319..f91de8f5 100644 --- a/gunicorn/worker.py +++ b/gunicorn/worker.py @@ -12,7 +12,6 @@ import signal import socket import sys import tempfile -import time from gunicorn import http from gunicorn import util diff --git a/tests/t.py b/tests/t.py index 9f83584e..4529da44 100644 --- a/tests/t.py +++ b/tests/t.py @@ -4,11 +4,8 @@ # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. -import inspect import os -import re import tempfile -import unittest dirname = os.path.dirname(__file__)