diff --git a/stdlib/urllib/request.pyi b/stdlib/urllib/request.pyi index 7ead36e90..ba7fe8cc3 100644 --- a/stdlib/urllib/request.pyi +++ b/stdlib/urllib/request.pyi @@ -21,7 +21,7 @@ from typing import ( overload, ) from urllib.error import HTTPError -from urllib.response import addinfourl +from urllib.response import addclosehook, addinfourl _T = TypeVar("_T") _UrlopenRet = Any @@ -155,6 +155,8 @@ class HTTPPasswordMgrWithPriorAuth(HTTPPasswordMgrWithDefaultRealm): class AbstractBasicAuthHandler: rx: ClassVar[Pattern[str]] # undocumented + passwd: HTTPPasswordMgr + add_password: Callable[[str, Union[str, Sequence[str]], str, str], None] def __init__(self, password_mgr: Optional[HTTPPasswordMgr] = ...) -> None: ... def http_error_auth_reqed(self, authreq: str, host: str, req: Request, headers: Mapping[str, str]) -> None: ... def http_request(self, req: Request) -> Request: ... # undocumented @@ -227,6 +229,12 @@ class ftpwrapper: # undocumented def __init__( self, user: str, passwd: str, host: str, port: int, dirs: str, timeout: Optional[float] = ..., persistent: bool = ... ) -> None: ... + def close(self) -> None: ... + def endtransfer(self) -> None: ... + def file_close(self) -> None: ... + def init(self) -> None: ... + def real_close(self) -> None: ... + def retrfile(self, file: str, type: str) -> Tuple[addclosehook, int]: ... class FTPHandler(BaseHandler): def ftp_open(self, req: Request) -> addinfourl: ...