| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
… bytes "python -m pydoc -w" and the pydoc HTTP server failed with UnicodeEncodeError if the path of the documented module contained bytes undecodable in the filesystem encoding. The file URL is now created with urllib.request.pathname2url(), which percent-encodes the path using the filesystem encoding, and characters unencodable in the generated HTML page (which is always UTF-8) are escaped with backslashes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The file system can reject a name with undecodable bytes even if TESTFN_UNDECODABLE is not None (e.g. on macOS). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
test_html_doc contained the URL in the old format, in which the drive letter and backslashes of a Windows path were percent-encoded. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
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.
|
GH-156608 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
|
GH-156609 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
|
GH-156610 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
…e bytes (GH-155239) (GH-156609) "python -m pydoc -w" and the pydoc HTTP server failed with UnicodeEncodeError. The file URL is now created with urllib.request.pathname2url(), which percent-encodes the path using the filesystem encoding, and characters unencodable in the generated UTF-8 page are escaped with backslashes. (cherry picked from commit c8ca336) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
… bytes (pythonGH-155239) "python -m pydoc -w" and the pydoc HTTP server failed with UnicodeEncodeError. The file URL is now created with urllib.request.pathname2url(), which percent-encodes the path using the filesystem encoding, and characters unencodable in the generated UTF-8 page are escaped with backslashes. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e bytes (GH-155239) (GH-156610) "python -m pydoc -w" and the pydoc HTTP server failed with UnicodeEncodeError. The file URL is now created with urllib.request.pathname2url(), which percent-encodes the path using the filesystem encoding, and characters unencodable in the generated UTF-8 page are escaped with backslashes. (cherry picked from commit c8ca336) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e bytes (GH-155239) (GH-156608) "python -m pydoc -w" and the pydoc HTTP server failed with UnicodeEncodeError. The file URL is now created with urllib.request.pathname2url(), which percent-encodes the path using the filesystem encoding, and characters unencodable in the generated UTF-8 page are escaped with backslashes. (cherry picked from commit c8ca336) 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 |
python -m pydoc -w and the pydoc HTTP server failed with UnicodeEncodeError if the path of the documented module contains bytes undecodable in the filesystem encoding.
The file URL is now created with urllib.request.pathname2url(), which percent-encodes the path using the filesystem encoding, and characters unencodable in the generated HTML page (which is always UTF-8) are escaped with backslashes.