◐ Shell
clean mode source ↗

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

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Merged

vstinner

merged 1 commit into

Aug 29, 2018

Conversation

@vstinner

  • 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

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.

Labels