From 9bda254790c9e8feb70c35d5af00f0a687236dcb Mon Sep 17 00:00:00 2001 From: kovan Date: Tue, 3 Feb 2026 23:38:41 +0100 Subject: [PATCH] gh-129745: Fix urlparse example to properly parse params Changed the example from using 'scheme://' to 'http://' so that the params component is correctly parsed. The generic 'scheme' isn't in the list of schemes that support params, so the example was showing params remaining in the path rather than being extracted. Co-Authored-By: Claude Opus 4.5 --- Doc/library/urllib.parse.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst index ba6e46858f9d26..f171b0aa3b49db 100644 --- a/Doc/library/urllib.parse.rst +++ b/Doc/library/urllib.parse.rst @@ -69,8 +69,8 @@ or on combining URL components into a URL string. :options: +NORMALIZE_WHITESPACE >>> from urllib.parse import urlparse - >>> urlparse("scheme://netloc/path;parameters?query#fragment") - ParseResult(scheme='scheme', netloc='netloc', path='/path;parameters', params='', + >>> urlparse("http://netloc/path;parameters?query#fragment") + ParseResult(scheme='http', netloc='netloc', path='/path', params='parameters', query='query', fragment='fragment') >>> o = urlparse("http://docs.python.org:80/3/library/urllib.parse.html?" ... "highlight=params#url-parsing")