@@ -163,12 +163,13 @@ also provides these miscellaneous utilities:
163163 The resulting objects
164164 are :term: `iterable `\ s. As the object is iterated over, the
165165 optional *blksize * parameter will be repeatedly passed to the *filelike *
166- object's :meth: `read ` method to obtain bytestrings to yield. When :meth: `read `
167- returns an empty bytestring, iteration is ended and is not resumable.
166+ object's :meth: `~io.BufferedIOBase.read ` method to obtain bytestrings to
167+ yield. When :meth: `~io.BufferedIOBase.read ` returns an empty bytestring,
168+ iteration is ended and is not resumable.
168169
169- If *filelike * has a :meth: `close ` method, the returned object will also have a
170- :meth: `close ` method, and it will invoke the *filelike * object's :meth: ` close `
171- method when called.
170+ If *filelike * has a :meth: `~io.IOBase. close ` method, the returned object will
171+ also have a :meth: `! close ` method, and it will invoke the *filelike * object's
172+ :meth: ` ~io.IOBase.close ` method when called.
172173
173174 Example usage::
174175
@@ -218,12 +219,13 @@ manipulation of WSGI response headers using a mapping-like interface.
218219 nonexistent header just returns ``None ``, and deleting a nonexistent header does
219220 nothing.
220221
221- :class: `Headers ` objects also support :meth: `keys `, :meth: `values `, and
222- :meth: `items ` methods. The lists returned by :meth: `keys ` and :meth: `items ` can
223- include the same key more than once if there is a multi-valued header. The
224- ``len() `` of a :class: `Headers ` object is the same as the length of its
225- :meth: `items `, which is the same as the length of the wrapped header list. In
226- fact, the :meth: `items ` method just returns a copy of the wrapped header list.
222+ :class: `Headers ` objects also support :meth: `!keys `, :meth: `!values `, and
223+ :meth: `!items ` methods. The lists returned by :meth: `!keys ` and
224+ :meth: `!items ` can include the same key more than once if there is a
225+ multi-valued header. The ``len() `` of a :class: `Headers ` object is the same
226+ as the length of its :meth: `!items `, which is the same as the length of the
227+ wrapped header list. In fact, the :meth: `!items ` method just returns a copy
228+ of the wrapped header list.
227229
228230 Calling ``bytes() `` on a :class: `Headers ` object returns a formatted bytestring
229231 suitable for transmission as HTTP response headers. Each header is placed on a
@@ -282,7 +284,7 @@ that serves WSGI applications. Each server instance serves a single WSGI
282284application on a given host and port. If you want to serve multiple
283285applications on a single host and port, you should create a WSGI application
284286that parses ``PATH_INFO `` to select which application to invoke for each
285- request. (E.g., using the :func: `shift_path_info ` function from
287+ request. (E.g., using the :func: `~wsgiref.util. shift_path_info ` function from
286288:mod: `wsgiref.util `.)
287289
288290
@@ -329,8 +331,9 @@ request. (E.g., using the :func:`shift_path_info` function from
329331 function can handle all the details for you.
330332
331333 :class: `WSGIServer ` is a subclass of :class: `http.server.HTTPServer `, so all
332- of its methods (such as :meth: `serve_forever ` and :meth: `handle_request `) are
333- available. :class: `WSGIServer ` also provides these WSGI-specific methods:
334+ of its methods (such as :meth: `~socketserver.BaseServer.serve_forever ` and
335+ :meth: `~socketserver.BaseServer.handle_request `) are available.
336+ :class: `WSGIServer ` also provides these WSGI-specific methods:
334337
335338
336339 .. method :: WSGIServer.set_app(application)
@@ -365,7 +368,7 @@ request. (E.g., using the :func:`shift_path_info` function from
365368 Return a :data: `~wsgiref.types.WSGIEnvironment ` dictionary for a
366369 request. The default
367370 implementation copies the contents of the :class: `WSGIServer ` object's
368- :attr: `base_environ ` dictionary attribute and then adds various headers derived
371+ :attr: `! base_environ ` dictionary attribute and then adds various headers derived
369372 from the HTTP request. Each call to this method should return a new dictionary
370373 containing all of the relevant CGI environment variables as specified in
371374 :pep: `3333 `.
@@ -403,7 +406,7 @@ absence of errors from this module does not necessarily mean that errors do not
403406exist. However, if this module does produce an error, then it is virtually
404407certain that either the server or application is not 100% compliant.
405408
406- This module is based on the :mod: `paste.lint ` module from Ian Bicking's "Python
409+ This module is based on the :mod: `! paste.lint ` module from Ian Bicking's "Python
407410Paste" library.
408411
409412
@@ -531,8 +534,8 @@ input, output, and error streams.
531534 :meth: `~BaseHandler._write `, and :meth: `~BaseHandler._flush ` methods to
532535 support explicitly setting the
533536 environment and streams via the constructor. The supplied environment and
534- streams are stored in the :attr: `stdin `, :attr: `stdout `, :attr: `stderr `, and
535- :attr: `environ ` attributes.
537+ streams are stored in the :attr: `! stdin `, :attr: `! stdout `, :attr: `! stderr `,
538+ and :attr: `! environ ` attributes.
536539
537540 The :meth: `~io.BufferedIOBase.write ` method of *stdout * should write
538541 each chunk in full, like :class: `io.BufferedIOBase `.
@@ -588,7 +591,8 @@ input, output, and error streams.
588591
589592 .. method :: BaseHandler.add_cgi_vars()
590593
591- Insert CGI variables for the current request into the :attr: `environ ` attribute.
594+ Insert CGI variables for the current request into the :attr: `!environ `
595+ attribute.
592596
593597 Here are some other methods and attributes you may wish to override. This list
594598 is only a summary, however, and does not include every method that can be
@@ -645,14 +649,14 @@ input, output, and error streams.
645649 .. method :: BaseHandler.get_scheme()
646650
647651 Return the URL scheme being used for the current request. The default
648- implementation uses the :func: `guess_scheme ` function from :mod: ` wsgiref.util `
649- to guess whether the scheme should be "http" or "https", based on the current
650- request's :attr: `environ ` variables.
652+ implementation uses the :func: `~wsgiref.util. guess_scheme ` function from
653+ :mod: ` wsgiref.util ` to guess whether the scheme should be "http" or
654+ "https", based on the current request's :attr: `! environ ` variables.
651655
652656
653657 .. method :: BaseHandler.setup_environ()
654658
655- Set the :attr: `environ ` attribute to a fully populated WSGI environment. The
659+ Set the :attr: `! environ ` attribute to a fully populated WSGI environment. The
656660 default implementation uses all of the above methods and attributes, plus the
657661 :meth: `get_stdin `, :meth: `get_stderr `, and :meth: `add_cgi_vars ` methods and the
658662 :attr: `wsgi_file_wrapper ` attribute. It also inserts a ``SERVER_SOFTWARE `` key
0 commit comments