Skip to content

gh-86427: Replace PyConfig.stdio_encoding with three separate members - #155417

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-86427-three-encodings
Open

gh-86427: Replace PyConfig.stdio_encoding with three separate members#155417
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-86427-three-encodings

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

PyConfig.stdin_encoding, PyConfig.stdout_encoding and PyConfig.stderr_encoding allow the standard streams to have different encodings. In the legacy Windows stdio mode they are initialized with the encoding of the device the corresponding stream is connected to, as suggested by @eryksun.

This removes a documented member of the public PyConfig, so it needs a decision about embedders. #155416 achieves the same result without changing the API, and #155415 is the minimal fix which is suitable for backporting.

…embers

PyConfig.stdin_encoding, PyConfig.stdout_encoding and
PyConfig.stderr_encoding allow the standard streams to have different
encodings.

In the legacy Windows stdio mode they are initialized with the encoding of
the device the corresponding stream is connected to, instead of the ANSI
code page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant