Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Doc/library/wsgiref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
applications to set up dummy environments. It should NOT be used by actual WSGI
servers or applications, since the data is fake!

Example usage::
Example usage (see also :func:`demo_app` for another example)::

Check warning on line 122 in Doc/library/wsgiref.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:func reference target not found: demo_app [ref.func]

from wsgiref.util import setup_testing_defaults
from wsgiref.simple_server import make_server
Expand Down Expand Up @@ -312,6 +312,8 @@
as :mod:`wsgiref.simple_server`) is able to run a simple WSGI application
correctly.

The *start_response* callable should follow the :class:`.StartResponse` protocol.


.. class:: WSGIServer(server_address, RequestHandlerClass)

Expand Down Expand Up @@ -679,7 +681,9 @@

This method can access the current error using ``sys.exception()``,
and should pass that information to *start_response* when calling it (as
described in the "Error Handling" section of :pep:`3333`).
described in the "Error Handling" section of :pep:`3333`). In particular,
the *start_response* callable should follow the :class:`.StartResponse`
protocol.

The default implementation just uses the :attr:`error_status`,
:attr:`error_headers`, and :attr:`error_body` attributes to generate an output
Expand Down Expand Up @@ -781,7 +785,7 @@
.. versionadded:: 3.11


.. class:: StartResponse()
.. class:: StartResponse

A :class:`typing.Protocol` describing :pep:`start_response()
<3333#the-start-response-callable>`
Expand Down Expand Up @@ -816,7 +820,8 @@
Examples
--------

This is a working "Hello World" WSGI application::
This is a working "Hello World" WSGI application, where the *start_response*
callable should follow the :class:`.StartResponse` protocol::

"""
Every WSGI application must have an application object - a callable
Expand Down
Loading