Repository navigation
Commit 2f55359
committed
Fix _url_tools.url_quote for Python ≥ 3.14
Starting in Python 3.14 (python/cpython#127194),
urllib.request.pathname2url returns URLs with a leading '//' for
absolute input paths on POSIX. For compatibility, restore the
traditional behavior. All callers prepend their own scheme including the
'//'.
This fixes these tests by resolving string-equality AssertionErrors:
- tests/test_osfs.py::TestOSFS::test_complex_geturl
- tests/test_subfs.py::TestOSFS::test_complex_geturl
- tests/test_subfs.py::TestSubFS::test_complex_geturl
- tests/test_tarfs.py::TestReadTarFS::test_geturl_for_fs
- tests/test_tarfs.py::TestReadTarFSMem::test_geturl_for_fs
- tests/test_tempfs.py::TestOSFS::test_complex_geturl
- tests/test_tempfs.py::TestTempFS::test_complex_geturl
- tests/test_zipfs.py::TestReadZipFS::test_geturl_for_fs
- tests/test_zipfs.py::TestReadZipFSMem::test_geturl_for_fs1 parent 77a8562 commit 2f55359
1 file changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | | - | |
35 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
36 | 47 | | |
37 | 48 | | |
38 | 49 | | |
| |||
0 commit comments