2
2
from _typeshed import Incomplete , Unused
3
3
from collections .abc import Iterable
4
4
from typing import Literal , final , overload
5
- from typing_extensions import Self
5
+ from typing_extensions import Self , TypeAlias , deprecated
6
6
7
7
class ArgNotFound : ...
8
8
class PyOleEmpty : ...
@@ -123,7 +123,12 @@ class FORM_INFO_1:
123
123
def ImageableArea (self ): ...
124
124
125
125
class ImportCallback : ...
126
- class LARGE_INTEGER : ...
126
+
127
+ # Note: Don't use these, use `int` instead. Or an overload with a deprecation message on the tuple param.
128
+ # We're only keeping these here as a reminder when typing from source code.
129
+ # Deprecated: Support for passing 2 integers to create a 64bit value is deprecated - pass a long instead
130
+ LARGE_INTEGER : TypeAlias = int | tuple [int , int ]
131
+ ULARGE_INTEGER : TypeAlias = int | tuple [int , int ]
127
132
128
133
class NCB :
129
134
@property
@@ -164,6 +169,12 @@ class PRINTER_DEFAULTS:
164
169
class PyACL :
165
170
def Initialize (self ) -> None : ...
166
171
def IsValid (self ) -> bool : ...
172
+ @deprecated (
173
+ """\
174
+ Early versions of this function supported only two arguments. \
175
+ This has been deprecated in preference of the three argument version, \
176
+ which reflects the win32 API and the new functions in this module."""
177
+ )
167
178
@overload
168
179
def AddAccessAllowedAce (self , access : int , sid : PySID , / ) -> None : ...
169
180
@overload
@@ -172,7 +183,16 @@ class PyACL:
172
183
def AddAccessAllowedObjectAce (
173
184
self , AceRevision , AceFlags , AccessMask , ObjectTypeGuid : PyIID , InheritedObjectTypeGuid : PyIID , sid : PySID , /
174
185
) -> None : ...
175
- def AddAccessDeniedAce (self , revision : int , access : int , sid : PySID , access1 : int , sid1 : PySID , / ) -> None : ...
186
+ @deprecated (
187
+ """\
188
+ Early versions of this function supported only two arguments. \
189
+ This has been deprecated in preference of the three argument version, \
190
+ which reflects the win32 API and the new functions in this module."""
191
+ )
192
+ @overload
193
+ def AddAccessDeniedAce (self , access : int , sid : PySID , / ) -> None : ...
194
+ @overload
195
+ def AddAccessDeniedAce (self , revision : int , access : int , sid : PySID , / ) -> None : ...
176
196
def AddAccessDeniedAceEx (self , revision : int , aceflags : int , access : int , sid : PySID , / ) -> None : ...
177
197
def AddMandatoryAce (self , AceRevision , AceFlags , MandatoryPolicy , LabelSid : PySID , / ) -> None : ...
178
198
def AddAuditAccessAce (self , dwAceRevision , dwAccessMask , sid : PySID , bAuditSuccess , bAuditFailure , / ) -> None : ...
@@ -217,10 +237,17 @@ class PyCEHANDLE: ...
217
237
class PyCERTSTORE :
218
238
@property
219
239
def HCERTSTORE (self ): ...
220
- # Flags argument is deprecated.
221
- # The underlying function is now always called with `CERT_CLOSE_STORE_CHECK_FLAG`,
222
- # and support for this param will be dropped at some point in the future.
223
- def CertCloseStore (self , Flags : int = ...) -> None : ...
240
+ @overload
241
+ def CertCloseStore (self ) -> None : ...
242
+ @deprecated (
243
+ """\
244
+ `Flags` argument has been deprecated as it is likely to crash the process if \
245
+ `CERT_CLOSE_STORE_FORCE_FLAG` is specified. The underlying function is now \
246
+ always called with `CERT_CLOSE_STORE_CHECK_FLAG`, and support for this \
247
+ param will be dropped at some point in the future."""
248
+ )
249
+ @overload
250
+ def CertCloseStore (self , Flags : int ) -> None : ...
224
251
def CertControlStore (self , Flags , CtrlType , CtrlPara : int ) -> None : ...
225
252
def CertEnumCertificatesInStore (self ) -> list [PyCERT_CONTEXT ]: ...
226
253
def CertEnumCTLsInStore (self ) -> list [PyCTL_CONTEXT ]: ...
@@ -2403,7 +2430,6 @@ class SERVICE_STATUS:
2403
2430
def __getitem__ (self , i : int , / ) -> int : ...
2404
2431
2405
2432
class TRACKMOUSEEVENT : ...
2406
- class ULARGE_INTEGER : ...
2407
2433
class WIN32_FIND_DATA : ...
2408
2434
class com_error : ...
2409
2435
@@ -3682,7 +3708,11 @@ class PyIInternetPriority:
3682
3708
3683
3709
class PyIInternetProtocol :
3684
3710
def Read (self , cb , / ) -> None : ...
3685
- def Seek (self , dlibMove : LARGE_INTEGER , dwOrigin , / ) -> None : ...
3711
+ @overload
3712
+ @deprecated ("Support for passing two ints to create a 64-bit value is deprecated; pass a single int instead" )
3713
+ def Seek (self , dlibMove : tuple [int , int ], dwOrigin , / ) -> None : ...
3714
+ @overload
3715
+ def Seek (self , dlibMove : int , dwOrigin , / ) -> None : ...
3686
3716
def LockRequest (self , dwOptions , / ) -> None : ...
3687
3717
def UnlockRequest (self ) -> None : ...
3688
3718
@@ -3741,13 +3771,32 @@ class PyIKnownFolderManager:
3741
3771
def Redirect (self , _id : PyIID , hwnd : int , flags , TargetPath , Exclusion : tuple [PyIID , ...], / ) -> None : ...
3742
3772
3743
3773
class PyILockBytes :
3744
- def ReadAt (self , ulOffset : ULARGE_INTEGER , cb , / ) -> str : ...
3745
- def WriteAt (self , ulOffset : ULARGE_INTEGER , data : str , / ): ...
3774
+ @overload
3775
+ @deprecated ("Support for passing two ints to create a 64-bit value is deprecated; pass a single int instead" )
3776
+ def ReadAt (self , ulOffset : tuple [int , int ], cb , / ) -> str : ...
3777
+ @overload
3778
+ def ReadAt (self , ulOffset : int , cb , / ) -> str : ...
3779
+ @overload
3780
+ @deprecated ("Support for passing two ints to create a 64-bit value is deprecated; pass a single int instead" )
3781
+ def WriteAt (self , ulOffset : tuple [int , int ], data : str , / ): ...
3782
+ @overload
3783
+ def WriteAt (self , ulOffset : int , data : str , / ): ...
3746
3784
def Flush (self ) -> None : ...
3747
- def SetSize (self , cb : ULARGE_INTEGER , / ) -> None : ...
3748
- def LockRegion (self , libOffset : ULARGE_INTEGER , cb : ULARGE_INTEGER , dwLockType , / ) -> None : ...
3749
- def UnlockRegion (self , libOffset : ULARGE_INTEGER , cb : ULARGE_INTEGER , dwLockType , / ) -> None : ...
3750
- def Stat (self , grfStatFlag , / ) -> STATSTG : ...
3785
+ @overload
3786
+ @deprecated ("Support for passing two ints to create a 64-bit value is deprecated; pass a single int instead" )
3787
+ def SetSize (self , cb : tuple [int , int ], / ) -> None : ...
3788
+ @overload
3789
+ def SetSize (self , cb : int , / ) -> None : ...
3790
+ @overload
3791
+ @deprecated ("Support for passing two ints to create a 64-bit value is deprecated; pass a single int instead" )
3792
+ def LockRegion (self , libOffset : tuple [int , int ], cb : tuple [int , int ], dwLockType , / ) -> None : ...
3793
+ @overload
3794
+ def LockRegion (self , libOffset : int , cb : int , dwLockType , / ) -> None : ...
3795
+ @overload
3796
+ @deprecated ("Support for passing two ints to create a 64-bit value is deprecated; pass a single int instead" )
3797
+ def UnlockRegion (self , libOffset : tuple [int , int ], cb : tuple [int , int ], dwLockType , / ) -> None : ...
3798
+ @overload
3799
+ def UnlockRegion (self , libOffset : int , cb : int , dwLockType , / ) -> None : ...
3751
3800
3752
3801
class PyIMAPIContainer :
3753
3802
def OpenEntry (self , entryId : str , iid : PyIID , flags , / ): ...
@@ -3882,6 +3931,7 @@ class PyIMsgServiceAdmin:
3882
3931
def GetMsgServiceTable (self , flags , / ) -> PyIMAPITable : ...
3883
3932
def GetProviderTable (self , flags , / ) -> PyIMAPITable : ...
3884
3933
def DeleteMsgService (self , uuid : PyIID , / ) -> None : ...
3934
+ @deprecated ("This is deprecated, and there is no replacement referenced to use instead." )
3885
3935
def RenameMsgService (self , uuid : PyIID , flags , newName : str , / ) -> None : ...
3886
3936
def OpenProfileSection (self , uuid : PyIID , iid : PyIID , flags , / ): ...
3887
3937
def AdminProviders (self , uuid : PyIID , flags , / ): ...
@@ -4104,7 +4154,7 @@ class PyIPersistStream:
4104
4154
def IsDirty (self ) -> bool : ...
4105
4155
def Load (self , stream : PyIStream , / ) -> None : ...
4106
4156
def Save (self , stream : PyIStream , bClearDirty , / ) -> None : ...
4107
- def GetSizeMax (self ) -> ULARGE_INTEGER : ...
4157
+ def GetSizeMax (self ) -> int : ...
4108
4158
4109
4159
class PyIPersistStreamInit :
4110
4160
def InitNew (self ) -> None : ...
@@ -4539,13 +4589,33 @@ class PyIStream:
4539
4589
def read (self , numBytes , / ) -> str : ...
4540
4590
def Write (self , data : str , / ) -> None : ...
4541
4591
def write (self , data : str , / ) -> None : ...
4542
- def Seek (self , offset , origin , / ) -> ULARGE_INTEGER : ...
4543
- def SetSize (self , newSize : ULARGE_INTEGER , / ) -> None : ...
4544
- def CopyTo (self , stream : PyIStream , cb : ULARGE_INTEGER , / ) -> ULARGE_INTEGER : ...
4592
+ @overload
4593
+ def Seek (self , offset : int , origin : int , / ) -> int : ...
4594
+ @overload
4595
+ @deprecated ("Support for passing two ints to create a 64-bit value is deprecated; pass a single int instead" )
4596
+ def Seek (self , offset : tuple [int , int ], origin : int , / ) -> int : ...
4597
+ @overload
4598
+ def SetSize (self , newSize : int , / ) -> None : ...
4599
+ @overload
4600
+ @deprecated ("Support for passing two ints to create a 64-bit value is deprecated; pass a single int instead" )
4601
+ def SetSize (self , newSize : tuple [int , int ], / ) -> None : ...
4602
+ @overload
4603
+ def CopyTo (self , stream : PyIStream , cb : int , / ) -> int : ...
4604
+ @overload
4605
+ @deprecated ("Support for passing two ints to create a 64-bit value is deprecated; pass a single int instead" )
4606
+ def CopyTo (self , stream : PyIStream , cb : tuple [int , int ], / ) -> int : ...
4545
4607
def Commit (self , flags , / ) -> None : ...
4546
4608
def Revert (self ) -> None : ...
4547
- def LockRegion (self , offset : ULARGE_INTEGER , cb : ULARGE_INTEGER , lockType , / ) -> None : ...
4548
- def UnLockRegion (self , offset : ULARGE_INTEGER , cb : ULARGE_INTEGER , lockType , / ) -> None : ...
4609
+ @overload
4610
+ def LockRegion (self , offset : int , cb : int , lockType , / ) -> None : ...
4611
+ @overload
4612
+ @deprecated ("Support for passing two ints to create a 64-bit value is deprecated; pass a single int instead" )
4613
+ def LockRegion (self , offset : tuple [int , int ], cb : tuple [int , int ], lockType , / ) -> None : ...
4614
+ @overload
4615
+ def UnLockRegion (self , offset : int , cb : int , lockType , / ) -> None : ...
4616
+ @overload
4617
+ @deprecated ("Support for passing two ints to create a 64-bit value is deprecated; pass a single int instead" )
4618
+ def UnLockRegion (self , offset : tuple [int , int ], cb : tuple [int , int ], lockType , / ) -> None : ...
4549
4619
def Clone (self ) -> PyIStream : ...
4550
4620
def Stat (self , grfStatFlag : int = ..., / ) -> STATSTG : ...
4551
4621
@@ -4682,6 +4752,10 @@ class PyPROPERTYKEY: ...
4682
4752
4683
4753
@final
4684
4754
class PyPROPVARIANT :
4755
+ @overload
4756
+ @deprecated ("Support for passing two ints to create a 64-bit value is deprecated; pass a single int instead" )
4757
+ def __init__ (self , Value : tuple [int , int ], Type = ...) -> None : ...
4758
+ @overload
4685
4759
def __init__ (self , Value , Type = ...) -> None : ...
4686
4760
@property
4687
4761
def vt (self ): ...
0 commit comments