mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Fix Windows-specific allowlist entries in _msi, msilib, selectors and subprocess (#10822)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import sys
|
||||
|
||||
if sys.platform == "win32":
|
||||
class MSIError(Exception): ...
|
||||
# Actual typename View, not exposed by the implementation
|
||||
class _View:
|
||||
def Execute(self, params: _Record | None = ...) -> None: ...
|
||||
|
||||
@@ -3,5 +3,5 @@ import sys
|
||||
if sys.platform == "win32":
|
||||
ActionText: list[tuple[str, str, str | None]]
|
||||
UIText: list[tuple[str, str | None]]
|
||||
|
||||
dirname: str
|
||||
tables: list[str]
|
||||
|
||||
@@ -59,12 +59,13 @@ class DevpollSelector(BaseSelector):
|
||||
def select(self, timeout: float | None = ...) -> list[tuple[SelectorKey, _EventMask]]: ...
|
||||
def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ...
|
||||
|
||||
class KqueueSelector(BaseSelector):
|
||||
def fileno(self) -> int: ...
|
||||
def register(self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = None) -> SelectorKey: ...
|
||||
def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: ...
|
||||
def select(self, timeout: float | None = None) -> list[tuple[SelectorKey, _EventMask]]: ...
|
||||
def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ...
|
||||
if sys.platform != "win32":
|
||||
class KqueueSelector(BaseSelector):
|
||||
def fileno(self) -> int: ...
|
||||
def register(self, fileobj: FileDescriptorLike, events: _EventMask, data: Any = None) -> SelectorKey: ...
|
||||
def unregister(self, fileobj: FileDescriptorLike) -> SelectorKey: ...
|
||||
def select(self, timeout: float | None = None) -> list[tuple[SelectorKey, _EventMask]]: ...
|
||||
def get_map(self) -> Mapping[FileDescriptorLike, SelectorKey]: ...
|
||||
|
||||
# Not a real class at runtime, it is just a conditional alias to other real selectors.
|
||||
# The runtime logic is more fine-grained than a `sys.platform` check;
|
||||
|
||||
@@ -2600,6 +2600,7 @@ if sys.platform == "win32":
|
||||
hStdError: Any | None
|
||||
wShowWindow: int
|
||||
lpAttributeList: Mapping[str, Any]
|
||||
def copy(self) -> STARTUPINFO: ...
|
||||
from _winapi import (
|
||||
ABOVE_NORMAL_PRIORITY_CLASS as ABOVE_NORMAL_PRIORITY_CLASS,
|
||||
BELOW_NORMAL_PRIORITY_CLASS as BELOW_NORMAL_PRIORITY_CLASS,
|
||||
|
||||
@@ -4,11 +4,8 @@ locale.nl_langinfo # Function that should be moved to _locale and re-exported c
|
||||
# alias for a class defined elsewhere,
|
||||
# mypy infers the variable has type `(*args) -> DupHandle` but stubtest infers the runtime type as <class DupHandle>
|
||||
multiprocessing.reduction.AbstractReducer.DupHandle
|
||||
msilib.text.dirname
|
||||
selectors.KqueueSelector
|
||||
|
||||
# Exists at runtime, but missing from stubs
|
||||
_msi.MSIError
|
||||
_winapi.CreateFileMapping
|
||||
_winapi.MapViewOfFile
|
||||
_winapi.OpenFileMapping
|
||||
@@ -21,7 +18,6 @@ msvcrt.SetErrorMode
|
||||
ssl.SSLSocket.recvmsg
|
||||
ssl.SSLSocket.recvmsg_into
|
||||
ssl.SSLSocket.sendmsg
|
||||
subprocess.STARTUPINFO.copy
|
||||
winreg.HKEYType.handle
|
||||
_ctypes.FreeLibrary
|
||||
_ctypes.LoadLibrary
|
||||
|
||||
Reference in New Issue
Block a user