From a7a6a32b0dfe24c20f4367f97641dedb360d1d78 Mon Sep 17 00:00:00 2001 From: Philipp Hahn Date: Wed, 20 Jan 2021 11:29:18 +0100 Subject: [PATCH] Add some urllib annotations also for Python 3 (#4951) --- stdlib/2/urllib2.pyi | 1 + stdlib/3/urllib/request.pyi | 2 ++ 2 files changed, 3 insertions(+) diff --git a/stdlib/2/urllib2.pyi b/stdlib/2/urllib2.pyi index 4468ad104..8c355db46 100644 --- a/stdlib/2/urllib2.pyi +++ b/stdlib/2/urllib2.pyi @@ -22,6 +22,7 @@ class Request(object): type: Optional[str] origin_req_host = ... unredirected_hdrs: Dict[str, str] + timeout: Optional[float] # Undocumented, only set after __init__() by OpenerDirector.open() def __init__( self, url: str, diff --git a/stdlib/3/urllib/request.pyi b/stdlib/3/urllib/request.pyi index 82816d9c8..bed840c00 100644 --- a/stdlib/3/urllib/request.pyi +++ b/stdlib/3/urllib/request.pyi @@ -58,8 +58,10 @@ class Request: selector: str data: Optional[bytes] headers: Dict[str, str] + unredirected_hdrs: Dict[str, str] unverifiable: bool method: Optional[str] + timeout: Optional[float] # Undocumented, only set after __init__() by OpenerDirector.open() def __init__( self, url: str,