Skip to content

Commit b6eec58

Browse files
JelleZijlstragvanrossum
authored andcommitted
remove checks against patch versions (#987)
Both mypy and pytype only use the major and minor version in type checking. Using checks like "sys.version_info >= (3, 4, 4)" won't actually work properly for people type checking their code using version 3.4, because (3, 4) >= (3, 4, 4) will always be false (at least in mypy's approach; not sure if pytype is different).
1 parent 2dbb5f0 commit b6eec58

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

stdlib/2and3/asynchat.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class async_chat (asyncore.dispatcher):
3131
def initiate_send(self) -> None: ...
3232
def discard_buffers(self) -> None: ...
3333

34-
if sys.version_info < (3, 0, 0):
34+
if sys.version_info < (3, 0):
3535
class fifo:
3636
def __init__(self, list: Sequence[Union[str, simple_producer]] = ...) -> None: ...
3737
def __len__(self) -> int: ...

stdlib/3/email/message.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class MIMEPart:
118118
**kw: Any) -> None: ...
119119
def clear(self) -> None: ...
120120
def clear_content(self) -> None: ...
121-
if sys.version_info >= (3, 4, 2):
121+
if sys.version_info >= (3, 4):
122122
def is_attachment(self) -> bool: ...
123123
else:
124124
@property

stdlib/3/ssl.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ if sys.version_info >= (3, 4):
4646
capath: Optional[str] = ...,
4747
cadata: Optional[str] = ...) -> 'SSLContext': ...
4848

49-
if sys.version_info >= (3, 4, 3):
5049
def _create_unverified_context(protocol: int = ..., *,
5150
cert_reqs: int = ...,
5251
check_hostname: bool = ...,
@@ -94,7 +93,6 @@ if sys.version_info >= (3, 4):
9493
VERIFY_CRL_CHECK_LEAF = ... # type: int
9594
VERIFY_CRL_CHECK_CHAIN = ... # type: int
9695
VERIFY_X509_STRICT = ... # type: int
97-
if sys.version_info >= (3, 4, 4):
9896
VERIFY_X509_TRUSTED_FIRST = ... # type: int
9997

10098
PROTOCOL_SSLv23 = ... # type: int

0 commit comments

Comments
 (0)