Commit 20043d5
GH-126212: Fix removal of slashes in file URIs on Windows (GH-126214)
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.
(cherry picked from commit 54c63a3)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
1 parent b1a406d commit 20043d5
File tree
3 files changed
+18
-21
lines changed- Lib
- test
- Misc/NEWS.d/next/Library
3 files changed
+18
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | | - | |
| 28 | + | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 34 | + | |
| 35 | + | |
44 | 36 | | |
45 | 37 | | |
46 | 38 | | |
| |||
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 | | - | |
76 | | - | |
| 62 | + | |
| 63 | + | |
| 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 | | |
| |||
1583 | 1587 | | |
1584 | 1588 | | |
1585 | 1589 | | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
1586 | 1593 | | |
1587 | 1594 | | |
1588 | 1595 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments