diff --git a/can/interfaces/systec/structures.py b/can/interfaces/systec/structures.py index 5687308ad..673f0609d 100644 --- a/can/interfaces/systec/structures.py +++ b/can/interfaces/systec/structures.py @@ -41,6 +41,7 @@ class CanMsg(Structure): """ _pack_ = 1 + _layout_ = "ms" _fields_ = [ ("m_dwID", DWORD), # CAN Identifier ("m_bFF", BYTE), # CAN Frame Format (see enum :class:`MsgFrameFormat`) @@ -113,6 +114,7 @@ class Status(Structure): """ _pack_ = 1 + _layout_ = "ms" _fields_ = [ ("m_wCanStatus", WORD), # CAN error status (see enum :class:`CanStatus`) ("m_wUsbStatus", WORD), # USB error status (see enum :class:`UsbStatus`) @@ -144,6 +146,7 @@ class InitCanParam(Structure): """ _pack_ = 1 + _layout_ = "ms" _fields_ = [ ("m_dwSize", DWORD), # size of this structure (only used internally) ( @@ -266,6 +269,7 @@ class HardwareInfoEx(Structure): """ _pack_ = 1 + _layout_ = "ms" _fields_ = [ ("m_dwSize", DWORD), # size of this structure (only used internally) ("m_UcanHandle", Handle), # USB-CAN-Handle assigned by the DLL @@ -343,6 +347,7 @@ class HardwareInitInfo(Structure): """ _pack_ = 1 + _layout_ = "ms" _fields_ = [ ("m_dwSize", DWORD), # size of this structure ( @@ -368,6 +373,7 @@ class ChannelInfo(Structure): """ _pack_ = 1 + _layout_ = "ms" _fields_ = [ ("m_dwSize", DWORD), # size of this structure ("m_bMode", BYTE), # operation mode of CAN controller (see enum :class:`Mode`) diff --git a/can/interfaces/vector/xlclass.py b/can/interfaces/vector/xlclass.py index 6441ad4e5..de72f25dc 100644 --- a/can/interfaces/vector/xlclass.py +++ b/can/interfaces/vector/xlclass.py @@ -244,6 +244,7 @@ class XLbusParams(ctypes.Structure): class XLchannelConfig(ctypes.Structure): _pack_ = 1 + _layout_ = "ms" _fields_ = [ ("name", ctypes.c_char * 32), ("hwType", ctypes.c_ubyte), diff --git a/doc/changelog.d/2162.fixed.rst b/doc/changelog.d/2162.fixed.rst new file mode 100644 index 000000000..aab82a83e --- /dev/null +++ b/doc/changelog.d/2162.fixed.rst @@ -0,0 +1 @@ +Fixed the Python 3.14 ``DeprecationWarning`` about ``_pack_`` without ``_layout_`` in the ctypes structures of the SYSTEC and Vector interfaces.