Skip to content

Commit 1be6693

Browse files
committed
chore: deprecate add_all method
1 parent cff39c1 commit 1be6693

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tableauserverclient/server/endpoint/users_endpoint.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import itertools
66
import logging
77
from typing import Optional
8+
import warnings
89

910
from tableauserverclient.server.query import QuerySet
1011

@@ -89,6 +90,7 @@ def add(self, user_item: UserItem) -> UserItem:
8990
# Add new users to site. This does not actually perform a bulk action, it's syntactic sugar
9091
@api(version="2.0")
9192
def add_all(self, users: list[UserItem]):
93+
warnings.warn("This method is deprecated, use bulk_add instead", DeprecationWarning)
9294
created = []
9395
failed = []
9496
for user in users:
@@ -145,8 +147,6 @@ def bulk_remove(self, users: Iterable[UserItem]) -> None:
145147

146148
@api(version="2.0")
147149
def create_from_file(self, filepath: str) -> tuple[list[UserItem], list[tuple[UserItem, ServerResponseError]]]:
148-
import warnings
149-
150150
warnings.warn("This method is deprecated, use bulk_add instead", DeprecationWarning)
151151
created = []
152152
failed = []

0 commit comments

Comments
 (0)