diff options
Diffstat (limited to 'wsgitools')
-rw-r--r-- | wsgitools/adapters.py | 4 | ||||
-rw-r--r-- | wsgitools/applications.py | 4 | ||||
-rw-r--r-- | wsgitools/authentication.py | 2 | ||||
-rw-r--r-- | wsgitools/digest.py | 6 | ||||
-rw-r--r-- | wsgitools/filters.py | 6 | ||||
-rw-r--r-- | wsgitools/middlewares.py | 12 | ||||
-rw-r--r-- | wsgitools/scgi/__init__.py | 2 | ||||
-rw-r--r-- | wsgitools/scgi/forkpool.py | 6 |
8 files changed, 21 insertions, 21 deletions
diff --git a/wsgitools/adapters.py b/wsgitools/adapters.py index 4c82200..050c00a 100644 --- a/wsgitools/adapters.py +++ b/wsgitools/adapters.py @@ -10,7 +10,7 @@ __all__ = [] from wsgitools.filters import CloseableIterator, CloseableList __all__.append("WSGI2to1Adapter") -class WSGI2to1Adapter: +class WSGI2to1Adapter(object): """Adapts an application with an interface that might somewhen be known as WSGI 2.0 to the WSGI 1.0 interface.""" def __init__(self, app): @@ -28,7 +28,7 @@ class WSGI2to1Adapter: return iterable __all__.append("WSGI1to2Adapter") -class WSGI1to2Adapter: +class WSGI1to2Adapter(object): """Adapts a WSGI 1.0 application to something that might somewhen be the WSGI 2.0 interface.""" def __init__(self, app): diff --git a/wsgitools/applications.py b/wsgitools/applications.py index 9c6dad8..df304db 100644 --- a/wsgitools/applications.py +++ b/wsgitools/applications.py @@ -8,7 +8,7 @@ except NameError: basestring = str __all__.append("StaticContent") -class StaticContent: +class StaticContent(object): """ This wsgi application provides static content on whatever request it receives with method GET or HEAD (content stripped). If not present, a @@ -60,7 +60,7 @@ class StaticContent: return self.content __all__.append("StaticFile") -class StaticFile: +class StaticFile(object): """ This wsgi application provides the content of a static file on whatever request it receives with method GET or HEAD (content stripped). If not diff --git a/wsgitools/authentication.py b/wsgitools/authentication.py index c076d7f..59747e0 100644 --- a/wsgitools/authentication.py +++ b/wsgitools/authentication.py @@ -9,7 +9,7 @@ class AuthenticationRequired(Exception): class ProtocolViolation(AuthenticationRequired): pass -class AuthenticationMiddleware: +class AuthenticationMiddleware(object): """Base class for HTTP authorization schemes. @cvar authorization_method: the implemented Authorization method. It will diff --git a/wsgitools/digest.py b/wsgitools/digest.py index 6395d02..2f49ff7 100644 --- a/wsgitools/digest.py +++ b/wsgitools/digest.py @@ -141,7 +141,7 @@ class StaleNonce(AuthenticationRequired): pass __all__.append("AbstractTokenGenerator") -class AbstractTokenGenerator: +class AbstractTokenGenerator(object): """Interface class for generating authentication tokens for L{AuthDigestMiddleware}. @@ -292,7 +292,7 @@ class UpdatingHtdigestTokenGenerator(HtdigestTokenGenerator): return HtdigestTokenGenerator.__call__(self, user, algo) __all__.append("NonceStoreBase") -class NonceStoreBase: +class NonceStoreBase(object): """Nonce storage interface.""" def __init__(self): pass @@ -508,7 +508,7 @@ class MemoryNonceStore(NonceStoreBase): return True __all__.append("LazyDBAPI2Opener") -class LazyDBAPI2Opener: +class LazyDBAPI2Opener(object): """ Connects to database on first request. Otherwise it behaves like a dbapi2 connection. This may be usefull in combination with L{scgi.forkpool}, diff --git a/wsgitools/filters.py b/wsgitools/filters.py index 471c949..ed976a2 100644 --- a/wsgitools/filters.py +++ b/wsgitools/filters.py @@ -15,7 +15,7 @@ import io from wsgitools.internal import str2bytes __all__.append("CloseableIterator") -class CloseableIterator: +class CloseableIterator(object): """Concatenating iterator with close attribute.""" def __init__(self, close_function, *iterators): """If close_function is not C{None}, it will be the C{close} attribute @@ -61,7 +61,7 @@ class CloseableList(list): list.__iter__(self)) __all__.append("BaseWSGIFilter") -class BaseWSGIFilter: +class BaseWSGIFilter(object): """Generic WSGI filter class to be used with L{WSGIFilterMiddleware}. For each request a filter object gets created. @@ -140,7 +140,7 @@ class BaseWSGIFilter: pass __all__.append("WSGIFilterMiddleware") -class WSGIFilterMiddleware: +class WSGIFilterMiddleware(object): """This wsgi middleware can be used with specialized L{BaseWSGIFilter}s to modify wsgi requests and/or reponses.""" def __init__(self, app, filterclass): diff --git a/wsgitools/middlewares.py b/wsgitools/middlewares.py index 4061d3b..b37b130 100644 --- a/wsgitools/middlewares.py +++ b/wsgitools/middlewares.py @@ -21,7 +21,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={}): """ @@ -54,7 +54,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{BytesIO} and then making it be the first result @@ -121,7 +121,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}.""" @@ -213,7 +213,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): @@ -308,7 +308,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): """ @@ -379,7 +379,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): diff --git a/wsgitools/scgi/__init__.py b/wsgitools/scgi/__init__.py index 4e60b74..f651264 100644 --- a/wsgitools/scgi/__init__.py +++ b/wsgitools/scgi/__init__.py @@ -7,7 +7,7 @@ except ImportError: else: have_sendfile = True -class FileWrapper: +class FileWrapper(object): """ @ivar offset: Initially 0. Becomes -1 when reading using next and becomes positive when reading using next. In the latter case it diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py index 1f4cdee..7df1575 100644 --- a/wsgitools/scgi/forkpool.py +++ b/wsgitools/scgi/forkpool.py @@ -28,7 +28,7 @@ else: __all__ = [] -class SocketFileWrapper: +class SocketFileWrapper(object): """Wraps a socket to a wsgi-compliant file-like object.""" def __init__(self, sock, toread): """@param sock: is a C{socket.socket()}""" @@ -168,10 +168,10 @@ class SocketFileWrapper: self.write(line) __all__.append("SCGIServer") -class SCGIServer: +class SCGIServer(object): """Usage: create an L{SCGIServer} object and invoke the run method which will then turn this process into an scgi server.""" - class WorkerState: + class WorkerState(object): """state: 0 means idle and 1 means working. These values are also sent as strings '0' and '1' over the socket.""" def __init__(self, pid, sock, state): |