@@ -78,7 +78,7 @@ The :mod:`urllib.request` module defines the following functions:
7878 :class: `UnknownHandler ` to ensure this never happens).
7979
8080 In addition, if proxy settings are detected (for example, when a ``*_proxy ``
81- environment variable like :envvar: `http_proxy ` is set),
81+ environment variable like :envvar: `! http_proxy ` is set),
8282 :class: `ProxyHandler ` is default installed and makes sure the requests are
8383 handled through the proxy.
8484
@@ -113,7 +113,7 @@ The :mod:`urllib.request` module defines the following functions:
113113 .. versionchanged :: 3.10
114114 HTTPS connection now send an ALPN extension with protocol indicator
115115 ``http/1.1 `` when no *context * is given. Custom *context * should set
116- ALPN protocols with :meth: `~ssl.SSLContext.set_alpn_protocol `.
116+ ALPN protocols with :meth: `~ssl.SSLContext.set_alpn_protocols `.
117117
118118 .. versionchanged :: 3.13
119119 Remove *cafile *, *capath * and *cadefault * parameters: use the *context *
@@ -618,25 +618,25 @@ OpenerDirector Objects
618618 the actual HTTP code, for example :meth: `http_error_404 ` would handle HTTP
619619 404 errors.
620620
621- * :meth: `<protocol>_open ` --- signal that the handler knows how to open *protocol *
621+ * :meth: `! <protocol>_open ` --- signal that the handler knows how to open *protocol *
622622 URLs.
623623
624624 See |protocol_open |_ for more information.
625625
626- * :meth: `http_error_\< type\> ` --- signal that the handler knows how to handle HTTP
626+ * :meth: `! http_error_\< type\> ` --- signal that the handler knows how to handle HTTP
627627 errors with HTTP error code *type *.
628628
629629 See |http_error_nnn |_ for more information.
630630
631- * :meth: `<protocol>_error ` --- signal that the handler knows how to handle errors
631+ * :meth: `! <protocol>_error ` --- signal that the handler knows how to handle errors
632632 from (non-\ ``http ``) *protocol *.
633633
634- * :meth: `<protocol>_request ` --- signal that the handler knows how to pre-process
634+ * :meth: `! <protocol>_request ` --- signal that the handler knows how to pre-process
635635 *protocol * requests.
636636
637637 See |protocol_request |_ for more information.
638638
639- * :meth: `<protocol>_response ` --- signal that the handler knows how to
639+ * :meth: `! <protocol>_response ` --- signal that the handler knows how to
640640 post-process *protocol * responses.
641641
642642 See |protocol_response |_ for more information.
@@ -663,7 +663,7 @@ OpenerDirector Objects
663663 Handle an error of the given protocol. This will call the registered error
664664 handlers for the given protocol with the given arguments (which are protocol
665665 specific). The HTTP protocol is a special case which uses the HTTP response
666- code to determine the specific error handler; refer to the :meth: `http_error_\< type\> `
666+ code to determine the specific error handler; refer to the :meth: `! http_error_\< type\> `
667667 methods of the handler classes.
668668
669669 Return values and exceptions raised are the same as those of :func: `urlopen `.
@@ -673,25 +673,25 @@ OpenerDirector objects open URLs in three stages:
673673The order in which these methods are called within each stage is determined by
674674sorting the handler instances.
675675
676- #. Every handler with a method named like :meth: `<protocol>_request ` has that
676+ #. Every handler with a method named like :meth: `! <protocol>_request ` has that
677677 method called to pre-process the request.
678678
679- #. Handlers with a method named like :meth: `<protocol>_open ` are called to handle
679+ #. Handlers with a method named like :meth: `! <protocol>_open ` are called to handle
680680 the request. This stage ends when a handler either returns a non-\ :const: `None `
681681 value (ie. a response), or raises an exception (usually
682682 :exc: `~urllib.error.URLError `). Exceptions are allowed to propagate.
683683
684684 In fact, the above algorithm is first tried for methods named
685- :meth: `default_open `. If all such methods return :const: `None `, the algorithm
686- is repeated for methods named like :meth: `<protocol>_open `. If all such methods
685+ :meth: `~BaseHandler. default_open `. If all such methods return :const: `None `, the algorithm
686+ is repeated for methods named like :meth: `! <protocol>_open `. If all such methods
687687 return :const: `None `, the algorithm is repeated for methods named
688- :meth: `unknown_open `.
688+ :meth: `~BaseHandler. unknown_open `.
689689
690690 Note that the implementation of these methods may involve calls of the parent
691691 :class: `OpenerDirector ` instance's :meth: `~OpenerDirector.open ` and
692692 :meth: `~OpenerDirector.error ` methods.
693693
694- #. Every handler with a method named like :meth: `<protocol>_response ` has that
694+ #. Every handler with a method named like :meth: `! <protocol>_response ` has that
695695 method called to post-process the response.
696696
697697
@@ -740,7 +740,7 @@ The following attribute and methods should only be used by classes derived from
740740 the return value of the :meth: `~OpenerDirector.open ` method of :class: `OpenerDirector `, or ``None ``.
741741 It should raise :exc: `~urllib.error.URLError `, unless a truly exceptional
742742 thing happens (for example, :exc: `MemoryError ` should not be mapped to
743- :exc: `URLError `).
743+ :exc: `~urllib.error. URLError `).
744744
745745 This method will be called before any protocol-specific open method.
746746
@@ -753,7 +753,7 @@ The following attribute and methods should only be used by classes derived from
753753 define it if they want to handle URLs with the given protocol.
754754
755755 This method, if defined, will be called by the parent :class: `OpenerDirector `.
756- Return values should be the same as for :meth: `default_open `.
756+ Return values should be the same as for :meth: `~BaseHandler. default_open `.
757757
758758
759759.. method :: BaseHandler.unknown_open(req)
@@ -793,7 +793,7 @@ The following attribute and methods should only be used by classes derived from
793793 Subclasses should override this method to handle specific HTTP errors.
794794
795795 Arguments, return values and exceptions raised should be the same as for
796- :meth: `http_error_default `.
796+ :meth: `~BaseHandler. http_error_default `.
797797
798798
799799.. _protocol_request :
@@ -833,7 +833,7 @@ HTTPRedirectHandler Objects
833833 is the case, :exc: `~urllib.error.HTTPError ` is raised. See :rfc: `2616 ` for
834834 details of the precise meanings of the various redirection codes.
835835
836- An :class: ` HTTPError ` exception raised as a security consideration if the
836+ An :exc: ` ~urllib.error. HTTPError ` exception raised as a security consideration if the
837837 HTTPRedirectHandler is presented with a redirected URL which is not an HTTP,
838838 HTTPS or FTP URL.
839839
@@ -910,7 +910,7 @@ ProxyHandler Objects
910910.. method :: ProxyHandler.<protocol>_open(request)
911911 :noindex:
912912
913- The :class: `ProxyHandler ` will have a method :meth: `<protocol>_open ` for every
913+ The :class: `ProxyHandler ` will have a method :meth: `! <protocol>_open ` for every
914914 *protocol * which has a proxy in the *proxies * dictionary given in the
915915 constructor. The method will modify requests to go through the proxy, by
916916 calling ``request.set_proxy() ``, and call the next handler in the chain to
@@ -1166,7 +1166,7 @@ HTTPErrorProcessor Objects
11661166 For 200 error codes, the response object is returned immediately.
11671167
11681168 For non-200 error codes, this simply passes the job on to the
1169- :meth: `http_error_\< type\> ` handler methods, via :meth: `OpenerDirector.error `.
1169+ :meth: `! http_error_\< type\> ` handler methods, via :meth: `OpenerDirector.error `.
11701170 Eventually, :class: `HTTPDefaultErrorHandler ` will raise an
11711171 :exc: `~urllib.error.HTTPError ` if no other handler handles the error.
11721172
@@ -1273,7 +1273,7 @@ Use of Basic HTTP Authentication::
12731273:func: `build_opener ` provides many handlers by default, including a
12741274:class: `ProxyHandler `. By default, :class: `ProxyHandler ` uses the environment
12751275variables named ``<scheme>_proxy ``, where ``<scheme> `` is the URL scheme
1276- involved. For example, the :envvar: `http_proxy ` environment variable is read to
1276+ involved. For example, the :envvar: `! http_proxy ` environment variable is read to
12771277obtain the HTTP proxy's URL.
12781278
12791279This example replaces the default :class: `ProxyHandler ` with one that uses
@@ -1368,7 +1368,7 @@ some point in the future.
13681368 points to a local file, the object will not be copied unless filename is supplied.
13691369 Return a tuple ``(filename, headers) `` where *filename * is the
13701370 local file name under which the object can be found, and *headers * is whatever
1371- the :meth: `info ` method of the object returned by :func: `urlopen ` returned (for
1371+ the :meth: `! info ` method of the object returned by :func: `urlopen ` returned (for
13721372 a remote object). Exceptions are the same as for :func: `urlopen `.
13731373
13741374 The second argument, if present, specifies the file location to copy to (if
@@ -1393,7 +1393,7 @@ some point in the future.
13931393 :mimetype: `application/x-www-form-urlencoded ` format; see the
13941394 :func: `urllib.parse.urlencode ` function.
13951395
1396- :func: `urlretrieve ` will raise :exc: `ContentTooShortError ` when it detects that
1396+ :func: `urlretrieve ` will raise :exc: `~urllib.error. ContentTooShortError ` when it detects that
13971397 the amount of data available was less than the expected amount (which is the
13981398 size reported by a *Content-Length * header). This can occur, for example, when
13991399 the download is interrupted.
@@ -1402,8 +1402,8 @@ some point in the future.
14021402 urlretrieve reads more data, but if less data is available, it raises the
14031403 exception.
14041404
1405- You can still retrieve the downloaded data in this case, it is stored in the
1406- :attr: `content ` attribute of the exception instance.
1405+ You can still retrieve the downloaded data in this case, it is stored in the
1406+ :attr: `! content ` attribute of the exception instance.
14071407
14081408 If no *Content-Length * header was supplied, urlretrieve can not check the size
14091409 of the data it has downloaded, and just returns it. In this case you just have
@@ -1497,7 +1497,7 @@ some point in the future.
14971497 authentication is performed. For the 30x response codes, recursion is bounded
14981498 by the value of the *maxtries * attribute, which defaults to 10.
14991499
1500- For all other response codes, the method :meth: `http_error_default ` is called
1500+ For all other response codes, the method :meth: `~BaseHandler. http_error_default ` is called
15011501 which you can override in subclasses to handle the error appropriately.
15021502
15031503 .. note ::
0 commit comments