From 321f2f36169553aeb6ce20c6b3b5103f22c2de0a Mon Sep 17 00:00:00 2001 From: bnjmnp Date: Mon, 31 Jul 2023 22:03:26 +0200 Subject: [PATCH] Mark callback functions as noexcept to support Cython 3 fix #113 --- pyproject.toml | 2 +- pysoem/__init__.py | 2 +- pysoem/pysoem.pyx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 09df9af..9c534c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=42", "wheel", "Cython"] +requires = ["setuptools>=42", "wheel", "Cython>=0.29.31"] build-backend = "setuptools.build_meta" [tool.cibuildwheel] diff --git a/pysoem/__init__.py b/pysoem/__init__.py index de26612..66e5bcd 100644 --- a/pysoem/__init__.py +++ b/pysoem/__init__.py @@ -1,2 +1,2 @@ -__version__ = '1.1.3' +__version__ = '1.1.4' from .pysoem import * \ No newline at end of file diff --git a/pysoem/pysoem.pyx b/pysoem/pysoem.pyx index 40a78a5..8afebc8 100644 --- a/pysoem/pysoem.pyx +++ b/pysoem/pysoem.pyx @@ -1186,7 +1186,7 @@ cdef class CdefCoeObjectEntry: return self._ex_oelist.ObjAccess[self._item] -cdef int _xPO2SOconfig(cpysoem.uint16 slave, void* user): +cdef int _xPO2SOconfig(cpysoem.uint16 slave, void* user) noexcept: cdef _CallbackData cd cd = user cd.exc_raised = False @@ -1197,7 +1197,7 @@ cdef int _xPO2SOconfig(cpysoem.uint16 slave, void* user): cd.exc_info = sys.exc_info() -cdef int _xPO2SOconfigEx(cpysoem.uint16 slave, void* user): +cdef int _xPO2SOconfigEx(cpysoem.uint16 slave, void* user) noexcept: cdef _CallbackData cd cd = user cd.exc_raised = False