8000 gh-82150: Make urllib.parse.urlsplit and urllib.parse.urlunsplit preserve the '?' and '#' delimiters of empty query and fragment components by geryogam · Pull Request #15642 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-82150: Make urllib.parse.urlsplit and urllib.parse.urlunsplit preserve the '?' and '#' delimiters of empty query and fragment components #15642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 19 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update parse.py
  • Loading branch information
geryogam authored Sep 2, 2019
commit 050de62ef6b9e74315768af5c5e21c433642553f
3 changes: 2 additions & 1 deletion Lib/urllib/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ def urlsplit(url, scheme='', allow_fragments=True):
return _coerce_result(cached)
if len(_parse_cache) >= MAX_CACHE_SIZE: # avoid runaway growth
clear_cache()
netloc = query = fragment = None # no components NOR DELIMITERS
netloc = ''
query = fragment = None # no components NOR DELIMITERS
i = url.find(':')
if i > 0:
if url[:i] == 'http': # optimize the common case
Expand Down
0