From f4c188a87b680e260b2658ee51ab31405064526d Mon Sep 17 00:00:00 2001 From: pje Date: Mon, 12 Jun 2006 03:49:39 +0000 Subject: Merge changes back from the Python trunk. :( git-svn-id: svn://svn.eby-sarna.com/svnroot/wsgiref@2185 571e12c6-e1fa-0310-aee7-ff1267fa46bd --- setup.py | 2 +- wsgiref/handlers.py | 4 ++-- wsgiref/headers.py | 2 +- wsgiref/simple_server.py | 2 +- wsgiref/util.py | 6 +++--- wsgiref/validate.py | 3 +-- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/setup.py b/setup.py index 7746a1f..31e3864 100755 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ from setuptools import setup, find_packages # Metadata PACKAGE_NAME = "wsgiref" -PACKAGE_VERSION = "0.1.1" +PACKAGE_VERSION = "0.1.2" setup( name=PACKAGE_NAME, diff --git a/wsgiref/handlers.py b/wsgiref/handlers.py index 52771a2..099371b 100644 --- a/wsgiref/handlers.py +++ b/wsgiref/handlers.py @@ -209,7 +209,7 @@ class BaseHandler: assert type(data) is StringType,"write() argument must be string" if not self.status: - raise AssertionError("write() before start_response()") + raise AssertionError("write() before start_response()") elif not self.headers_sent: # Before the first output, send the stored headers @@ -489,4 +489,4 @@ class CGIHandler(BaseCGIHandler): - +# diff --git a/wsgiref/headers.py b/wsgiref/headers.py index fa9b829..016eb86 100644 --- a/wsgiref/headers.py +++ b/wsgiref/headers.py @@ -202,4 +202,4 @@ class Headers: - +# diff --git a/wsgiref/simple_server.py b/wsgiref/simple_server.py index e171686..95996cc 100644 --- a/wsgiref/simple_server.py +++ b/wsgiref/simple_server.py @@ -184,7 +184,6 @@ def make_server( if __name__ == '__main__': - server_address = ('', 8000) httpd = make_server('', 8000, demo_app) sa = httpd.socket.getsockname() print "Serving HTTP on", sa[0], "port", sa[1], "..." @@ -203,3 +202,4 @@ if __name__ == '__main__': +# diff --git a/wsgiref/util.py b/wsgiref/util.py index 78ebb3b..9009b87 100644 --- a/wsgiref/util.py +++ b/wsgiref/util.py @@ -59,10 +59,10 @@ def application_uri(environ): if environ['wsgi.url_scheme'] == 'https': if environ['SERVER_PORT'] != '443': - url += ':' + environ['SERVER_PORT'] + url += ':' + environ['SERVER_PORT'] else: if environ['SERVER_PORT'] != '80': - url += ':' + environ['SERVER_PORT'] + url += ':' + environ['SERVER_PORT'] url += quote(environ.get('SCRIPT_NAME') or '/') return url @@ -202,4 +202,4 @@ def is_hop_by_hop(header_name): - +# diff --git a/wsgiref/validate.py b/wsgiref/validate.py index 77b59f8..23ab9f8 100755 --- a/wsgiref/validate.py +++ b/wsgiref/validate.py @@ -252,7 +252,7 @@ class PartialIteratorWrapper: def __iter__(self): # We want to make sure __iter__ is called - return IteratorWrapper(self.iterator) + return IteratorWrapper(self.iterator, None) class IteratorWrapper: @@ -430,4 +430,3 @@ def check_iterator(iterator): assert_(not isinstance(iterator, str), "You should not return a string as your application iterator, " "instead return a single-item list containing that string.") - -- cgit v1.2.1