Bump pywin32 to 309 (#13607)

This commit is contained in:
Avasam
2025-03-10 01:34:42 -04:00
committed by GitHub
parent 59717f4d0a
commit c68ecd75f5
10 changed files with 12265 additions and 7386 deletions
@@ -61,3 +61,8 @@ win32com(ext)?.axdebug.stackframe
# failed to import, ImportError: cannot import name 'axdebug' from 'win32com.axdebug'
win32com(ext)?.axdebug.gateways
win32com(ext)?.axscript.client.debug
# These missing is likely an issue with the upstream build's WINVER target on 309.
# Keep them in stubs as there will likely be a patch soon.
# https://github.com/mhammond/pywin32/issues/2486
win32com(ext)?\.shell\.shell\.\w+?
+1 -1
View File
@@ -1,4 +1,4 @@
version = "308.*"
version = "309.*"
upstream_repository = "https://github.com/mhammond/pywin32"
[tool.stubtest]
+19 -2
View File
@@ -1,6 +1,7 @@
from _typeshed import Incomplete, Unused
from abc import abstractmethod
from collections.abc import Sequence
from typing import SupportsInt, overload
from typing import ClassVar, SupportsInt, overload
from typing_extensions import TypeAlias, deprecated
import _win32typing
@@ -10,6 +11,15 @@ error: TypeAlias = com_error # noqa: Y042
class internal_error(Exception): ...
class com_record:
@abstractmethod
def __init__(self, /, *args, **kwargs) -> None: ...
TLBID: ClassVar[str]
MJVER: ClassVar[int]
MNVER: ClassVar[int]
LCID: ClassVar[int]
GUID: ClassVar[str]
def CoCreateFreeThreadedMarshaler(unk: _win32typing.PyIUnknown, /) -> _win32typing.PyIUnknown: ...
def CoCreateInstanceEx(
clsid: _win32typing.PyIID,
@@ -60,7 +70,13 @@ def GetActiveObject(cls, /) -> _win32typing.PyIUnknown: ...
def GetClassFile(fileName, /) -> _win32typing.PyIID: ...
def GetFacilityString(scode, /) -> str: ...
def GetRecordFromGuids(
iid: _win32typing.PyIID, verMajor, verMinor, lcid, infoIID: _win32typing.PyIID, data: Incomplete | None = ..., /
iid: str | _win32typing.PyIID,
verMajor: int,
verMinor: int,
lcid: int,
infoIID: str | _win32typing.PyIID,
data: Incomplete | None = ...,
/,
): ...
def GetRecordFromTypeInfo(TypeInfo: _win32typing.PyITypeInfo, /): ...
def GetRunningObjectTable(reserved: int = ..., /) -> _win32typing.PyIRunningObjectTable: ...
@@ -399,6 +415,7 @@ TYPEFLAG_FPREDECLID: int
TYPEFLAG_FREPLACEABLE: int
TYPEFLAG_FRESTRICTED: int
TYPEFLAG_FREVERSEBIND: int
RecordClasses: dict[str, com_record]
TypeIIDs: dict[_win32typing.PyIID, type]
URL_MK_LEGACY: int
URL_MK_UNIFORM: int
File diff suppressed because it is too large Load Diff
+81 -42
View File
@@ -1,13 +1,23 @@
import datetime
from _typeshed import Incomplete
from _operator import _SupportsComparison
from _typeshed import Incomplete, SupportsKeysAndGetItem
from collections.abc import Callable, Iterable, Mapping
from logging import Logger
from typing import ClassVar, TypeVar, overload, type_check_only
from typing_extensions import Self
log: Incomplete
_RangeMapKT = TypeVar("_RangeMapKT", bound=_SupportsComparison)
_T = TypeVar("_T")
_VT = TypeVar("_VT")
log: Logger
class _SimpleStruct:
def __init__(self, *args, **kw) -> None: ...
def field_names(self): ...
def __eq__(self, other): ...
def __ne__(self, other): ...
def field_names(self) -> list[str]: ...
def __eq__(self, other: object) -> bool: ...
def __ne__(self, other: object) -> bool: ...
class SYSTEMTIME(_SimpleStruct): ...
class TIME_ZONE_INFORMATION(_SimpleStruct): ...
@@ -15,59 +25,88 @@ class DYNAMIC_TIME_ZONE_INFORMATION(_SimpleStruct): ...
class TimeZoneDefinition(DYNAMIC_TIME_ZONE_INFORMATION):
def __init__(self, *args, **kwargs) -> None: ...
# TIME_ZONE_INFORMATION fields as obtained by __getattribute__
bias: datetime.timedelta
standard_name: str
standard_start: SYSTEMTIME
standard_bias: datetime.timedelta
daylight_name: str
daylight_start: SYSTEMTIME
daylight_bias: datetime.timedelta
def __getattribute__(self, attr: str): ...
@classmethod
def current(cls): ...
def current(cls) -> tuple[int, Self]: ...
def set(self) -> None: ...
def copy(self): ...
def locate_daylight_start(self, year): ...
def locate_standard_start(self, year): ...
def copy(self) -> Self: ...
def locate_daylight_start(self, year) -> datetime.datetime: ...
def locate_standard_start(self, year) -> datetime.datetime: ...
class TimeZoneInfo(datetime.tzinfo):
tzRegKey: str
timeZoneName: Incomplete
fixedStandardTime: Incomplete
def __init__(self, param: Incomplete | None = ..., fix_standard_time: bool = ...) -> None: ...
def tzname(self, dt): ...
def getWinInfo(self, targetYear): ...
def utcoffset(self, dt): ...
def dst(self, dt): ...
def GetDSTStartTime(self, year): ...
def GetDSTEndTime(self, year): ...
def __le__(self, other) -> bool: ...
def __eq__(self, other) -> bool: ...
def __ne__(self, other) -> bool: ...
tzRegKey: ClassVar[str]
timeZoneName: str
fixedStandardTime: bool
def __init__(self, param: str | TimeZoneDefinition, fix_standard_time: bool = False) -> None: ...
@overload # type: ignore[override] # Split definition into overrides
def tzname(self, dt: datetime.datetime) -> str: ...
@overload
def tzname(self, dt: None) -> None: ...
def getWinInfo(self, targetYear: int) -> TimeZoneDefinition: ...
@overload # type: ignore[override] # False-positive, our overload covers all base types
def utcoffset(self, dt: None) -> None: ...
@overload
def utcoffset(self, dt: datetime.datetime) -> datetime.timedelta: ...
@overload # type: ignore[override] # False-positive, our overload covers all base types
def dst(self, dt: None) -> None: ...
@overload
def dst(self, dt: datetime.datetime) -> datetime.timedelta: ...
def GetDSTStartTime(self, year: int) -> datetime.datetime: ...
def GetDSTEndTime(self, year: int) -> datetime.datetime: ...
def __eq__(self, other: object) -> bool: ...
def __ne__(self, other: object) -> bool: ...
@classmethod
def local(cls): ...
def local(cls) -> Self: ...
@classmethod
def utc(cls): ...
def utc(cls) -> Self: ...
@staticmethod
def get_sorted_time_zone_names(): ...
def get_sorted_time_zone_names() -> list[str]: ...
@staticmethod
def get_all_time_zones(): ...
def get_all_time_zones() -> list[TimeZoneInfo]: ...
@staticmethod
def get_sorted_time_zones(key: Incomplete | None = ...): ...
def utcnow(): ...
def now(): ...
def GetTZCapabilities(): ...
def utcnow() -> datetime.datetime: ...
def now() -> datetime.datetime: ...
def GetTZCapabilities() -> dict[str, bool]: ...
class DLLHandleCache:
def __getitem__(self, filename): ...
def __getitem__(self, filename: str) -> int: ...
DLLCache: Incomplete
DLLCache: DLLHandleCache
def resolveMUITimeZone(spec): ...
def resolveMUITimeZone(spec: str) -> str | None: ...
class RangeMap(dict[int, str]):
sort_params: Incomplete
match: Incomplete
def __init__(self, source, sort_params=..., key_match_comparator=...) -> None: ...
def __getitem__(self, item): ...
def get(self, key, default: Incomplete | None = ...): ...
def bounds(self): ...
undefined_value: Incomplete
class RangeMap(dict[_RangeMapKT, _VT]):
sort_params: Mapping[str, Incomplete]
match: Callable[[_RangeMapKT, _RangeMapKT], bool]
def __init__(
self,
source: SupportsKeysAndGetItem[_RangeMapKT, _VT] | Iterable[tuple[_RangeMapKT, _VT]],
sort_params: Mapping[str, Incomplete] = {},
key_match_comparator: Callable[[_RangeMapKT, _RangeMapKT], bool] = ...,
) -> None: ...
@classmethod
def left(cls, source: SupportsKeysAndGetItem[_RangeMapKT, _VT] | Iterable[tuple[_RangeMapKT, _VT]]) -> Self: ...
def __getitem__(self, item: _RangeMapKT) -> _VT: ...
@overload # type: ignore[override] # Signature simplified over dict and Mapping
def get(self, key: _RangeMapKT, default: _T) -> _VT | _T: ...
@overload
def get(self, key: _RangeMapKT, default: None = None) -> _VT | None: ...
def bounds(self) -> tuple[_RangeMapKT, _RangeMapKT]: ...
@type_check_only
class RangeValueUndefined: ...
undefined_value: RangeValueUndefined
class Item(int): ...
first_item: Incomplete
last_item: Incomplete
first_item: Item
last_item: Item
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -15,7 +15,7 @@ def PrepareToHostSingle(klass: Incomplete | None = ..., /) -> None: ...
def PrepareToHostMultiple(service_name: str, klass, /) -> None: ...
def RunningAsService(): ...
def SetEventSourceName(sourceName: str, registerNow: bool = ..., /) -> None: ...
def StartServiceCtrlDispatcher(*args): ... # incomplete
def StartServiceCtrlDispatcher(): ...
COINIT_APARTMENTTHREADED: int
COINIT_DISABLE_OLE1DDE: int
+1 -1
View File
@@ -1,7 +1,7 @@
from win32.lib.pywintypes import error as error
def GetHandle(*args): ... # incomplete
def GetTracer(*args): ... # incomplete
def GetTracer(): ...
def InitRead(*args): ... # incomplete
def InitWrite(*args): ... # incomplete
def TermRead(*args): ... # incomplete
+1
View File
@@ -32,6 +32,7 @@ WTSClientHardwareId: int
WTSClientName: int
WTSClientProductId: int
WTSClientProtocolType: int
WTSIsRemoteSession: int
WTSConnectQuery: int
WTSConnectState: int
WTSConnected: int
+3 -1
View File
@@ -3,6 +3,7 @@ from typing import Final
from typing_extensions import TypeAlias
import _win32typing
from pythoncom import com_record
from win32com.client import dynamic
_Stringifiable: TypeAlias = object
@@ -46,7 +47,8 @@ class EventsProxy:
def DispatchWithEvents(clsid, user_event_class): ...
def WithEvents(disp, user_event_class): ...
def getevents(clsid): ...
def Record(name, object): ...
def Record(name, object) -> com_record: ...
def register_record_class(cls) -> None: ...
class DispatchBaseClass:
def __init__(self, oobj: Incomplete | None = ...) -> None: ...