Skip to content

Commit

Permalink
Remove udf.delete's deprecated namespace argument. (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMoutafis authored Jul 12, 2024
1 parent 86a22d2 commit d9dab29
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/tiledb/cloud/udf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import base64
import uuid
import warnings
from logging import warning
from typing import Any, Callable, Iterable, Optional, Union

import cloudpickle
Expand Down Expand Up @@ -551,33 +550,16 @@ def unshare(name=None, namespace=None, async_req=False):
"""


def delete(
uri: str, namespace: Optional[str] = None, *, async_req: bool = False
) -> None:
def delete(uri: str, *, async_req: bool = False) -> None:
"""
Deletes a registered udf
:param uri: TileDB URI of the udf, defaults to None.
:param namespace: namespace the udf belongs to, defaults to None.
DEPRECATION WARNING: Will be deprecate from version 0.12.17
:param async_req: Return future instead of results for async support
:return: deleted udf details
"""
try:
namespace, name = utils.split_uri(uri)
except Exception as exc:
if str(exc).startswith("Incorrect"):
warning(
DeprecationWarning(
"From version 0.12.17 the method will accept"
"only `tiledb://<namespace>/<name>` URIs"
),
)
name = uri
else:
raise exc

try:
api_instance = client.build(rest_api.UdfApi)

return api_instance.delete_udf_info(
Expand Down

0 comments on commit d9dab29

Please sign in to comment.