Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define TILEDB_REMOVE_DEPRECATIONS macro for cc and remove deprecated code #2023

Merged
merged 3 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tiledb/cc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ target_compile_features(
cxx_std_20
)

if (TILEDB_REMOVE_DEPRECATIONS)
target_compile_definitions(
cc
PRIVATE
TILEDB_REMOVE_DEPRECATIONS
)
endif()

install(TARGETS cc DESTINATION tiledb)

if(TILEDB_DOWNLOADED)
Expand Down
11 changes: 0 additions & 11 deletions tiledb/cc/array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ void init_array(py::module &m) {
.def("schema", &Array::schema)
//.def("ptr", [](Array& arr){ return py::capsule(arr.ptr()); } )
.def("open", (void(Array::*)(tiledb_query_type_t)) & Array::open)
// open with encryption key
.def("open",
(void(Array::*)(tiledb_query_type_t, tiledb_encryption_type_t,
const std::string &)) &
Array::open)
// open with encryption key and timestamp
.def("open",
(void(Array::*)(tiledb_query_type_t, tiledb_encryption_type_t,
const std::string &, uint64_t)) &
Array::open)
.def("reopen", &Array::reopen)
.def("set_open_timestamp_start", &Array::set_open_timestamp_start)
.def("set_open_timestamp_end", &Array::set_open_timestamp_end)
Expand Down Expand Up @@ -121,7 +111,6 @@ void init_array(py::module &m) {
})
.def("consolidate_metadata",
py::overload_cast<const Context &, const std::string &,
tiledb_encryption_type_t, const std::string &,
Config *const>(&Array::consolidate_metadata))
.def("put_metadata",
[](Array &self, std::string &key, tiledb_datatype_t tdb_type,
Expand Down
4 changes: 0 additions & 4 deletions tiledb/cc/schema.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ void init_schema(py::module &m) {

.def(py::init<Context &, std::string &>())

.def(py::init<Context &, std::string &, tiledb_encryption_type_t,
std::string &>(),
py::keep_alive<1, 2>())

.def(py::init<Context &, py::capsule>())

.def("__capsule__",
Expand Down
33 changes: 0 additions & 33 deletions tiledb/libtiledb.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -482,14 +482,6 @@ cdef extern from "tiledb/tiledb.h":
const char* array_uri,
tiledb_array_schema_t** array_schema) nogil

int tiledb_array_schema_load_with_key(
tiledb_ctx_t* ctx,
const char* array_uri,
tiledb_encryption_type_t key_type,
const void* key_ptr,
unsigned int key_len,
tiledb_array_schema_t** array_schema) nogil

int tiledb_array_schema_get_array_type(
tiledb_ctx_t* ctx,
const tiledb_array_schema_t* array_schema,
Expand Down Expand Up @@ -645,14 +637,6 @@ cdef extern from "tiledb/tiledb.h":
const char* array_uri,
tiledb_config_t* config) nogil

int tiledb_array_consolidate_metadata_with_key(
tiledb_ctx_t* ctx,
const char* array_uri,
tiledb_encryption_type_t encryption_type,
const void* encryption_key,
uint32_t key_length,
tiledb_config_t* config) nogil

int tiledb_array_delete(
tiledb_ctx_t* ctx,
const char* uri) nogil
Expand Down Expand Up @@ -809,23 +793,6 @@ cdef extern from "tiledb/tiledb.h":
tiledb_array_t* array,
tiledb_query_type_t query_type) nogil

int tiledb_array_open_with_key(
tiledb_ctx_t* ctx,
tiledb_array_t* array,
tiledb_query_type_t query_type,
tiledb_encryption_type_t key_type,
const void* key,
unsigned int key_len) nogil

int tiledb_array_open_at_with_key(
tiledb_ctx_t* ctx,
tiledb_array_t* array,
tiledb_query_type_t query_type,
tiledb_encryption_type_t encryption_type,
const void * encryption_key,
int key_length,
uint64_t timestamp) nogil

int tiledb_array_reopen(
tiledb_ctx_t* ctx,
tiledb_array_t* array) nogil
Expand Down
3 changes: 0 additions & 3 deletions tiledb/tests/cc/test_cc.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ def test_array():
assert os.path.basename(arr.uri()) == os.path.basename(uri)
assert arr.schema == arr.schema

# TODO test
# open(tiledb_query_type_t query_type, tiledb_encryption_type_t encryption_type, const std::string& encryption_key, uint64_t timestamp)

arr.reopen()
arr.set_open_timestamp_start(0)
arr.set_open_timestamp_end(1)
Expand Down
Loading