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-34207: Fix pymain_read_conf() for UTF-8 Mode #8868

Merged
merged 1 commit into from Aug 23, 2018
Merged

bpo-34207: Fix pymain_read_conf() for UTF-8 Mode #8868

merged 1 commit into from Aug 23, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Aug 23, 2018

bpo-34170, bpo-34207: pymain_read_conf() now sets Py_UTF8Mode to
config->utf8_mode. pymain_read_conf() calls indirectly
Py_DecodeLocale() and Py_EncodeLocale() which depend on Py_UTF8Mode.

bpo-34170, bpo-34207: pymain_read_conf() now sets Py_UTF8Mode to
config->utf8_mode. pymain_read_conf() calls indirectly
Py_DecodeLocale() and Py_EncodeLocale() which depend on Py_UTF8Mode.
@vstinner
Copy link
Member Author

I tested manually that this change fix test_cmd_line on FreeBSD when run in an empty environment:

vstinner@freebsd$ env -i ./python -m test test_cmd_line
Run tests sequentially
0:00:00 load avg: 0.41 [1/1] test_cmd_line

== Tests result: SUCCESS ==

1 test OK.

Total duration: 5 sec 600 ms
Tests result: SUCCESS

@vstinner vstinner merged commit 89487f5 into python:master Aug 23, 2018
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @vstinner, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 89487f51b8d6ba8a55f5de0ed689e46fefe73cc9 3.7

@bedevere-bot
Copy link

GH-8870 is a backport of this pull request to the 3.7 branch.

vstinner added a commit that referenced this pull request Aug 23, 2018
bpo-34170, bpo-34207: pymain_read_conf() now sets Py_UTF8Mode to
config->utf8_mode. pymain_read_conf() calls indirectly
Py_DecodeLocale() and Py_EncodeLocale() which depend on Py_UTF8Mode.

(cherry picked from commit 89487f5)
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.

None yet

4 participants