Commit e3a81cb
committed
GH-126212: Fix removal of slashes in file URIs on Windows
Adjust `urllib.request.pathname2url()` and `url2pathname()` so that they
don't remove slashes from Windows DOS drive paths and URLs. There was no
basis for this behaviour, and it conflicts with how UNC and POSIX paths are
handled.1 parent 951cb2c commit e3a81cb
File tree
3 files changed
+15
-20
lines changed- Lib
- test
- Misc/NEWS.d/next/Library
3 files changed
+15
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 33 | + | |
| 34 | + | |
43 | 35 | | |
44 | 36 | | |
45 | 37 | | |
| |||
60 | 52 | | |
61 | 53 | | |
62 | 54 | | |
63 | | - | |
64 | | - | |
| 55 | + | |
65 | 56 | | |
66 | 57 | | |
67 | 58 | | |
68 | 59 | | |
69 | 60 | | |
70 | 61 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 62 | + | |
| 63 | + | |
76 | 64 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1526 | 1526 | | |
1527 | 1527 | | |
1528 | 1528 | | |
1529 | | - | |
| 1529 | + | |
1530 | 1530 | | |
| 1531 | + | |
| 1532 | + | |
1531 | 1533 | | |
1532 | 1534 | | |
1533 | 1535 | | |
| |||
1563 | 1565 | | |
1564 | 1566 | | |
1565 | 1567 | | |
1566 | | - | |
| 1568 | + | |
1567 | 1569 | | |
1568 | 1570 | | |
1569 | 1571 | | |
1570 | 1572 | | |
1571 | 1573 | | |
1572 | 1574 | | |
| 1575 | + | |
| 1576 | + | |
1573 | 1577 | | |
1574 | 1578 | | |
1575 | 1579 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments