From 0e7b2e1acfb14904a015f54882b9a301c28ae49e Mon Sep 17 00:00:00 2001 From: Mike Patek Date: Mon, 30 Jan 2017 13:25:39 -0500 Subject: [PATCH] Add 'sys.is_finalizing' function (#898) Fixes #856 --- stdlib/3/sys.pyi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stdlib/3/sys.pyi b/stdlib/3/sys.pyi index 042fcf14c..b3042e2ec 100644 --- a/stdlib/3/sys.pyi +++ b/stdlib/3/sys.pyi @@ -7,6 +7,7 @@ from typing import ( List, Sequence, Any, Dict, Tuple, TextIO, overload, Optional, Union, TypeVar, Callable, Type, ) +import sys from types import TracebackType from mypy_extensions import NoReturn @@ -146,6 +147,10 @@ def getprofile() -> Any: ... # TODO return type def gettrace() -> Any: ... # TODO return def getwindowsversion() -> Any: ... # Windows only, TODO return type def intern(string: str) -> str: ... + +if sys.version_info >= (3, 5): + def is_finalizing() -> bool: ... + def setcheckinterval(interval: int) -> None: ... # deprecated def setdlopenflags(n: int) -> None: ... # Linux only def setprofile(profilefunc: Any) -> None: ... # TODO type