Skip to content

Commit 6f950c1

Browse files
authored
Fixed GIL regressions with Cython 3 (#55650)
1 parent 7959578 commit 6f950c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/_libs/parsers.pyx

+4-4
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ cdef extern from "pandas/parser/tokenizer.h":
228228
# pick one, depending on whether the converter requires GIL
229229
double (*double_converter)(const char *, char **,
230230
char, char, char,
231-
int, int *, int *) nogil
231+
int, int *, int *) noexcept nogil
232232

233233
# error handling
234234
char *warn_msg
@@ -1605,7 +1605,7 @@ cdef _categorical_convert(parser_t *parser, int64_t col,
16051605

16061606
# -> ndarray[f'|S{width}']
16071607
cdef _to_fw_string(parser_t *parser, int64_t col, int64_t line_start,
1608-
int64_t line_end, int64_t width):
1608+
int64_t line_end, int64_t width) noexcept:
16091609
cdef:
16101610
char *data
16111611
ndarray result
@@ -1621,7 +1621,7 @@ cdef _to_fw_string(parser_t *parser, int64_t col, int64_t line_start,
16211621

16221622
cdef void _to_fw_string_nogil(parser_t *parser, int64_t col,
16231623
int64_t line_start, int64_t line_end,
1624-
size_t width, char *data) nogil:
1624+
size_t width, char *data) noexcept nogil:
16251625
cdef:
16261626
int64_t i
16271627
coliter_t it
@@ -1677,7 +1677,7 @@ cdef _try_double(parser_t *parser, int64_t col,
16771677
cdef int _try_double_nogil(parser_t *parser,
16781678
float64_t (*double_converter)(
16791679
const char *, char **, char,
1680-
char, char, int, int *, int *) nogil,
1680+
char, char, int, int *, int *) noexcept nogil,
16811681
int64_t col, int64_t line_start, int64_t line_end,
16821682
bint na_filter, kh_str_starts_t *na_hashset,
16831683
bint use_na_flist,

0 commit comments

Comments
 (0)