Skip to content

Enable PEP-597 EncodingWarning in CI #3658

Closed
@Zac-HD

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions