Mark stdlib modules with upper version bounds (#5394)

* Mark stdlib modules with upper version bounds

* Add minus to all versions and enforce in check_consistent

* Fix check_consistent and mypy_test to work with new VERSIONS format
This commit is contained in:
Sebastian Rittau
2021-05-10 15:29:43 +02:00
committed by GitHub
parent 5e907afac7
commit 1eb64b4372
9 changed files with 636 additions and 613 deletions

View File

@@ -1,22 +1,22 @@
import sys
from _typeshed import AnyPath
from types import CodeType
from typing import Any, List, Sequence, Text, Tuple
if sys.version_info < (3, 10):
def expr(source: Text) -> STType: ...
def suite(source: Text) -> STType: ...
def sequence2st(sequence: Sequence[Any]) -> STType: ...
def tuple2st(sequence: Sequence[Any]) -> STType: ...
def st2list(st: STType, line_info: bool = ..., col_info: bool = ...) -> List[Any]: ...
def st2tuple(st: STType, line_info: bool = ..., col_info: bool = ...) -> Tuple[Any]: ...
def compilest(st: STType, filename: AnyPath = ...) -> CodeType: ...
def isexpr(st: STType) -> bool: ...
def issuite(st: STType) -> bool: ...
class ParserError(Exception): ...
class STType:
def compile(self, filename: AnyPath = ...) -> CodeType: ...
def isexpr(self) -> bool: ...
def issuite(self) -> bool: ...
def tolist(self, line_info: bool = ..., col_info: bool = ...) -> List[Any]: ...
def totuple(self, line_info: bool = ..., col_info: bool = ...) -> Tuple[Any]: ...
def expr(source: Text) -> STType: ...
def suite(source: Text) -> STType: ...
def sequence2st(sequence: Sequence[Any]) -> STType: ...
def tuple2st(sequence: Sequence[Any]) -> STType: ...
def st2list(st: STType, line_info: bool = ..., col_info: bool = ...) -> List[Any]: ...
def st2tuple(st: STType, line_info: bool = ..., col_info: bool = ...) -> Tuple[Any]: ...
def compilest(st: STType, filename: AnyPath = ...) -> CodeType: ...
def isexpr(st: STType) -> bool: ...
def issuite(st: STType) -> bool: ...
class ParserError(Exception): ...
class STType:
def compile(self, filename: AnyPath = ...) -> CodeType: ...
def isexpr(self) -> bool: ...
def issuite(self) -> bool: ...
def tolist(self, line_info: bool = ..., col_info: bool = ...) -> List[Any]: ...
def totuple(self, line_info: bool = ..., col_info: bool = ...) -> Tuple[Any]: ...