◐ Shell
clean mode source ↗

bpo-43510: Implement PEP 597 opt-in EncodingWarning. by methane · Pull Request #19481 · python/cpython

The warning is raised only in dev mode.

pathlib uses the new `io.text_encoding` helper function.
Other libraries will follow.

@methane

@methane methane changed the title PEP 597: Raise a warning when encoding is omitted PEP 597: Emit EncodingWarning when encoding is omitted

Jan 30, 2021
sys.flags.encoding_warning -> warn_default_encoding
-X warn_encoding -> warn_default_encoding
PYTHONWARNENCODING -> PYTHONWARNDEFAULTENCODING

@methane methane changed the title PEP 597: Emit EncodingWarning when encoding is omitted bpo-43510: Add encoding="locale" and optional EncodingWarning

Mar 16, 2021

@methane

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>

CAM-Gerlach

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>

methane

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>

methane

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>

CAM-Gerlach

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>

chris-allan added a commit to chris-allan/omero-web that referenced this pull request

Oct 10, 2022