cpython-fullhistory: 2697326d4a77 (original) (raw)

--- a/Doc/library/wsgiref.rst +++ b/Doc/library/wsgiref.rst @@ -22,7 +22,7 @@ be used to add WSGI support to a web ser for manipulating WSGI environment variables and response headers, base classes for implementing WSGI servers, a demo HTTP server that serves WSGI applications, and a validation tool that checks WSGI servers and applications for conformance -to the WSGI specification (:pep:333). +to the WSGI specification (:pep:3333). See http://www.wsgi.org for more information about WSGI, and links to tutorials and other resources. @@ -39,9 +39,9 @@ and other resources. This module provides a variety of utility functions for working with WSGI environments. A WSGI environment is a dictionary containing HTTP request -variables as described in :pep:333. All of the functions taking an environ +variables as described in :pep:3333. All of the functions taking an environ parameter expect a WSGI-compliant dictionary to be supplied; please see -:pep:333 for a detailed specification. +:pep:3333 for a detailed specification. .. function:: guess_scheme(environ) @@ -60,7 +60,7 @@ parameter expect a WSGI-compliant dictio .. function:: request_uri(environ, include_query=True) Return the full request URI, optionally including the query string, using the

@@ -104,7 +104,7 @@ parameter expect a WSGI-compliant dictio This routine adds various parameters required for WSGI, including HTTP_HOST, SERVER_NAME, SERVER_PORT, REQUEST_METHOD, SCRIPT_NAME,

@@ -152,8 +152,8 @@ also provides these miscellaneous utilit support both :meth:__getitem__ and :meth:__iter__ iteration styles, for compatibility with Python 2.1 and Jython. As the object is iterated over, the optional blksize parameter will be repeatedly passed to the filelike

@@ -346,7 +346,7 @@ request. (E.g., using the :func:shift_[](#l1.86) :attr:base_environ` dictionary attribute and then adds various headers derived from the HTTP request. Each call to this method should return a new dictionary containing all of the relevant CGI environment variables as specified in

.. method:: WSGIRequestHandler.get_stderr() @@ -376,7 +376,7 @@ application objects that validate commun gateway and a WSGI application object, to check both sides for protocol conformance. -Note that this utility does not guarantee complete :pep:333 compliance; an +Note that this utility does not guarantee complete :pep:3333 compliance; an absence of errors from this module does not necessarily mean that errors do not exist. However, if this module does produce an error, then it is virtually certain that either the server or application is not 100% compliant. @@ -401,7 +401,7 @@ Paste" library. This wrapper may also generate output using the :mod:warnings module to indicate behaviors that are questionable but which may not actually be

The default implementation just uses the :attr:error_status, :attr:error_headers, and :attr:error_body attributes to generate an output @@ -641,23 +641,23 @@ input, output, and error streams. .. attribute:: BaseHandler.error_status The HTTP status used for error responses. This should be a status string as

.. attribute:: BaseHandler.error_headers The HTTP headers used for error responses. This should be a list of WSGI

.. attribute:: BaseHandler.error_body

--- a/Lib/wsgiref/simple_server.py +++ b/Lib/wsgiref/simple_server.py @@ -1,4 +1,4 @@ -"""BaseHTTPServer that implements the Python WSGI protocol (PEP 333, rev 1.21) +"""BaseHTTPServer that implements the Python WSGI protocol (PEP 3333) This is both an example of how WSGI can be implemented, and a basis for running simple web applications on a local machine, such as might be done when testing @@ -133,7 +133,7 @@ def demo_app(environ,start_response): h = sorted(environ.items()) for k,v in h: print(k,'=',repr(v), file=stdout)

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -59,6 +59,12 @@ Core and Builtins Library ------- +- wsgiref now implements and validates PEP 3333, rather than an experimental