Skip to content

Commit bdcaea4

Browse files
authored
cgi: Add print_exception and print_arguments (#7359)
1 parent 12f45c5 commit bdcaea4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

stdlib/cgi.pyi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import sys
22
from _typeshed import Self, SupportsGetItem, SupportsItemAccess
33
from builtins import type as _type
44
from collections.abc import Iterable, Iterator, Mapping
5+
from types import TracebackType
56
from typing import IO, Any, Protocol
67

78
if sys.version_info >= (3, 8):
@@ -138,3 +139,11 @@ class FieldStorage:
138139
def __bool__(self) -> bool: ...
139140
# In Python 3 it returns bytes or str IO depending on an internal flag
140141
def make_file(self) -> IO[Any]: ...
142+
143+
def print_exception(
144+
type: type[BaseException] | None = ...,
145+
value: BaseException | None = ...,
146+
tb: TracebackType | None = ...,
147+
limit: int | None = ...,
148+
) -> None: ...
149+
def print_arguments() -> None: ...

tests/stubtest_allowlists/py3_common.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,6 @@ cgi.FieldStorage.read_multi
424424
cgi.FieldStorage.read_single
425425
cgi.FieldStorage.read_urlencoded
426426
cgi.FieldStorage.skip_lines
427-
cgi.print_arguments # internal testing/debugging helper
428-
cgi.print_exception # internal testing/debugging helper
429427
email.contentmanager.get_and_fixup_unknown_message_content
430428
email.contentmanager.get_message_content
431429
email.contentmanager.get_non_text_content

0 commit comments

Comments
 (0)