From 71c87007f28574d7f4e74ce195e4982fb5d3ec64 Mon Sep 17 00:00:00 2001 From: pranavchoudhary-tech Date: Sat, 4 Jul 2026 04:02:35 +0530 Subject: [PATCH 1/2] gh-82151: Update and improve urlsplit docstring Co-authored-by: idomic --- Doc/library/urllib.parse.rst | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst index ef48addaba03e9c..239adc66da8a4ab 100644 --- a/Doc/library/urllib.parse.rst +++ b/Doc/library/urllib.parse.rst @@ -60,11 +60,16 @@ or on combining URL components into a URL string. *missing_as_none* is true. Not defined component are represented an empty string (by default) or ``None`` if *missing_as_none* is true. - The components are not broken up - into smaller parts (for example, the network location is a single string), and % - escapes are not expanded. The delimiters as shown above are not part of the - result, except for a leading slash in the *path* component, which is retained if - present. For example: + The delimiters as shown above are not part of the result, except for a + leading slash in the *path* component, which is retained if present. + + Additionally, the netloc property is broken down into these additional + attributes added to the returned object: username, password, hostname, and + port. + + % escapes are not decoded. + + For example: .. doctest:: :options: +NORMALIZE_WHITESPACE From 1df22ec843e1c8bad59e867a5c21954c191a0f5d Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Sun, 5 Jul 2026 19:50:06 -0700 Subject: [PATCH 2/2] Slightly improved wording for % escapes. Consistent with rest of the doc. --- Doc/library/urllib.parse.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst index 239adc66da8a4ab..3ce20311c42c849 100644 --- a/Doc/library/urllib.parse.rst +++ b/Doc/library/urllib.parse.rst @@ -67,7 +67,7 @@ or on combining URL components into a URL string. attributes added to the returned object: username, password, hostname, and port. - % escapes are not decoded. + Percent-encoded sequences are not decoded. For example: