diff options
author | Inada Naoki <songofacandy@gmail.com> | 2025-04-30 01:11:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-30 01:11:09 (GMT) |
commit | 4e294f6feb3193854d23e0e8be487213a80b232f (patch) | |
tree | 5bd03678ff6136ef2a7ffb03a088388c275713c7 /Lib/_pyio.py | |
parent | 732d1b02417e91d6a4247879e290065287cc6b51 (diff) | |
download | cpython-4e294f6feb3193854d23e0e8be487213a80b232f.zip cpython-4e294f6feb3193854d23e0e8be487213a80b232f.tar.gz cpython-4e294f6feb3193854d23e0e8be487213a80b232f.tar.bz2 |
gh-133036: Deprecate codecs.open (#133038)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib/_pyio.py')
-rw-r--r-- | Lib/_pyio.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py index b875103..a870de5 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@ -2056,8 +2056,7 @@ class TextIOWrapper(TextIOBase): raise ValueError("invalid encoding: %r" % encoding) if not codecs.lookup(encoding)._is_text_encoding: - msg = ("%r is not a text encoding; " - "use codecs.open() to handle arbitrary codecs") + msg = "%r is not a text encoding" raise LookupError(msg % encoding) if errors is None: |