Add deprecation decorator and comments for pywin32 (#11570)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Avasam
2024-03-11 15:36:44 -04:00
committed by GitHub
parent 3802899a01
commit 579d208b19
11 changed files with 186 additions and 44 deletions

View File

@@ -1,5 +1,5 @@
from _typeshed import Incomplete
from typing_extensions import TypeAlias
from typing_extensions import TypeAlias, deprecated
import _win32typing
from win32.lib.pywintypes import com_error as com_error
@@ -69,6 +69,10 @@ def IsGatewayRegistered(iid: _win32typing.PyIID | None, /) -> int: ...
def LoadRegTypeLib(iid: _win32typing.PyIID, versionMajor, versionMinor, lcid, /) -> _win32typing.PyITypeLib: ...
def LoadTypeLib(libFileName: str, /) -> _win32typing.PyITypeLib: ...
def MakePyFactory(iid: _win32typing.PyIID, /) -> _win32typing.PyIClassFactory: ...
@deprecated("Use pywintypes.IID() instead.")
def MakeIID(iidString: str, is_bytes: bool = ..., /) -> _win32typing.PyIID: ...
@deprecated("Use pywintypes.Time() instead.")
def MakeTime(timeRepr, /) -> _win32typing.PyTime: ...
def MkParseDisplayName(
displayName: str, bindCtx: _win32typing.PyIBindCtx | None = ..., /
) -> tuple[_win32typing.PyIMoniker, Incomplete, _win32typing.PyIBindCtx]: ...