Skip to content

Commit d84adec

Browse files
committed
chore: remove deprecated site arg in auth
1 parent 83233a5 commit d84adec

2 files changed

Lines changed: 1 addition & 22 deletions

File tree

tableauserverclient/models/tableau_auth.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ def deprecate_site_attribute():
2828

2929
# The traditional auth type: username/password
3030
class TableauAuth(Credentials):
31-
def __init__(self, username, password, site=None, site_id=None, user_id_to_impersonate=None):
32-
if site is not None:
33-
deprecate_site_attribute()
34-
site_id = site
31+
def __init__(self, username, password, site_id=None, user_id_to_impersonate=None):
3532
super().__init__(site_id, user_id_to_impersonate)
3633
if password is None:
3734
raise TabError("Must provide a password when using traditional authentication")
@@ -49,16 +46,6 @@ def __repr__(self):
4946
uid = ""
5047
return f"<Credentials username={self.username} password=redacted (site={self.site_id}{uid})>"
5148

52-
@property
53-
def site(self):
54-
deprecate_site_attribute()
55-
return self.site_id
56-
57-
@site.setter
58-
def site(self, value):
59-
deprecate_site_attribute()
60-
self.site_id = value
61-
6249

6350
# A Tableau-generated Personal Access Token
6451
class PersonalAccessTokenAuth(Credentials):

test/test_tableauauth_model.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import unittest
2-
import warnings
32

43
import tableauserverclient as TSC
54

@@ -12,10 +11,3 @@ def test_username_password_required(self):
1211
with self.assertRaises(TypeError):
1312
TSC.TableauAuth()
1413

15-
def test_site_arg_raises_warning(self):
16-
with warnings.catch_warnings(record=True) as w:
17-
warnings.simplefilter("always")
18-
19-
tableau_auth = TSC.TableauAuth("user", "password", site="Default")
20-
21-
self.assertTrue(any(item.category == DeprecationWarning for item in w))

0 commit comments

Comments
 (0)