Bump ctypes to 3.14 (#14137)

This commit is contained in:
Semyon Moroz
2025-05-25 18:13:36 -07:00
committed by GitHub
parent adabd34dde
commit 4ea1f958ce
8 changed files with 28 additions and 26 deletions
+14 -6
View File
@@ -31,6 +31,9 @@ from typing_extensions import Self, TypeAlias, deprecated
if sys.platform == "win32":
from _ctypes import FormatError as FormatError, get_last_error as get_last_error, set_last_error as set_last_error
if sys.version_info >= (3, 14):
from _ctypes import COMError as COMError
if sys.version_info >= (3, 11):
from ctypes._endian import BigEndianUnion as BigEndianUnion, LittleEndianUnion as LittleEndianUnion
@@ -197,8 +200,13 @@ if sys.platform == "win32":
def wstring_at(ptr: _CVoidConstPLike, size: int = -1) -> str: ...
if sys.version_info >= (3, 14):
def memoryview_at(ptr: _CVoidConstPLike, size: int, readonly: bool = False) -> memoryview: ...
class py_object(_CanCastTo, _SimpleCData[_T]):
_type_: ClassVar[Literal["O"]]
if sys.version_info >= (3, 14):
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
class c_bool(_SimpleCData[bool]):
_type_: ClassVar[Literal["?"]]
@@ -270,15 +278,15 @@ class c_double(_SimpleCData[float]):
class c_longdouble(_SimpleCData[float]): # can be an alias for c_double
_type_: ClassVar[Literal["d", "g"]]
if sys.version_info >= (3, 14):
class c_float_complex(_SimpleCData[complex]):
_type_: ClassVar[Literal["E"]]
if sys.version_info >= (3, 14) and sys.platform != "win32":
class c_double_complex(_SimpleCData[complex]):
_type_: ClassVar[Literal["C"]]
_type_: ClassVar[Literal["D"]]
class c_float_complex(_SimpleCData[complex]):
_type_: ClassVar[Literal["F"]]
class c_longdouble_complex(_SimpleCData[complex]):
_type_: ClassVar[Literal["F"]]
_type_: ClassVar[Literal["G"]]
class c_char(_SimpleCData[bytes]):
_type_: ClassVar[Literal["c"]]
+3
View File
@@ -5,4 +5,7 @@ def find_library(name: str) -> str | None: ...
if sys.platform == "win32":
def find_msvcrt() -> str | None: ...
if sys.version_info >= (3, 14):
def dllist() -> list[str]: ...
def test() -> None: ...
+9
View File
@@ -83,6 +83,15 @@ HACCEL = HANDLE
HBITMAP = HANDLE
HBRUSH = HANDLE
HCOLORSPACE = HANDLE
if sys.version_info >= (3, 14):
HCONV = HANDLE
HCONVLIST = HANDLE
HCURSOR = HANDLE
HDDEDATA = HANDLE
HDROP = HANDLE
HFILE = INT
HRESULT = LONG
HSZ = HANDLE
HDC = HANDLE
HDESK = HANDLE
HDWP = HANDLE