Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-34485: Add _PyCoreConfig.stdio_encoding #8881

Merged
merged 1 commit into from
Aug 29, 2018
Merged

bpo-34485: Add _PyCoreConfig.stdio_encoding #8881

merged 1 commit into from
Aug 29, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Aug 23, 2018

  • 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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants