On Thu, 11 Feb 2021 at 21:05, Jim J. Jewett <jimjjew...@gmail.com> wrote: > > 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?
That's a very good point. If this warning is of use, why have none of the well-known linters implemented it? And why not prototype the proposal in them, at least? Python-ideas posts routinely get pushed to justify "why can't this be done in an external library?" and that probably applies here too. Paul _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/VRBGH3ECNJBZMX7LINDNXYHQSKTKRTEX/ Code of Conduct: http://python.org/psf/codeofconduct/