Skip to content

Commit

Permalink
Remove deprecated Array.delete_fragments code path. (#2009)
Browse files Browse the repository at this point in the history
Co-authored-by: Agis Kounelis <[email protected]>
  • Loading branch information
teo-tsirpanis and kounelisagis authored Jul 25, 2024
1 parent 8b1d7fd commit 6c3f527
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
7 changes: 0 additions & 7 deletions tiledb/libtiledb.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -857,13 +857,6 @@ cdef extern from "tiledb/tiledb.h":
const char* array_path,
tiledb_config_t* config) nogil

int tiledb_array_delete_fragments(
tiledb_ctx_t* ctx,
tiledb_array_t* array,
const char* uri,
uint64_t timestamp_start,
uint64_t timestamp_end)

int tiledb_array_delete_fragments_v2(
tiledb_ctx_t* ctx,
const char* uri,
Expand Down
19 changes: 3 additions & 16 deletions tiledb/libtiledb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1330,22 +1330,9 @@ cdef class Array(object):
timestamp_end
)
else:
array_instance = self_or_uri
warnings.warn(
"The `tiledb.Array.delete_fragments` instance method is deprecated. Use the static method with the same name instead.",
DeprecationWarning,
)
ctx_ptr = safe_ctx_ptr(array_instance.ctx)
array_ptr = <tiledb_array_t*>array_instance.ptr
buri = array_instance.uri.encode('UTF-8')

rc = tiledb_array_delete_fragments(
ctx_ptr,
array_ptr,
buri,
timestamp_start,
timestamp_end
)
# TODO: Make this method static and entirely remove the conditional.
raise TypeError(
"The `tiledb.Array.delete_fragments` instance method is deprecated and removed. Use the static method with the same name instead.")
if rc != TILEDB_OK:
_raise_ctx_err(ctx_ptr, rc)

Expand Down

0 comments on commit 6c3f527

Please sign in to comment.