summaryrefslogtreecommitdiff
path: root/wsgitools
diff options
context:
space:
mode:
Diffstat (limited to 'wsgitools')
-rwxr-xr-xwsgitools/digest.py1
-rw-r--r--wsgitools/filters.py2
-rw-r--r--wsgitools/middlewares.py4
-rw-r--r--wsgitools/scgi/forkpool.py10
4 files changed, 9 insertions, 8 deletions
diff --git a/wsgitools/digest.py b/wsgitools/digest.py
index c943c92..63227be 100755
--- a/wsgitools/digest.py
+++ b/wsgitools/digest.py
@@ -54,6 +54,7 @@ class AuthTokenGenerator:
"""
@type realm: str
@param realm: is a string according to RFC2617.
+ @type getpass: str -> str
@param getpass: this function is called with a username and password is
expected as result. None may be used as an invalid password."""
self.realm = realm
diff --git a/wsgitools/filters.py b/wsgitools/filters.py
index 4f01c6c..9b901fd 100644
--- a/wsgitools/filters.py
+++ b/wsgitools/filters.py
@@ -316,7 +316,7 @@ class EncodeWSGIFilter(BaseWSGIFilter):
"""BaseWSGIFilter interface
@type header: str
@type value: str
- @rtype (str, str)
+ @rtype: (str, str)
"""
if header.lower() != "content-type":
return (header, value)
diff --git a/wsgitools/middlewares.py b/wsgitools/middlewares.py
index f9362b7..908b5b3 100644
--- a/wsgitools/middlewares.py
+++ b/wsgitools/middlewares.py
@@ -114,7 +114,7 @@ class ContentLengthMiddleware:
of iterators possible. At most maxstore bytes will be accumulated.
Please note that a value larger than 0 will violate the wsgi standard.
The magical value () will make it always gather all data.
- @type maxstore: number
+ @type maxstore: int or ()
"""
self.app = app
self.maxstore = maxstore
@@ -197,7 +197,7 @@ class CachingMiddleware:
def __init__(self, app, maxage=60, storable=storable, cacheable=cacheable):
"""
@param app: is a wsgi application to be cached.
- @type maxage: number
+ @type maxage: int
@param maxage: is the number of seconds a reponse may be cached.
@param storable: is a predicate that determines whether the response
may be cached at all based on the environ dict.
diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py
index 2d8428d..3058316 100644
--- a/wsgitools/scgi/forkpool.py
+++ b/wsgitools/scgi/forkpool.py
@@ -169,18 +169,18 @@ class SCGIServer:
minworkers=2, maxworkers=32, maxrequests=1000):
"""
@param wsgiapp: is the WSGI application to be run.
- @type port: number
+ @type port: int
@param port: is the tcp port to listen on
@type interface: str
@param interface: is the interface to bind to (default: "localhost")
@param error: is a filelike object beeing passed as wsgi.error in
environ
- @type minworkers: number
+ @type minworkers: int
@param minworkers: is the number of worker processes to spawn
- @type maxworkers: number
+ @type maxworkers: int
@param maxworkers: is the maximum number of workers that can be spawned
on demand
- @type maxrequests: number
+ @type maxrequests: int
@param maxrequests: is the number of requests a worker processes before
dying
"""
@@ -207,7 +207,7 @@ class SCGIServer:
while True:
while (len(self.workers) < self.minworkers or # less than min
(len(self.workers) < self.maxworkers and # less than max
- not len([w for w in # no inctive
+ not len([w for w in # no inactive
self.workers.values() if w.state == 0]))):
self.spawnworker()
rs, _, _ = select.select(self.workers.keys(), [], [])