mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
socket: timeout may be None (#2801)
timeout=None puts the socket into blocking mode. Read <https://bugs.python.org/issue18417> and the referenced other issues for more gory details.
This commit is contained in:
committed by
Sebastian Rittau
parent
570fd6aff1
commit
b022f76516
@@ -537,7 +537,7 @@ class socket:
|
||||
@overload
|
||||
def getsockopt(self, level: int, optname: int, buflen: int) -> bytes: ...
|
||||
|
||||
def gettimeout(self) -> float: ...
|
||||
def gettimeout(self) -> Optional[float]: ...
|
||||
def ioctl(self, control: object,
|
||||
option: Tuple[int, int, int]) -> None: ...
|
||||
if sys.version_info < (3, 5):
|
||||
@@ -579,7 +579,7 @@ class socket:
|
||||
|
||||
# ----- functions -----
|
||||
def create_connection(address: Tuple[Optional[str], int],
|
||||
timeout: float = ...,
|
||||
timeout: Optional[float] = ...,
|
||||
source_address: Tuple[Union[bytearray, bytes, Text], int] = ...) -> socket: ...
|
||||
|
||||
# the 5th tuple item is an address
|
||||
|
||||
Reference in New Issue
Block a user