From 9f92a51f845d71c441d1d43908c4282d6d5270e7 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 4fd6394f5..880018c35 100644 --- a/spacy/tokenizer.pyx +++ b/spacy/tokenizer.pyx @@ -871,11 +871,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