summaryrefslogtreecommitdiff
path: root/wsgitools/middlewares.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2014-01-06 18:38:58 +0100
committerHelmut Grohne <helmut@subdivi.de>2014-01-06 18:38:58 +0100
commit42f5ccf09799d3e475eb996b023a0daabae49cdb (patch)
tree91f7407adf98014a5f5652a94ba4e1f16af3e8d2 /wsgitools/middlewares.py
parented6d6c8f06404489ba2301955c8e6f82f8f4f454 (diff)
downloadwsgitools-42f5ccf09799d3e475eb996b023a0daabae49cdb.tar.gz
switch to new-style classes entirely
There is no reason to use old-style classes beyond laziness.
Diffstat (limited to 'wsgitools/middlewares.py')
-rw-r--r--wsgitools/middlewares.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/wsgitools/middlewares.py b/wsgitools/middlewares.py
index 804d474..0f5e416 100644
--- a/wsgitools/middlewares.py
+++ b/wsgitools/middlewares.py
@@ -29,7 +29,7 @@ from wsgitools.authentication import AuthenticationRequired, \
ProtocolViolation, AuthenticationMiddleware
__all__.append("SubdirMiddleware")
-class SubdirMiddleware:
+class SubdirMiddleware(object):
"""Middleware choosing wsgi applications based on a dict."""
def __init__(self, default, mapping={}):
"""
@@ -62,7 +62,7 @@ class SubdirMiddleware:
return app(environ, start_response)
__all__.append("NoWriteCallableMiddleware")
-class NoWriteCallableMiddleware:
+class NoWriteCallableMiddleware(object):
"""This middleware wraps a wsgi application that needs the return value of
C{start_response} function to a wsgi application that doesn't need one by
writing the data to a C{StringIO} and then making it be the first result
@@ -129,7 +129,7 @@ class NoWriteCallableMiddleware:
(data,), ret)
__all__.append("ContentLengthMiddleware")
-class ContentLengthMiddleware:
+class ContentLengthMiddleware(object):
"""Guesses the content length header if possible.
@note: The application used must not use the C{write} callable returned by
C{start_response}."""
@@ -221,7 +221,7 @@ def cacheable(environ):
return True
__all__.append("CachingMiddleware")
-class CachingMiddleware:
+class CachingMiddleware(object):
"""Caches reponses to requests based on C{SCRIPT_NAME}, C{PATH_INFO} and
C{QUERY_STRING}."""
def __init__(self, app, maxage=60, storable=storable, cacheable=cacheable):
@@ -316,7 +316,7 @@ class CachingMiddleware:
return CloseableIterator(getattr(ret, "close", None), pass_through())
__all__.append("DictAuthChecker")
-class DictAuthChecker:
+class DictAuthChecker(object):
"""Verifies usernames and passwords by looking them up in a dict."""
def __init__(self, users):
"""
@@ -387,7 +387,7 @@ class BasicAuthMiddleware(AuthenticationMiddleware):
self, environ, start_response, exception)
__all__.append("TracebackMiddleware")
-class TracebackMiddleware:
+class TracebackMiddleware(object):
"""In case the application throws an exception this middleware will show an
html-formatted traceback using C{cgitb}."""
def __init__(self, app):