From 07c345640605d896eca55e402099861339a6495d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C4=81vis=20Mos=C4=81ns?= Date: Thu, 6 Mar 2025 23:06:34 +0200 Subject: [PATCH] tokenizer.pyx: add `noexcept` to be compatible with Cython 3 --- spacy/tokenizer.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/tokenizer.pyx b/spacy/tokenizer.pyx index 6ca170dd4..77718a75b 100644 --- a/spacy/tokenizer.pyx +++ b/spacy/tokenizer.pyx @@ -867,11 +867,11 @@ cdef extern from "" namespace "std" nogil: bint (*)(SpanC, SpanC)) -cdef bint len_start_cmp(SpanC a, SpanC b) nogil: +cdef bint len_start_cmp(SpanC a, SpanC b) noexcept nogil: if a.end - a.start == b.end - b.start: return b.start < a.start return a.end - a.start < b.end - b.start -cdef bint start_cmp(SpanC a, SpanC b) nogil: +cdef bint start_cmp(SpanC a, SpanC b) noexcept nogil: return a.start < b.start