cpython
d7339b4a - [3.14] gh-69371: Fix pydoc for modules whose path contains undecodable bytes (GH-155239) (GH-156609)

Commit
3 days ago
[3.14] gh-69371: Fix pydoc for modules whose path contains undecodable 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 c8ca336e6b321a4ff680ea426cc8a84bfb599bd2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Parents
Loading