Skip to content

Update http/__init__.pyi for Python3.12 #10296

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 1 commit into from
Jun 10, 2023
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
11 changes: 11 additions & 0 deletions stdlib/http/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ class HTTPStatus(IntEnum):
EARLY_HINTS: Literal[103]
IM_A_TEAPOT: Literal[418]
TOO_EARLY: Literal[425]
if sys.version_info >= (3, 12):
@property
def is_informational(self) -> bool: ...
@property
def is_success(self) -> bool: ...
@property
def is_redirection(self) -> bool: ...
@property
def is_client_error(self) -> bool: ...
@property
def is_server_error(self) -> bool: ...

if sys.version_info >= (3, 11):
class HTTPMethod(StrEnum):
Expand Down
5 changes: 0 additions & 5 deletions tests/stubtest_allowlists/py312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ enum.property.member
genericpath.__all__
genericpath.islink
gzip.GzipFile.filename
http.HTTPStatus.is_client_error
http.HTTPStatus.is_informational
http.HTTPStatus.is_redirection
http.HTTPStatus.is_server_error
http.HTTPStatus.is_success
http.client.HTTPConnection.get_proxy_response_headers
http.client.HTTPSConnection.__init__
imaplib.IMAP4_SSL.__init__
Expand Down