Skip to content

Commit a6f63ab

Browse files
committed
1 parent 127e4d2 commit a6f63ab

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

stdlib/urllib/response.pyi

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ from collections.abc import Callable, Iterable
44
from email.message import Message
55
from types import TracebackType
66
from typing import IO, Any
7+
from typing_extensions import deprecated
78

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

@@ -32,9 +33,18 @@ class addinfo(addbase):
3233

3334
class addinfourl(addinfo):
3435
url: str
35-
code: int | None
3636
@property
3737
def status(self) -> int | None: ...
3838
def __init__(self, fp: IO[bytes], headers: Message, url: str, code: int | None = None) -> None: ...
39+
@deprecated("Deprecated since Python 3.9. Use `addinfourl.url` attribute instead.")
3940
def geturl(self) -> str: ...
41+
@deprecated("Deprecated since Python 3.9. Use `addinfourl.headers` attribute instead.")
42+
def info(self) -> Message: ...
43+
@property
44+
@deprecated("Deprecated since Python 3.9. Use `addinfourl.status` attribute instead.")
45+
def code(self) -> int | None: ...
46+
@code.setter
47+
@deprecated("Deprecated since Python 3.9. Use `addinfourl.status` attribute instead.")
48+
def code(self, value: int | None) -> None: ...
49+
@deprecated("Deprecated since Python 3.9. Use `addinfourl.status` attribute instead.")
4050
def getcode(self) -> int | None: ...

0 commit comments

Comments
 (0)