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

Enable PEP-597 EncodingWarning in CI #3658

Closed
Zac-HD opened this issue Apr 24, 2023 · 1 comment · Fixed by #3763
Closed

Enable PEP-597 EncodingWarning in CI #3658

Zac-HD opened this issue Apr 24, 2023 · 1 comment · Fixed by #3763

Comments

@Zac-HD
Copy link
Contributor

Zac-HD commented Apr 24, 2023

PEP-597 added an option to warn when the encoding argument to open() is omitted and the default locale-specific encoding is used, because this can cause bugs when the locale is incorrectly assumed to be e.g. utf-8, which may not be the case on Windows, or various systems in e.g. Japan.

Setting PYTHONWARNDEFAULTENCODING=1 in CI, and fixing any existing issues, will ensure that downstream projects can also adopt this check without awkward workarounds.

@JelleZijlstra
Copy link
Collaborator

Agree, let's do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants