mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Add new sys functions introduced to combat CVE-2020-10735 (#8733)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
@@ -190,11 +190,15 @@ class _implementation:
|
||||
int_info: _int_info
|
||||
|
||||
@final
|
||||
class _int_info(structseq[int], tuple[int, int]):
|
||||
class _int_info(structseq[int], tuple[int, int, int, int]):
|
||||
@property
|
||||
def bits_per_digit(self) -> int: ...
|
||||
@property
|
||||
def sizeof_digit(self) -> int: ...
|
||||
@property
|
||||
def default_max_str_digits(self) -> int: ...
|
||||
@property
|
||||
def str_digits_check_threshold(self) -> int: ...
|
||||
|
||||
@final
|
||||
class _version_info(_UninstantiableStructseq, tuple[int, int, int, str, int]):
|
||||
@@ -328,3 +332,8 @@ if sys.version_info < (3, 8):
|
||||
_CoroWrapper: TypeAlias = Callable[[Coroutine[Any, Any, Any]], Any]
|
||||
def set_coroutine_wrapper(__wrapper: _CoroWrapper) -> None: ...
|
||||
def get_coroutine_wrapper() -> _CoroWrapper: ...
|
||||
|
||||
# The following two functions were added in 3.11.0, 3.10.7, 3.9.14, 3.8.14, & 3.7.14,
|
||||
# as part of the response to CVE-2020-10735
|
||||
def set_int_max_str_digits(maxdigits: int) -> None: ...
|
||||
def get_int_max_str_digits() -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user