Skip to content

GH-137059: url2pathname(): fix support for drive letter in netloc #137060

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

Merged
merged 2 commits into from
Jul 27, 2025
Merged
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
Test cases suggested by Serhiy
  • Loading branch information
barneygale committed Jul 27, 2025
commit 0b2f5a76ab849eeb8ff1e6c72c164f7ef9fcea87
2 changes: 2 additions & 0 deletions Lib/test/test_urllib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1590,8 +1590,10 @@ def test_url2pathname_resolve_host(self):
def test_url2pathname_win(self):
fn = urllib.request.url2pathname
self.assertEqual(fn('/C:/'), 'C:\\')
self.assertEqual(fn('//C:'), 'C:')
self.assertEqual(fn('//C:/'), 'C:\\')
self.assertEqual(fn('//C:\\'), 'C:\\')
self.assertEqual(fn('//C:80/'), 'C:80\\')
self.assertEqual(fn("///C|"), 'C:')
self.assertEqual(fn("///C:"), 'C:')
self.assertEqual(fn('///C:/'), 'C:\\')
Expand Down
Loading