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-44666: Use default encoding as fallback for compile_file #27236

Merged
merged 2 commits into from Jul 30, 2021

Conversation

@stefanhoelzl
Copy link
Contributor

@stefanhoelzl stefanhoelzl commented Jul 19, 2021

When sys.stdout.encoding is None compile_file will fall back to
sys.getdefaultencoding to encode/decode error messages.

https://bugs.python.org/issue44666

Copy link
Contributor

@BoboTiG BoboTiG left a comment

Thank you for the patch. Could you also add a NEWs entry please?

Lib/compileall.py Outdated Show resolved Hide resolved
@stefanhoelzl stefanhoelzl force-pushed the fix-compile-file branch 2 times, most recently from def5992 to 2c133a7 Jul 21, 2021
@stefanhoelzl
Copy link
Contributor Author

@stefanhoelzl stefanhoelzl commented Jul 21, 2021

Thanks for the review.

Thank you for the patch. Could you also add a NEWs entry please?

done

@stefanhoelzl stefanhoelzl force-pushed the fix-compile-file branch 2 times, most recently from 95eee2d to 490f7f6 Jul 21, 2021
When sys.stdout.encoding is None compile_file will fall back to
sys.getdefaultencoding to encode/decode error messages.
Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
Copy link
Contributor

@BoboTiG BoboTiG left a comment

👍 Thank you @stefanhoelzl.

@ambv ambv merged commit 80f0707 into python:main Jul 30, 2021
13 checks passed
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jul 30, 2021

Thanks @stefanhoelzl for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9.
🐍🍒🤖

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Jul 30, 2021

GH-27488 is a backport of this pull request to the 3.10 branch.

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Jul 30, 2021

GH-27489 is a backport of this pull request to the 3.9 branch.

miss-islington added a commit to miss-islington/cpython that referenced this issue Jul 30, 2021
…H-27236)

When sys.stdout.encoding is None compile_file will fall back to
sys.getdefaultencoding to encode/decode error messages.

Co-authored-by: Stefan Hoelzl <stefan.hoelzl@posteo.de>
Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
(cherry picked from commit 80f0707)

Co-authored-by: Stefan Hoelzl <1478183+stefanhoelzl@users.noreply.github.com>
miss-islington added a commit to miss-islington/cpython that referenced this issue Jul 30, 2021
…H-27236)

When sys.stdout.encoding is None compile_file will fall back to
sys.getdefaultencoding to encode/decode error messages.

Co-authored-by: Stefan Hoelzl <stefan.hoelzl@posteo.de>
Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
(cherry picked from commit 80f0707)

Co-authored-by: Stefan Hoelzl <1478183+stefanhoelzl@users.noreply.github.com>
ambv pushed a commit that referenced this issue Jul 30, 2021
… (GH-27488)

When sys.stdout.encoding is None compile_file will fall back to
sys.getdefaultencoding to encode/decode error messages.

Co-authored-by: Stefan Hoelzl <stefan.hoelzl@posteo.de>
Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
(cherry picked from commit 80f0707)
ambv pushed a commit that referenced this issue Jul 30, 2021
… (GH-27489)

When sys.stdout.encoding is None compile_file will fall back to
sys.getdefaultencoding to encode/decode error messages.

Co-authored-by: Stefan Hoelzl <stefan.hoelzl@posteo.de>
Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
(cherry picked from commit 80f0707)
JuniorJPDJ added a commit to JuniorJPDJ/cpython that referenced this issue Aug 12, 2021
…H-27236)

When sys.stdout.encoding is None compile_file will fall back to
sys.getdefaultencoding to encode/decode error messages.

Co-authored-by: Stefan Hoelzl <stefan.hoelzl@posteo.de>
Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants