diff options
author | pjenvey <devnull@localhost> | 2007-01-05 03:18:34 +0000 |
---|---|---|
committer | pjenvey <devnull@localhost> | 2007-01-05 03:18:34 +0000 |
commit | c3489449893fc6facc58dd06a2ea13091d9096fa (patch) | |
tree | 94c8bd85450992880b8796ab592896c56d69e69c /paste | |
parent | dc929a2a6569b1ec4d30e5ba4f3741c07c47b4ce (diff) | |
download | paste-c3489449893fc6facc58dd06a2ea13091d9096fa.tar.gz |
convert old-style classes to new-style classes
Diffstat (limited to 'paste')
-rw-r--r-- | paste/auth/basic.py | 4 | ||||
-rw-r--r-- | paste/auth/cookie.py | 4 | ||||
-rw-r--r-- | paste/auth/digest.py | 4 | ||||
-rw-r--r-- | paste/auth/form.py | 2 | ||||
-rw-r--r-- | paste/auth/multi.py | 2 | ||||
-rw-r--r-- | paste/cgitb_catcher.py | 2 | ||||
-rwxr-xr-x | paste/debug/debugapp.py | 4 | ||||
-rw-r--r-- | paste/errordocument.py | 4 | ||||
-rw-r--r-- | paste/exceptions/collector.py | 4 | ||||
-rw-r--r-- | paste/exceptions/errormiddleware.py | 2 | ||||
-rw-r--r-- | paste/exceptions/reporter.py | 2 | ||||
-rw-r--r-- | paste/fileapp.py | 2 | ||||
-rw-r--r-- | paste/fixture.py | 2 | ||||
-rw-r--r-- | paste/flup_session.py | 2 | ||||
-rw-r--r-- | paste/httpexceptions.py | 2 | ||||
-rw-r--r-- | paste/httpheaders.py | 2 | ||||
-rwxr-xr-x | paste/httpserver.py | 4 | ||||
-rw-r--r-- | paste/lint.py | 10 | ||||
-rw-r--r-- | paste/modpython.py | 2 | ||||
-rwxr-xr-x | paste/progress.py | 4 | ||||
-rw-r--r-- | paste/recursive.py | 4 | ||||
-rw-r--r-- | paste/reloader.py | 2 | ||||
-rw-r--r-- | paste/session.py | 2 | ||||
-rw-r--r-- | paste/urlparser.py | 2 | ||||
-rw-r--r-- | paste/util/filemixin.py | 2 | ||||
-rw-r--r-- | paste/wsgilib.py | 8 |
26 files changed, 42 insertions, 42 deletions
diff --git a/paste/auth/basic.py b/paste/auth/basic.py index c51dde5..69db128 100644 --- a/paste/auth/basic.py +++ b/paste/auth/basic.py @@ -24,7 +24,7 @@ serving on... from paste.httpexceptions import HTTPUnauthorized from paste.httpheaders import * -class AuthBasicAuthenticator: +class AuthBasicAuthenticator(object): """ implements ``Basic`` authentication details """ @@ -52,7 +52,7 @@ class AuthBasicAuthenticator: __call__ = authenticate -class AuthBasicHandler: +class AuthBasicHandler(object): """ HTTP/1.0 ``Basic`` authentication middleware diff --git a/paste/auth/cookie.py b/paste/auth/cookie.py index a650436..8a7ccaf 100644 --- a/paste/auth/cookie.py +++ b/paste/auth/cookie.py @@ -70,7 +70,7 @@ def new_secret(): """ returns a 64 byte secret """ return ''.join(random.sample(_all_chars, 64)) -class AuthCookieSigner: +class AuthCookieSigner(object): """ save/restore ``environ`` entries via digially signed cookie @@ -180,7 +180,7 @@ class AuthCookieEnviron(list): return list.append(self, str(value)) -class AuthCookieHandler: +class AuthCookieHandler(object): """ the actual handler that should be put in your middleware stack diff --git a/paste/auth/digest.py b/paste/auth/digest.py index ad5e4a3..229a03d 100644 --- a/paste/auth/digest.py +++ b/paste/auth/digest.py @@ -37,7 +37,7 @@ def digest_password(realm, username, password): """ construct the appropriate hashcode needed for HTTP digest """ return md5.md5("%s:%s:%s" % (username, realm, password)).hexdigest() -class AuthDigestAuthenticator: +class AuthDigestAuthenticator(object): """ implementation of RFC 2617 - HTTP Digest Authentication """ def __init__(self, realm, authfunc): self.nonce = {} # list to prevent replay attacks @@ -119,7 +119,7 @@ class AuthDigestAuthenticator: __call__ = authenticate -class AuthDigestHandler: +class AuthDigestHandler(object): """ middleware for HTTP Digest authentication (RFC 2617) diff --git a/paste/auth/form.py b/paste/auth/form.py index f376cdd..0417b38 100644 --- a/paste/auth/form.py +++ b/paste/auth/form.py @@ -44,7 +44,7 @@ TEMPLATE = """\ </html> """ -class AuthFormHandler: +class AuthFormHandler(object): """ HTML-based login middleware diff --git a/paste/auth/multi.py b/paste/auth/multi.py index e3516c2..b378fa6 100644 --- a/paste/auth/multi.py +++ b/paste/auth/multi.py @@ -32,7 +32,7 @@ serving on... """ -class MultiHandler: +class MultiHandler(object): """ Multiple Authentication Handler diff --git a/paste/cgitb_catcher.py b/paste/cgitb_catcher.py index 6278103..1c815b7 100644 --- a/paste/cgitb_catcher.py +++ b/paste/cgitb_catcher.py @@ -15,7 +15,7 @@ import sys from paste.util import converters -class NoDefault: +class NoDefault(object): pass class CgitbMiddleware(object): diff --git a/paste/debug/debugapp.py b/paste/debug/debugapp.py index caabd03..190cbdd 100755 --- a/paste/debug/debugapp.py +++ b/paste/debug/debugapp.py @@ -12,7 +12,7 @@ import time __all__ = ['SimpleApplication', 'SlowConsumer'] -class SimpleApplication: +class SimpleApplication(object): """ Produces a simple web page """ @@ -22,7 +22,7 @@ class SimpleApplication: ('Content-Length', str(len(body)))]) return [body] -class SlowConsumer: +class SlowConsumer(object): """ Consumes an upload slowly... diff --git a/paste/errordocument.py b/paste/errordocument.py index f776633..90bda8a 100644 --- a/paste/errordocument.py +++ b/paste/errordocument.py @@ -83,7 +83,7 @@ class StatusKeeper(object): #raise Exception(self.url, self.status) return self.app(environ, keep_status_start_response) -class StatusBasedForward: +class StatusBasedForward(object): """ Middleware that lets you test a response against a custom mapper object to programatically determine whether to internally forward to another URL and @@ -241,7 +241,7 @@ def custom_forward(app, mapper, global_conf=None, **kw): global_conf = {} return _StatusBasedRedirect(app, mapper, global_conf, **kw) -class _StatusBasedRedirect: +class _StatusBasedRedirect(object): """ Deprectated; use StatusBasedForward instead. """ diff --git a/paste/exceptions/collector.py b/paste/exceptions/collector.py index c285452..4eb7c1c 100644 --- a/paste/exceptions/collector.py +++ b/paste/exceptions/collector.py @@ -35,7 +35,7 @@ DEBUG_IDENT_PREFIX = 'E-' __all__ = ['collect_exception', 'ExceptionCollector'] -class ExceptionCollector: +class ExceptionCollector(object): """ Produces a data structure that can be used by formatters to @@ -375,7 +375,7 @@ class ExceptionCollector: limit = 200 -class Bunch: +class Bunch(object): """ A generic container diff --git a/paste/exceptions/errormiddleware.py b/paste/exceptions/errormiddleware.py index d49d71d..def30f9 100644 --- a/paste/exceptions/errormiddleware.py +++ b/paste/exceptions/errormiddleware.py @@ -17,7 +17,7 @@ from paste import request __all__ = ['ErrorMiddleware', 'handle_exception'] -class _NoDefault: +class _NoDefault(object): def __repr__(self): return '<NoDefault>' NoDefault = _NoDefault() diff --git a/paste/exceptions/reporter.py b/paste/exceptions/reporter.py index 3ebebbf..7b1c5dd 100644 --- a/paste/exceptions/reporter.py +++ b/paste/exceptions/reporter.py @@ -7,7 +7,7 @@ import smtplib import time from paste.exceptions import formatter -class Reporter: +class Reporter(object): def __init__(self, **conf): for name, value in conf.items(): diff --git a/paste/fileapp.py b/paste/fileapp.py index 0d59d06..a19a2e9 100644 --- a/paste/fileapp.py +++ b/paste/fileapp.py @@ -193,7 +193,7 @@ class FileApp(DataApp): file.seek(lower) return _FileIter(file, size=content_length) -class _FileIter: +class _FileIter(object): def __init__(self, file, block_size=None, size=None): self.file = file diff --git a/paste/fixture.py b/paste/fixture.py index 7e2d4a7..2f446a0 100644 --- a/paste/fixture.py +++ b/paste/fixture.py @@ -44,7 +44,7 @@ def tempnam_no_warning(*args): """ return os.tempnam(*args) -class NoDefault: +class NoDefault(object): pass def sorted(l): diff --git a/paste/flup_session.py b/paste/flup_session.py index 43a34bc..b230ab8 100644 --- a/paste/flup_session.py +++ b/paste/flup_session.py @@ -25,7 +25,7 @@ flup_session = flup.middleware.session # store type and parameters store_cache = {} -class NoDefault: +class NoDefault(object): pass class SessionMiddleware(object): diff --git a/paste/httpexceptions.py b/paste/httpexceptions.py index 0910b94..5792d76 100644 --- a/paste/httpexceptions.py +++ b/paste/httpexceptions.py @@ -588,7 +588,7 @@ def get_exception(code): ## Middleware implementation: ############################################################ -class HTTPExceptionHandler: +class HTTPExceptionHandler(object): """ catches exceptions and turns them into proper HTTP responses diff --git a/paste/httpheaders.py b/paste/httpheaders.py index 317c17b..a658e5c 100644 --- a/paste/httpheaders.py +++ b/paste/httpheaders.py @@ -976,7 +976,7 @@ class _Authorization(_SingleValueHeader): auth.add_password(realm, path, username, password) (token, challenge) = challenge.split(' ', 1) chal = urllib2.parse_keqv_list(urllib2.parse_http_list(challenge)) - class FakeRequest: + class FakeRequest(object): def get_full_url(self): return path def has_data(self): diff --git a/paste/httpserver.py b/paste/httpserver.py index 0bb0ed8..7ea5555 100755 --- a/paste/httpserver.py +++ b/paste/httpserver.py @@ -71,7 +71,7 @@ class ContinueHook(object): self._ContinueFile_send() return self._ContinueFile_rfile.readlines(sizehint) -class WSGIHandlerMixin: +class WSGIHandlerMixin(object): """ WSGI mix-in for HTTPRequestHandler @@ -401,7 +401,7 @@ class ThreadPool(object): for worker in self.workers: worker.join() -class ThreadPoolMixIn: +class ThreadPoolMixIn(object): """ Mix-in class to process requests from a thread pool """ diff --git a/paste/lint.py b/paste/lint.py index 63c216f..480ab1a 100644 --- a/paste/lint.py +++ b/paste/lint.py @@ -177,7 +177,7 @@ def middleware(application, global_conf=None): return lint_app -class InputWrapper: +class InputWrapper(object): def __init__(self, wsgi_input): self.input = wsgi_input @@ -211,7 +211,7 @@ class InputWrapper: def close(self): assert 0, "input.close() must not be called" -class ErrorWrapper: +class ErrorWrapper(object): def __init__(self, wsgi_errors): self.errors = wsgi_errors @@ -230,7 +230,7 @@ class ErrorWrapper: def close(self): assert 0, "errors.close() must not be called" -class WriteWrapper: +class WriteWrapper(object): def __init__(self, wsgi_writer): self.writer = wsgi_writer @@ -239,7 +239,7 @@ class WriteWrapper: assert type(s) is type("") self.writer(s) -class PartialIteratorWrapper: +class PartialIteratorWrapper(object): def __init__(self, wsgi_iterator): self.iterator = wsgi_iterator @@ -248,7 +248,7 @@ class PartialIteratorWrapper: # We want to make sure __iter__ is called return IteratorWrapper(self.iterator) -class IteratorWrapper: +class IteratorWrapper(object): def __init__(self, wsgi_iterator, check_start_response): self.original_iterator = wsgi_iterator diff --git a/paste/modpython.py b/paste/modpython.py index 189e29a..a3fef55 100644 --- a/paste/modpython.py +++ b/paste/modpython.py @@ -102,7 +102,7 @@ bad_value = ("You must provide a PythonOption '%s', either 'on' or 'off', " "when running a version of mod_python < 3.1") -class Handler: +class Handler(object): def __init__(self, req): self.started = False diff --git a/paste/progress.py b/paste/progress.py index 91f245c..57bf0bd 100755 --- a/paste/progress.py +++ b/paste/progress.py @@ -77,7 +77,7 @@ class _ProgressFile(object): self._ProgressFile_environ[ENVIRON_RECEIVED] += len(chunk) return chunk -class UploadProgressMonitor: +class UploadProgressMonitor(object): """ monitors and reports on the status of uploads in progress @@ -154,7 +154,7 @@ class UploadProgressMonitor: def uploads(self): return self.monitor -class UploadProgressReporter: +class UploadProgressReporter(object): """ reports on the progress of uploads for a given user diff --git a/paste/recursive.py b/paste/recursive.py index fbd213e..6f54fd1 100644 --- a/paste/recursive.py +++ b/paste/recursive.py @@ -29,7 +29,7 @@ import warnings __all__ = ['RecursiveMiddleware'] __pudge_all__ = ['RecursiveMiddleware', 'ForwardRequestException'] -class CheckForRecursionMiddleware: +class CheckForRecursionMiddleware(object): def __init__(self, app, env): self.app = app self.env = env @@ -201,7 +201,7 @@ class ForwardRequestException(Exception): self.path_info = url # Base middleware - class ForwardRequestExceptionMiddleware: + class ForwardRequestExceptionMiddleware(object): def __init__(self, app): self.app = app diff --git a/paste/reloader.py b/paste/reloader.py index 607d772..99c09eb 100644 --- a/paste/reloader.py +++ b/paste/reloader.py @@ -51,7 +51,7 @@ def install(poll_interval=1): t.setDaemon(True) t.start() -class Monitor: +class Monitor(object): instances = [] global_extra_files = [] diff --git a/paste/session.py b/paste/session.py index cd2c324..e0ab242 100644 --- a/paste/session.py +++ b/paste/session.py @@ -267,7 +267,7 @@ class FileSession(object): cleaning_up = False raise -class _NoDefault: +class _NoDefault(object): def __repr__(self): return '<dynamic default>' NoDefault = _NoDefault() diff --git a/paste/urlparser.py b/paste/urlparser.py index 326b1e9..ca5f3e6 100644 --- a/paste/urlparser.py +++ b/paste/urlparser.py @@ -16,7 +16,7 @@ from paste import httpexceptions from httpheaders import ETAG from paste.util import converters -class NoDefault: +class NoDefault(object): pass __all__ = ['URLParser', 'StaticURLParser', 'PkgResourcesParser'] diff --git a/paste/util/filemixin.py b/paste/util/filemixin.py index a7146f6..10a9e7c 100644 --- a/paste/util/filemixin.py +++ b/paste/util/filemixin.py @@ -1,7 +1,7 @@ # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php -class FileMixin: +class FileMixin(object): """ Used to provide auxiliary methods to objects simulating files. diff --git a/paste/wsgilib.py b/paste/wsgilib.py index 82a91f0..5860fbd 100644 --- a/paste/wsgilib.py +++ b/paste/wsgilib.py @@ -27,7 +27,7 @@ __all__ = ['get_cookies', 'add_close', 'raw_interactive', 'chained_app_iters'] -class add_close: +class add_close(object): """ An an iterable that iterates over app_iter, then calls close_func. @@ -59,7 +59,7 @@ class add_close: "WSGI request. finalization function %s not called" % self.close_func) -class add_start_close: +class add_start_close(object): """ An an iterable that iterates over app_iter, calls start_func before the first item is returned, then calls close_func at the @@ -98,7 +98,7 @@ class add_start_close: "WSGI request. finalization function %s not called" % self.close_func) -class chained_app_iters: +class chained_app_iters(object): """ Chains several app_iters together, also delegating .close() to each @@ -143,7 +143,7 @@ class chained_app_iters: "WSGI request. finalization function %s not called" % self.close_func) -class encode_unicode_app_iter: +class encode_unicode_app_iter(object): """ Encodes an app_iterable's unicode responses as strings """ |