From c1df736a8c39e1400f182e674cf8698d6da006af Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Fri, 23 Jun 2023 10:35:33 -0400 Subject: [PATCH] Add `_is_text_encoding` attribute of CodecInfo (3.4+) (#10354) Introduced in https://bugs.python.org/issue19619. Was meant to be a temporary private API, but no public API has emerged in the years since. --- stdlib/codecs.pyi | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/codecs.pyi b/stdlib/codecs.pyi index 3f6d2d3d1..c9b6a4a82 100644 --- a/stdlib/codecs.pyi +++ b/stdlib/codecs.pyi @@ -96,6 +96,7 @@ class _IncrementalDecoder(Protocol): def __call__(self, errors: str = ...) -> IncrementalDecoder: ... class CodecInfo(tuple[_Encoder, _Decoder, _StreamReader, _StreamWriter]): + _is_text_encoding: bool @property def encode(self) -> _Encoder: ... @property