bpo-34485: Add _PyCoreConfig.stdio_encoding by vstinner · Pull Request #8881 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Merged

vstinner merged 1 commit intopython:masterfrom

vstinner:stdio_encoding

Aug 29, 2018

Merged

bpo-34485: Add _PyCoreConfig.stdio_encoding#8881

vstinner merged 1 commit intopython:masterfrom

vstinner:stdio_encoding

Conversation

@vstinner

Copy link Copy Markdown

Member

@vstinner vstinner commented

Aug 23, 2018

edited by bedevere-bot

Loading

  • Add stdio_encoding and stdio_errors fields to _PyCoreConfig
  • When PYTHONIOENCODING environment variable only contains an
    encoding, stdio_errors is now set explicitly to "strict".
  • Add some unit tests on stdio_encoding and stdio_errors.
  • Add _Py_ClearStandardStreamEncoding() private function.
  • pymain_free() now calls _Py_ClearStandardStreamEncoding().

https://bugs.python.org/issue34485

@vstinner

Copy link Copy Markdown

Member Author

Py_SetStandardStreamEncoding() sets Py_LegacyWindowsStdioFlag flag to 1 if the encoding is set. Do we also need to set Py_LegacyWindowsStdioFlag flag to 1 if stdio_encoding is set?

* Add stdio_encoding and stdio_errors fields to _PyCoreConfig
* Add unit tests on stdio_encoding and stdio_errors.

@vstinner vstinner merged commit dfe0dc7 into python:master

Aug 29, 2018

@vstinner vstinner deleted the stdio_encoding branch

August 29, 2018 09:49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ncoghlan ncoghlan Awaiting requested review from ncoghlan

@zooba zooba Awaiting requested review from zooba

@serhiy-storchaka serhiy-storchaka Awaiting requested review from serhiy-storchaka

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@vstinner @the-knights-who-say-ni @bedevere-bot