11 Feb
2021
11 Feb
'21
8:59 p.m.
Who will benefit from this new warning? Is this basically just changing builtins.open by adding: if encoding is None and sys.flags.encoding_warning: # and not Android and not -X utf8 ? warnings.warn(EncodingWarning("Are you sure you want locale instead of utf-8?")) Even for the few people with the knowledge, time, interest, and authority to fix the code, is that really helpful? Helpful enough to put it directly in python as an optional mode, separate from the dev mode or show all warnings mode? Why not just add it to a linter, or write a 2to3 style checker? Or at least emit or not based on a warnings filter? -jJ