@@ -86,7 +86,7 @@ The :mod:`urllib.request` module defines the following functions:
8686 :class: `UnknownHandler ` to ensure this never happens).
8787
8888 In addition, if proxy settings are detected (for example, when a ``*_proxy ``
89- environment variable like :envvar: `http_proxy ` is set),
89+ environment variable like :envvar: `! http_proxy ` is set),
9090 :class: `ProxyHandler ` is default installed and makes sure the requests are
9191 handled through the proxy.
9292
@@ -121,7 +121,7 @@ The :mod:`urllib.request` module defines the following functions:
121121 .. versionchanged :: 3.10
122122 HTTPS connection now send an ALPN extension with protocol indicator
123123 ``http/1.1 `` when no *context * is given. Custom *context * should set
124- ALPN protocols with :meth: `~ssl.SSLContext.set_alpn_protocol `.
124+ ALPN protocols with :meth: `~ssl.SSLContext.set_alpn_protocols `.
125125
126126 .. deprecated :: 3.6
127127
@@ -629,25 +629,25 @@ OpenerDirector Objects
629629 the actual HTTP code, for example :meth: `http_error_404 ` would handle HTTP
630630 404 errors.
631631
632- * :meth: `<protocol>_open ` --- signal that the handler knows how to open *protocol *
632+ * :meth: `! <protocol>_open ` --- signal that the handler knows how to open *protocol *
633633 URLs.
634634
635635 See |protocol_open |_ for more information.
636636
637- * :meth: `http_error_\< type\> ` --- signal that the handler knows how to handle HTTP
637+ * :meth: `! http_error_\< type\> ` --- signal that the handler knows how to handle HTTP
638638 errors with HTTP error code *type *.
639639
640640 See |http_error_nnn |_ for more information.
641641
642- * :meth: `<protocol>_error ` --- signal that the handler knows how to handle errors
642+ * :meth: `! <protocol>_error ` --- signal that the handler knows how to handle errors
643643 from (non-\ ``http ``) *protocol *.
644644
645- * :meth: `<protocol>_request ` --- signal that the handler knows how to pre-process
645+ * :meth: `! <protocol>_request ` --- signal that the handler knows how to pre-process
646646 *protocol * requests.
647647
648648 See |protocol_request |_ for more information.
649649
650- * :meth: `<protocol>_response ` --- signal that the handler knows how to
650+ * :meth: `! <protocol>_response ` --- signal that the handler knows how to
651651 post-process *protocol * responses.
652652
653653 See |protocol_response |_ for more information.
@@ -674,7 +674,7 @@ OpenerDirector Objects
674674 Handle an error of the given protocol. This will call the registered error
675675 handlers for the given protocol with the given arguments (which are protocol
676676 specific). The HTTP protocol is a special case which uses the HTTP response
677- code to determine the specific error handler; refer to the :meth: `http_error_\< type\> `
677+ code to determine the specific error handler; refer to the :meth: `! http_error_\< type\> `
678678 methods of the handler classes.
679679
680680 Return values and exceptions raised are the same as those of :func: `urlopen `.
@@ -684,25 +684,25 @@ OpenerDirector objects open URLs in three stages:
684684The order in which these methods are called within each stage is determined by
685685sorting the handler instances.
686686
687- #. Every handler with a method named like :meth: `<protocol>_request ` has that
687+ #. Every handler with a method named like :meth: `! <protocol>_request ` has that
688688 method called to pre-process the request.
689689
690- #. Handlers with a method named like :meth: `<protocol>_open ` are called to handle
690+ #. Handlers with a method named like :meth: `! <protocol>_open ` are called to handle
691691 the request. This stage ends when a handler either returns a non-\ :const: `None `
692692 value (ie. a response), or raises an exception (usually
693693 :exc: `~urllib.error.URLError `). Exceptions are allowed to propagate.
694694
695695 In fact, the above algorithm is first tried for methods named
696- :meth: `default_open `. If all such methods return :const: `None `, the algorithm
697- is repeated for methods named like :meth: `<protocol>_open `. If all such methods
696+ :meth: `~BaseHandler. default_open `. If all such methods return :const: `None `, the algorithm
697+ is repeated for methods named like :meth: `! <protocol>_open `. If all such methods
698698 return :const: `None `, the algorithm is repeated for methods named
699- :meth: `unknown_open `.
699+ :meth: `~BaseHandler. unknown_open `.
700700
701701 Note that the implementation of these methods may involve calls of the parent
702702 :class: `OpenerDirector ` instance's :meth: `~OpenerDirector.open ` and
703703 :meth: `~OpenerDirector.error ` methods.
704704
705- #. Every handler with a method named like :meth: `<protocol>_response ` has that
705+ #. Every handler with a method named like :meth: `! <protocol>_response ` has that
706706 method called to post-process the response.
707707
708708
@@ -751,7 +751,7 @@ The following attribute and methods should only be used by classes derived from
751751 the return value of the :meth: `~OpenerDirector.open ` method of :class: `OpenerDirector `, or ``None ``.
752752 It should raise :exc: `~urllib.error.URLError `, unless a truly exceptional
753753 thing happens (for example, :exc: `MemoryError ` should not be mapped to
754- :exc: `URLError `).
754+ :exc: `~urllib.error. URLError `).
755755
756756 This method will be called before any protocol-specific open method.
757757
@@ -764,7 +764,7 @@ The following attribute and methods should only be used by classes derived from
764764 define it if they want to handle URLs with the given protocol.
765765
766766 This method, if defined, will be called by the parent :class: `OpenerDirector `.
767- Return values should be the same as for :meth: `default_open `.
767+ Return values should be the same as for :meth: `~BaseHandler. default_open `.
768768
769769
770770.. method :: BaseHandler.unknown_open(req)
@@ -804,7 +804,7 @@ The following attribute and methods should only be used by classes derived from
804804 Subclasses should override this method to handle specific HTTP errors.
805805
806806 Arguments, return values and exceptions raised should be the same as for
807- :meth: `http_error_default `.
807+ :meth: `~BaseHandler. http_error_default `.
808808
809809
810810.. _protocol_request :
@@ -844,7 +844,7 @@ HTTPRedirectHandler Objects
844844 is the case, :exc: `~urllib.error.HTTPError ` is raised. See :rfc: `2616 ` for
845845 details of the precise meanings of the various redirection codes.
846846
847- An :class: ` HTTPError ` exception raised as a security consideration if the
847+ An :exc: ` ~urllib.error. HTTPError ` exception raised as a security consideration if the
848848 HTTPRedirectHandler is presented with a redirected URL which is not an HTTP,
849849 HTTPS or FTP URL.
850850
@@ -921,7 +921,7 @@ ProxyHandler Objects
921921.. method :: ProxyHandler.<protocol>_open(request)
922922 :noindex:
923923
924- The :class: `ProxyHandler ` will have a method :meth: `<protocol>_open ` for every
924+ The :class: `ProxyHandler ` will have a method :meth: `! <protocol>_open ` for every
925925 *protocol * which has a proxy in the *proxies * dictionary given in the
926926 constructor. The method will modify requests to go through the proxy, by
927927 calling ``request.set_proxy() ``, and call the next handler in the chain to
@@ -1177,7 +1177,7 @@ HTTPErrorProcessor Objects
11771177 For 200 error codes, the response object is returned immediately.
11781178
11791179 For non-200 error codes, this simply passes the job on to the
1180- :meth: `http_error_\< type\> ` handler methods, via :meth: `OpenerDirector.error `.
1180+ :meth: `! http_error_\< type\> ` handler methods, via :meth: `OpenerDirector.error `.
11811181 Eventually, :class: `HTTPDefaultErrorHandler ` will raise an
11821182 :exc: `~urllib.error.HTTPError ` if no other handler handles the error.
11831183
@@ -1284,7 +1284,7 @@ Use of Basic HTTP Authentication::
12841284:func: `build_opener ` provides many handlers by default, including a
12851285:class: `ProxyHandler `. By default, :class: `ProxyHandler ` uses the environment
12861286variables named ``<scheme>_proxy ``, where ``<scheme> `` is the URL scheme
1287- involved. For example, the :envvar: `http_proxy ` environment variable is read to
1287+ involved. For example, the :envvar: `! http_proxy ` environment variable is read to
12881288obtain the HTTP proxy's URL.
12891289
12901290This example replaces the default :class: `ProxyHandler ` with one that uses
@@ -1379,7 +1379,7 @@ some point in the future.
13791379 points to a local file, the object will not be copied unless filename is supplied.
13801380 Return a tuple ``(filename, headers) `` where *filename * is the
13811381 local file name under which the object can be found, and *headers * is whatever
1382- the :meth: `info ` method of the object returned by :func: `urlopen ` returned (for
1382+ the :meth: `! info ` method of the object returned by :func: `urlopen ` returned (for
13831383 a remote object). Exceptions are the same as for :func: `urlopen `.
13841384
13851385 The second argument, if present, specifies the file location to copy to (if
@@ -1404,7 +1404,7 @@ some point in the future.
14041404 :mimetype: `application/x-www-form-urlencoded ` format; see the
14051405 :func: `urllib.parse.urlencode ` function.
14061406
1407- :func: `urlretrieve ` will raise :exc: `ContentTooShortError ` when it detects that
1407+ :func: `urlretrieve ` will raise :exc: `~urllib.error. ContentTooShortError ` when it detects that
14081408 the amount of data available was less than the expected amount (which is the
14091409 size reported by a *Content-Length * header). This can occur, for example, when
14101410 the download is interrupted.
@@ -1413,8 +1413,8 @@ some point in the future.
14131413 urlretrieve reads more data, but if less data is available, it raises the
14141414 exception.
14151415
1416- You can still retrieve the downloaded data in this case, it is stored in the
1417- :attr: `content ` attribute of the exception instance.
1416+ You can still retrieve the downloaded data in this case, it is stored in the
1417+ :attr: `! content ` attribute of the exception instance.
14181418
14191419 If no *Content-Length * header was supplied, urlretrieve can not check the size
14201420 of the data it has downloaded, and just returns it. In this case you just have
@@ -1508,7 +1508,7 @@ some point in the future.
15081508 authentication is performed. For the 30x response codes, recursion is bounded
15091509 by the value of the *maxtries * attribute, which defaults to 10.
15101510
1511- For all other response codes, the method :meth: `http_error_default ` is called
1511+ For all other response codes, the method :meth: `~BaseHandler. http_error_default ` is called
15121512 which you can override in subclasses to handle the error appropriately.
15131513
15141514 .. note ::
0 commit comments