From 08649177f139e32ea67e557776b15b8b42270d80 Mon Sep 17 00:00:00 2001 From: Akuli Date: Mon, 6 Dec 2021 17:36:09 +0200 Subject: [PATCH] Add codecs.BOM* constants (#6515) --- stdlib/codecs.pyi | 5 +++++ tests/stubtest_allowlists/py3_common.txt | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/stdlib/codecs.pyi b/stdlib/codecs.pyi index 01e5903a5..63de22d99 100644 --- a/stdlib/codecs.pyi +++ b/stdlib/codecs.pyi @@ -5,6 +5,11 @@ from abc import abstractmethod from typing import IO, Any, BinaryIO, Callable, Generator, Iterable, Iterator, Protocol, TextIO, Tuple, Type, TypeVar, overload from typing_extensions import Literal +BOM32_BE: bytes +BOM32_LE: bytes +BOM64_BE: bytes +BOM64_LE: bytes + # TODO: this only satisfies the most common interface, where # bytes is the raw form and str is the cooked form. # In the long run, both should become template parameters maybe? diff --git a/tests/stubtest_allowlists/py3_common.txt b/tests/stubtest_allowlists/py3_common.txt index cb5bb9bb8..722c9dfe7 100644 --- a/tests/stubtest_allowlists/py3_common.txt +++ b/tests/stubtest_allowlists/py3_common.txt @@ -482,10 +482,6 @@ cgi.FieldStorage.read_urlencoded cgi.FieldStorage.skip_lines cgi.print_arguments cgi.print_exception -codecs.BOM32_BE -codecs.BOM32_LE -codecs.BOM64_BE -codecs.BOM64_LE codecs.StreamReader.charbuffertype codecs.StreamReader.seek codecs.StreamWriter.seek