Skip to content

Commit

Permalink
Fix build with Cython 3 - it no longer adds implicit noexcept to call…
Browse files Browse the repository at this point in the history
…backs (#1926)

* Fix build with Cython 3, no longer adds implicit noexcept to callbacks

* Remove requirements.txt cython upper-bound
  • Loading branch information
ihnorton authored Mar 16, 2024
1 parent b71e8bc commit 4cfbf11
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion misc/requirements_wheel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ numpy>=1.23.2 ; python_version >= "3.11"
#-------------------------------

cmake >= 3.23
cython < 3.0
cython
pybind11
setuptools >= 64
setuptools_scm >= 8
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=42", "wheel", "pybind11", "Cython<3.0"]
requires = ["setuptools>=42", "wheel", "pybind11", "Cython"]
build-backend = "setuptools.build_meta"

[project]
Expand Down
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ numpy >= 1.16.5
# ------------------------------------------------
build
cmake >= 3.23
cython < 3.0
cython
pybind11
setuptools >= 64
setuptools_scm >= 8
Expand Down
8 changes: 4 additions & 4 deletions tiledb/libtiledb.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ cdef extern from "tiledb/tiledb.h":
int tiledb_query_submit_async(
tiledb_ctx_t* ctx,
tiledb_query_t* query,
void* (*callback)(void*),
void* (*callback)(void*) noexcept,
void* callback_data)

int tiledb_query_get_status(
Expand Down Expand Up @@ -979,13 +979,13 @@ cdef extern from "tiledb/tiledb.h":
tiledb_ctx_t* ctx,
const char* path,
tiledb_walk_order_t order,
int (*callback)(const char*, tiledb_object_t, void*),
int (*callback)(const char*, tiledb_object_t, void*) noexcept,
void* data)

int tiledb_object_ls(
tiledb_ctx_t* ctx,
const char* path,
int (*callback)(const char*, tiledb_object_t, void*),
int (*callback)(const char*, tiledb_object_t, void*) noexcept,
void* data)

# VFS
Expand Down Expand Up @@ -1067,7 +1067,7 @@ cdef extern from "tiledb/tiledb.h":
tiledb_ctx_t * ctx,
tiledb_vfs_t * vfs,
const char * path,
int (*callback)(const char *, void *),
int (*callback)(const char *, void *) noexcept,
void * data)

int tiledb_vfs_move_file(
Expand Down
2 changes: 1 addition & 1 deletion tiledb/libtiledb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3732,7 +3732,7 @@ def move(old_uri, new_uri, ctx=None):
check_error(ctx, rc)
return

cdef int walk_callback(const char* path_ptr, tiledb_object_t obj, void* pyfunc):
cdef int walk_callback(const char* path_ptr, tiledb_object_t obj, void* pyfunc) noexcept:
objtype = None
if obj == TILEDB_GROUP:
objtype = "group"
Expand Down

0 comments on commit 4cfbf11

Please sign in to comment.