From d5250ae1622d37bd052bb099d873868d8e6c5cd4 Mon Sep 17 00:00:00 2001 From: Michael Blahay Date: Tue, 25 Apr 2023 14:05:37 -0600 Subject: [PATCH] Adding note about url needing to be encodedwhen provided to the urlopen function as well as the Request class. --- Doc/library/urllib.request.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst index 64cc9c388ec30d..2727969c266892 100644 --- a/Doc/library/urllib.request.rst +++ b/Doc/library/urllib.request.rst @@ -28,7 +28,7 @@ The :mod:`urllib.request` module defines the following functions: .. function:: urlopen(url, data=None[, timeout], *, cafile=None, capath=None, cadefault=False, context=None) - Open the URL *url*, which can be either a string or a + Open the URL *url*, which can be either a string containing a valid, properly encoded, URL or a :class:`Request` object. *data* must be an object specifying additional data to be sent to the @@ -192,7 +192,7 @@ The following classes are provided: This class is an abstraction of a URL request. - *url* should be a string containing a valid URL. + *url* should be a string containing a valid, properly encoded, URL. *data* must be an object specifying additional data to send to the server, or ``None`` if no such data is needed. Currently HTTP