Commit 5fb443d
[3.12] pythonGH-126212: Fix removal of slashes in file URIs on Windows (pythonGH-126214) (python#126591)
pythonGH-126212: Fix removal of slashes in file URIs on Windows (pythonGH-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 69849ad commit 5fb443d
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 | |
|---|---|---|---|
| |||
1535 | 1535 | | |
1536 | 1536 | | |
1537 | 1537 | | |
1538 | | - | |
| 1538 | + | |
1539 | 1539 | | |
| 1540 | + | |
| 1541 | + | |
1540 | 1542 | | |
1541 | 1543 | | |
1542 | 1544 | | |
| |||
1572 | 1574 | | |
1573 | 1575 | | |
1574 | 1576 | | |
1575 | | - | |
| 1577 | + | |
1576 | 1578 | | |
1577 | 1579 | | |
1578 | 1580 | | |
1579 | 1581 | | |
1580 | 1582 | | |
1581 | 1583 | | |
| 1584 | + | |
| 1585 | + | |
1582 | 1586 | | |
1583 | 1587 | | |
1584 | 1588 | | |
| |||
1592 | 1596 | | |
1593 | 1597 | | |
1594 | 1598 | | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
1595 | 1602 | | |
1596 | 1603 | | |
1597 | 1604 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments