Skip to content

[3.15] gh-69370: Fix "python -m inspect --details" for unencodable paths (GH-155246) - #156605

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-abf7a18-3.15
Oct 10, 2026
Merged

serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-abf7a18-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

It failed with UnicodeEncodeError if the path of the module contains
characters unencodable in the encoding of sys.stdout, e.g. undecodable
bytes of a file name. Such characters are now escaped with backslashes,
unless stdout uses an error handler which can handle them.
(cherry picked from commit abf7a18)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

…hs (pythonGH-155246)

It failed with UnicodeEncodeError if the path of the module contains
characters unencodable in the encoding of sys.stdout, e.g. undecodable
bytes of a file name.  Such characters are now escaped with backslashes,
unless stdout uses an error handler which can handle them.
(cherry picked from commit abf7a18)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bedevere-app bedevere-app Bot added the type-bug An unexpected behavior, bug, or error label Aug 29, 2026
@serhiy-storchaka
serhiy-storchaka merged commit 408ab8a into python:3.15 Oct 10, 2026
58 checks passed
@miss-islington
miss-islington deleted the backport-abf7a18-3.15 branch October 10, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants