diff --git a/stdlib/cgi.pyi b/stdlib/cgi.pyi index 88ca577d9bd2..1c11beec0c35 100644 --- a/stdlib/cgi.pyi +++ b/stdlib/cgi.pyi @@ -2,6 +2,7 @@ import sys from _typeshed import Self, SupportsGetItem, SupportsItemAccess from builtins import type as _type from collections.abc import Iterable, Iterator, Mapping +from types import TracebackType from typing import IO, Any, Protocol if sys.version_info >= (3, 8): @@ -138,3 +139,11 @@ class FieldStorage: def __bool__(self) -> bool: ... # In Python 3 it returns bytes or str IO depending on an internal flag def make_file(self) -> IO[Any]: ... + +def print_exception( + type: type[BaseException] | None = ..., + value: BaseException | None = ..., + tb: TracebackType | None = ..., + limit: int | None = ..., +) -> None: ... +def print_arguments() -> None: ... diff --git a/tests/stubtest_allowlists/py3_common.txt b/tests/stubtest_allowlists/py3_common.txt index c37e12f26f9e..4edc04fab78a 100644 --- a/tests/stubtest_allowlists/py3_common.txt +++ b/tests/stubtest_allowlists/py3_common.txt @@ -424,8 +424,6 @@ cgi.FieldStorage.read_multi cgi.FieldStorage.read_single cgi.FieldStorage.read_urlencoded cgi.FieldStorage.skip_lines -cgi.print_arguments # internal testing/debugging helper -cgi.print_exception # internal testing/debugging helper email.contentmanager.get_and_fixup_unknown_message_content email.contentmanager.get_message_content email.contentmanager.get_non_text_content