aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Lib/urllib/parse.py
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.com>2024-09-17 19:54:19 +0300
committershadchin <shadchin@yandex-team.com>2024-09-17 20:04:48 +0300
commitad73802f079a708231d906dd7273a632db735851 (patch)
treed8b2b9f0b31430e69b777af21f63b432f4b92cc4 /contrib/tools/python3/Lib/urllib/parse.py
parent7c4e4744ae44dd94daa179458190817615f9e8a1 (diff)
downloadydb-ad73802f079a708231d906dd7273a632db735851.tar.gz
Update Python 3 to 3.12.6
commit_hash:43ed87a61b9efe3a87682fda1f0bff6f7b422cc9
Diffstat (limited to 'contrib/tools/python3/Lib/urllib/parse.py')
-rw-r--r--contrib/tools/python3/Lib/urllib/parse.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/tools/python3/Lib/urllib/parse.py b/contrib/tools/python3/Lib/urllib/parse.py
index 3932bb99c7e..24815952037 100644
--- a/contrib/tools/python3/Lib/urllib/parse.py
+++ b/contrib/tools/python3/Lib/urllib/parse.py
@@ -525,9 +525,13 @@ def urlunsplit(components):
empty query; the RFC states that these are equivalent)."""
scheme, netloc, url, query, fragment, _coerce_result = (
_coerce_args(*components))
- if netloc or (scheme and scheme in uses_netloc) or url[:2] == '//':
+ if netloc:
if url and url[:1] != '/': url = '/' + url
- url = '//' + (netloc or '') + url
+ url = '//' + netloc + url
+ elif url[:2] == '//':
+ url = '//' + url
+ elif scheme and scheme in uses_netloc and (not url or url[:1] == '/'):
+ url = '//' + url
if scheme:
url = scheme + ':' + url
if query: