@@ -81,7 +81,7 @@ The :mod:`urllib.request` module defines the following functions:
8181
8282 * :meth: `~urllib.response.addinfourl.getcode ` -- return the HTTP status code of the response.
8383
84- Raises :exc: `URLError ` on errors.
84+ Raises :exc: `~urllib.error. URLError ` on errors.
8585
8686 Note that ``None `` may be returned if no handler handles the request (though
8787 the default installed global :class: `OpenerDirector ` uses
@@ -144,14 +144,14 @@ The :mod:`urllib.request` module defines the following functions:
144144
145145 Convert the pathname *path * from the local syntax for a path to the form used in
146146 the path component of a URL. This does not produce a complete URL. The return
147- value will already be quoted using the :func: `quote ` function.
147+ value will already be quoted using the :func: `~urllib.parse. quote ` function.
148148
149149
150150.. function :: url2pathname(path)
151151
152152 Convert the path component *path * from a percent-encoded URL to the local syntax for a
153- path. This does not accept a complete URL. This function uses :func: ` unquote `
154- to decode *path *.
153+ path. This does not accept a complete URL. This function uses
154+ :func: ` ~urllib.parse.unquote ` to decode *path *.
155155
156156.. function :: getproxies()
157157
@@ -245,7 +245,7 @@ The following classes are provided:
245245.. class :: HTTPDefaultErrorHandler()
246246
247247 A class which defines a default handler for HTTP error responses; all responses
248- are turned into :exc: `HTTPError ` exceptions.
248+ are turned into :exc: `~urllib.error. HTTPError ` exceptions.
249249
250250
251251.. class :: HTTPRedirectHandler()
@@ -582,8 +582,8 @@ sorting the handler instances.
582582
583583#. Handlers with a method named like :meth: `protocol_open ` are called to handle
584584 the request. This stage ends when a handler either returns a non-\ :const: `None `
585- value (ie. a response), or raises an exception (usually :exc: ` URLError `).
586- Exceptions are allowed to propagate.
585+ value (ie. a response), or raises an exception (usually
586+ :exc: ` ~urllib.error.URLError `). Exceptions are allowed to propagate.
587587
588588 In fact, the above algorithm is first tried for methods named
589589 :meth: `default_open `. If all such methods return :const: `None `, the algorithm
@@ -642,8 +642,9 @@ The following attribute and methods should only be used by classes derived from
642642 This method, if implemented, will be called by the parent
643643 :class: `OpenerDirector `. It should return a file-like object as described in
644644 the return value of the :meth: `open ` of :class: `OpenerDirector `, or ``None ``.
645- It should raise :exc: `URLError `, unless a truly exceptional thing happens (for
646- example, :exc: `MemoryError ` should not be mapped to :exc: `URLError `).
645+ It should raise :exc: `~urllib.error.URLError `, unless a truly exceptional
646+ thing happens (for example, :exc: `MemoryError ` should not be mapped to
647+ :exc: `URLError `).
647648
648649 This method will be called before any protocol-specific open method.
649650
@@ -729,8 +730,8 @@ HTTPRedirectHandler Objects
729730.. note ::
730731
731732 Some HTTP redirections require action from this module's client code. If this
732- is the case, :exc: `HTTPError ` is raised. See :rfc: `2616 ` for details of the
733- precise meanings of the various redirection codes.
733+ is the case, :exc: `~urllib.error. HTTPError ` is raised. See :rfc: `2616 ` for
734+ details of the precise meanings of the various redirection codes.
734735
735736 An :class: `HTTPError ` exception raised as a security consideration if the
736737 HTTPRedirectHandler is presented with a redirected url which is not an HTTP,
@@ -743,9 +744,9 @@ HTTPRedirectHandler Objects
743744 by the default implementations of the :meth: `http_error_30\* ` methods when a
744745 redirection is received from the server. If a redirection should take place,
745746 return a new :class: `Request ` to allow :meth: `http_error_30\* ` to perform the
746- redirect to *newurl *. Otherwise, raise :exc: `HTTPError ` if no other handler
747- should try to handle this URL, or return ``None `` if you can't but another
748- handler might.
747+ redirect to *newurl *. Otherwise, raise :exc: `~urllib.error. HTTPError ` if
748+ no other handler should try to handle this URL, or return ``None `` if you
749+ can't but another handler might.
749750
750751 .. note ::
751752
@@ -947,7 +948,7 @@ FileHandler Objects
947948
948949 .. versionchanged :: 3.2
949950 This method is applicable only for local hostnames. When a remote
950- hostname is given, an :exc: `URLError ` is raised.
951+ hostname is given, an :exc: `~urllib.error. URLError ` is raised.
951952
952953
953954.. _data-handler-objects :
@@ -1004,7 +1005,7 @@ UnknownHandler Objects
10041005
10051006.. method :: UnknownHandler.unknown_open()
10061007
1007- Raise a :exc: `URLError ` exception.
1008+ Raise a :exc: `~urllib.error. URLError ` exception.
10081009
10091010
10101011.. _http-error-processor-objects :
@@ -1021,7 +1022,7 @@ HTTPErrorProcessor Objects
10211022 For non-200 error codes, this simply passes the job on to the
10221023 :meth: `protocol_error_code ` handler methods, via :meth: `OpenerDirector.error `.
10231024 Eventually, :class: `HTTPDefaultErrorHandler ` will raise an
1024- :exc: `HTTPError ` if no other handler handles the error.
1025+ :exc: `~urllib.error. HTTPError ` if no other handler handles the error.
10251026
10261027
10271028.. method :: HTTPErrorProcessor.https_response()
@@ -1234,7 +1235,7 @@ some point in the future.
12341235 argument may be given to specify a ``POST `` request (normally the request
12351236 type is ``GET ``). The *data * argument must be a bytes object in standard
12361237 :mimetype: `application/x-www-form-urlencoded ` format; see the
1237- :func: `urlencode ` function below .
1238+ :func: `urllib.parse. urlencode ` function.
12381239
12391240 :func: `urlretrieve ` will raise :exc: `ContentTooShortError ` when it detects that
12401241 the amount of data available was less than the expected amount (which is the
@@ -1316,8 +1317,8 @@ some point in the future.
13161317 If the *url * uses the :file: `http: ` scheme identifier, the optional *data *
13171318 argument may be given to specify a ``POST `` request (normally the request type
13181319 is ``GET ``). The *data * argument must in standard
1319- :mimetype: `application/x-www-form-urlencoded ` format; see the :func: ` urlencode `
1320- function below .
1320+ :mimetype: `application/x-www-form-urlencoded ` format; see the
1321+ :func: ` urllib.parse.urlencode ` function .
13211322
13221323
13231324 .. attribute :: version
0 commit comments