| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
urllib.request.pathname2url() and url2pathname() use the filesystem encoding and error handler since pythongh-85168, but nturl2path, which implements them on Windows before 3.14, was left unchanged. Paths containing surrogate characters raised UnicodeEncodeError.
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
Sorry, something went wrong.
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict. cherry_picker 01599e203e25610421bb5df413f32fa0848f3ade 3.13 |
Sorry, something went wrong.
|
GH-157423 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
|
GH-157424 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
|
GH-157425 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
… (GH-157424) urllib.request.pathname2url() and url2pathname() use the filesystem encoding and error handler since gh-85168, but nturl2path, which implements them on Windows before 3.14, was left unchanged. Paths containing surrogate characters raised UnicodeEncodeError. (cherry picked from commit 01599e2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
… (GH-157425) urllib.request.pathname2url() and url2pathname() use the filesystem encoding and error handler since gh-85168, but nturl2path, which implements them on Windows before 3.14, was left unchanged. Paths containing surrogate characters raised UnicodeEncodeError. (cherry picked from commit 01599e2)
…156717) urllib.request.pathname2url() and url2pathname() use the filesystem encoding and error handler since pythongh-85168, but nturl2path, which implements them on Windows before 3.14, was left unchanged. Paths containing surrogate characters raised UnicodeEncodeError.
… (GH-157423) urllib.request.pathname2url() and url2pathname() use the filesystem encoding and error handler since gh-85168, but nturl2path, which implements them on Windows before 3.14, was left unchanged. Paths containing surrogate characters raised UnicodeEncodeError. (cherry picked from commit 01599e2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> * gh-156713: Fix test_nturl2path for non-UTF-8 filesystem encodings Since nturl2path uses the filesystem encoding, the expected results of quoting non-ASCII characters depend on it. Use os_helper.FS_NONASCII and os_helper.TESTFN_UNDECODABLE, and skip the tests when there is no suitable character or byte sequence for the current encoding. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> (cherry picked from commit 3e1b5d8) --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
urllib.request.pathname2url() and url2pathname() use the filesystem encoding and error handler since gh-85168, but the nturl2path module, which implemented them on Windows before 3.14, was left unchanged. Paths containing surrogate characters raised UnicodeEncodeError.