From ce940efc01ded9fa3ab6c5040aa7a02e14d9826c Mon Sep 17 00:00:00 2001 From: peterdotran Date: Wed, 24 Aug 2016 06:10:56 -0700 Subject: [PATCH] email.utils.parsedate and email.utils.parsedate_tz corrected to be passable to time.mktime (#497) Also email.utils.parsedate_tz 10th element can be None if no timezone is specified --- stdlib/3/email/utils.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/3/email/utils.pyi b/stdlib/3/email/utils.pyi index f3720e410677..929250098ebd 100644 --- a/stdlib/3/email/utils.pyi +++ b/stdlib/3/email/utils.pyi @@ -5,7 +5,7 @@ from email.charset import Charset import datetime _ParamType = Union[str, Tuple[Optional[str], Optional[str], str]] -_PDTZ = Tuple[str, str, str, str, str, str, str, str, str, str] +_PDTZ = Tuple[int, int, int, int, int, int, int, int, int, Optional[int]] def quote(str: str) -> str: ... def unquote(str: str) -> str: ... @@ -13,7 +13,7 @@ def parseaddr(address: str) -> Tuple[str, str]: ... def formataddr(pair: Tuple[str, str], charset: Union[str, Charset] = ...) -> str: ... def getaddresses(fieldvalues: List[str]) -> List[Tuple[str, str]]: ... -def parsedate(date: str) -> Optional[Tuple[str, str, str, str, str, str, str, str, str]]: ... +def parsedate(date: str) -> Optional[Tuple[int, int, int, int, int, int, int, int, int]]: ... def parsedate_tz(date: str) -> Optional[_PDTZ]: ... def parsedate_to_datetime(date: str) -> datetime.datetime: ... def mktime_tz(tuple: _PDTZ) -> int: ...