Find text I/O that relies on the default encoding
ProprietaryPython 3.15 uses UTF-8 as the default text encoding whatever the locale (PEP 686). Marks text-mode open(), io.open(), pathlib.Path.open(), read_text(), write_text(), io.TextIOWrapper(), and subprocess calls with text=True or universal_newlines=True that pass no encoding. Pass encoding="utf-8", or encoding="locale" to keep the previous behaviour. A call whose mode is not a literal is not reported.
org. openrewrite. python. migrate. FindImplicitTextEncodingmod run . --recipe= org. openrewrite. python. migrate. FindImplicitTextEncodingInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.