Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cgi: Add print_exception and print_arguments #7359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions stdlib/cgi.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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: ...
2 changes: 0 additions & 2 deletions tests/stubtest_allowlists/py3_common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down