File ac62a4d2a54bacccd09b97453bffe759c01f18ef.patch of Package vapoursynth

From ac62a4d2a54bacccd09b97453bffe759c01f18ef Mon Sep 17 00:00:00 2001
From: Fredrik Mellbin <fredrik.mellbin@gmail.com>
Date: Tue, 15 Aug 2023 22:23:51 +0200
Subject: [PATCH] Sprinkle noexept instead of using the compatibility option to
 avoid warnings in cython 3

---
 src/cython/vapoursynth.pxd |  1 -
 src/cython/vapoursynth.pyx | 14 +++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/cython/vapoursynth.pxd b/src/cython/vapoursynth.pxd
index ee273d8d..73fd0535 100644
--- a/src/cython/vapoursynth.pxd
+++ b/src/cython/vapoursynth.pxd
@@ -18,7 +18,6 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 #
 #cython: language_level=3
-#cython: legacy_implicit_noexcept=True
 
 from libc.stdint cimport uint8_t, uint32_t, int64_t, uint64_t, uintptr_t
 from libc.stddef cimport ptrdiff_t
diff --git a/src/cython/vapoursynth.pyx b/src/cython/vapoursynth.pyx
index 34e2b8be..4cadcd8e 100644
--- a/src/cython/vapoursynth.pyx
+++ b/src/cython/vapoursynth.pyx
@@ -198,12 +198,12 @@ cdef void _unset_logger(EnvironmentData env):
     env.log = NULL
 
 
-cdef void __stdcall _logCb(int msgType, const char *msg, void *userData) nogil:
+cdef void __stdcall _logCb(int msgType, const char *msg, void *userData) noexcept nogil:
     with gil:
         message = msg.decode("utf-8")
         (<object>userData)(MessageType(msgType), message)
 
-cdef void __stdcall _logFree(void* userData) nogil:
+cdef void __stdcall _logFree(void* userData) noexcept nogil:
     with gil:
         Py_DECREF(<object>userData)
 
@@ -776,7 +776,7 @@ cdef FramePtr createFramePtr(const VSFrame *f, const VSAPI *funcs):
     return instance
 
 
-cdef void __stdcall frameDoneCallback(void *data, const VSFrame *f, int n, VSNode *node, const char *errormsg) nogil:
+cdef void __stdcall frameDoneCallback(void *data, const VSFrame *f, int n, VSNode *node, const char *errormsg) noexcept nogil:
     with gil:
         result = error = None
         d = <CallbackData>data
@@ -2428,11 +2428,11 @@ cdef LogHandle createLogHandle(object handler_func):
     instance.handle = NULL
     return instance
 
-cdef void __stdcall log_handler_wrapper(int msgType, const char *msg, void *userData) nogil:
+cdef void __stdcall log_handler_wrapper(int msgType, const char *msg, void *userData) noexcept nogil:
     with gil:
         (<LogHandle>userData).handler_func(MessageType(msgType), msg.decode('utf-8'))
 
-cdef void __stdcall log_handler_free(void *userData) nogil:
+cdef void __stdcall log_handler_free(void *userData) noexcept nogil:
     with gil:
         Py_DECREF(<LogHandle>userData)
 
@@ -2936,14 +2936,14 @@ class PythonVSScriptLoggingBridge(logging.Handler):
 
         core.log_message(mt, message)
 
-cdef void __stdcall freeFunc(void *pobj) nogil:
+cdef void __stdcall freeFunc(void *pobj) noexcept nogil:
     with gil:
         fobj = <FuncData>pobj
         Py_DECREF(fobj)
         fobj = None
 
 
-cdef void __stdcall publicFunction(const VSMap *inm, VSMap *outm, void *userData, VSCore *core, const VSAPI *vsapi) nogil:
+cdef void __stdcall publicFunction(const VSMap *inm, VSMap *outm, void *userData, VSCore *core, const VSAPI *vsapi) noexcept nogil:
     with gil:
         d = <FuncData>userData
         try:
openSUSE Build Service is sponsored by