Skip to content
Merged
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
7 changes: 6 additions & 1 deletion stdlib/urllib/response.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ from collections.abc import Callable, Iterable
from email.message import Message
from types import TracebackType
from typing import IO, Any
from typing_extensions import deprecated

__all__ = ["addbase", "addclosehook", "addinfo", "addinfourl"]

Expand Down Expand Up @@ -32,9 +33,13 @@ class addinfo(addbase):

class addinfourl(addinfo):
url: str
code: int | None
code: int | None # Deprecated since Python 3.9. Use `addinfourl.status` attribute instead.
@property
def status(self) -> int | None: ...
def __init__(self, fp: IO[bytes], headers: Message, url: str, code: int | None = None) -> None: ...
@deprecated("Deprecated since Python 3.9. Use `addinfourl.url` attribute instead.")
def geturl(self) -> str: ...
@deprecated("Deprecated since Python 3.9. Use `addinfourl.headers` attribute instead.")
def info(self) -> Message: ...
@deprecated("Deprecated since Python 3.9. Use `addinfourl.status` attribute instead.")
def getcode(self) -> int | None: ...