https://github.com/python/cpython/commit/89e2a5e0cbace2b3703bd6c0228350375fc298c7
commit: 89e2a5e0cbace2b3703bd6c0228350375fc298c7
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: orsenthil <[email protected]>
date: 2026-07-09T05:18:34Z
summary:

[3.13] gh-130578: clarify urllib.parse.quote parameter defaults behavior 
(GH-130598) (#153385)

gh-130578: clarify urllib.parse.quote parameter defaults behavior (GH-130598)
(cherry picked from commit bc9bb7386597e22693662f489a7474998788e228)

Co-authored-by: Kanishk Pachauri <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>

files:
M Doc/library/urllib.parse.rst

diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
index 752837593c7ca6..e501c6b29b2652 100644
--- a/Doc/library/urllib.parse.rst
+++ b/Doc/library/urllib.parse.rst
@@ -593,8 +593,9 @@ task isn't already covered by the URL parsing functions 
above.
 
    The optional *encoding* and *errors* parameters specify how to deal with
    non-ASCII characters, as accepted by the :meth:`str.encode` method.
-   *encoding* defaults to ``'utf-8'``.
-   *errors* defaults to ``'strict'``, meaning unsupported characters raise a
+   Although these parameters default to ``None`` in the function signature,
+   when processing :class:`str` inputs, *encoding* effectively defaults to 
``'utf-8'``
+   and *errors* to ``'strict'``, meaning unsupported characters raise a
    :class:`UnicodeEncodeError`.
    *encoding* and *errors* must not be supplied if *string* is a
    :class:`bytes`, or a :class:`TypeError` is raised.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to