Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
8abda4b
Fix typo in update_datasource_data.py
vitorhonna May 15, 2025
19cfec7
Merge branch 'tableau:master' into patch-2
vitorhonna May 15, 2025
5eca29c
Merge branch 'master' into patch-2
vitorhonna May 16, 2025
946d208
Merge pull request #1608 from vitorhonna/patch-2
jacalata May 22, 2025
4147c73
fix: repr for auth objects
jorwoods May 25, 2025
5e49f38
Merge pull request #1618 from jorwoods/jorwoods/pat_repr
jacalata May 28, 2025
88985fe
Updated TSC with new API's
vchavatapalli Jul 15, 2025
746b345
chore: refactor XML payload into RequestFactory
jorwoods Jul 20, 2025
75f5f4c
style: black samples
jorwoods Jul 20, 2025
8ee48d1
Merge pull request #1 from jorwoods/jorwoods/conns_req_fact
vchavatapalli Jul 21, 2025
1fb57d5
Updated token name, value
vchavatapalli Jul 21, 2025
9c2bec3
Clean up
vchavatapalli Jul 21, 2025
a40d774
Added response parsing
vchavatapalli Jul 21, 2025
b407590
Fixed issues
vchavatapalli Jul 21, 2025
d8922ed
New APIs: Update multiple connections in a single workbook/datasource…
vchavatapalli Jul 21, 2025
dc92d17
Minor fixes to request payloads
vchavatapalli Jul 22, 2025
1add816
merge with dev branch
vchavatapalli Jul 23, 2025
a75bb40
Added assertions for test cases
vchavatapalli Jul 23, 2025
9a1c675
style fix
vchavatapalli Jul 23, 2025
b90473d
Fixed the login method
vchavatapalli Jul 24, 2025
0f62138
Merge pull request #1640 from vchavatapalli/minor-fixes-on-update-con…
jacalata Jul 25, 2025
755ddec
feat: enable toggling attribute capture for a site (#1619)
jorwoods Aug 1, 2025
bca08ba
fix: put special fields first (#1622)
jorwoods Aug 1, 2025
61062dc
feat: support OIDC endpoints (#1630)
jorwoods Aug 1, 2025
e51369c
feat: SiteAuthConfiguration str and repr (#1641)
jorwoods Aug 1, 2025
a7af8b7
fix: virtual connections username (#1628)
jorwoods Aug 1, 2025
9b84601
fix: add contentType to tags batch actions (#1643)
jorwoods Aug 9, 2025
d065506
fix: add missing closing tags (#1644)
jorwoods Oct 9, 2025
e8aed24
ci: run tests against python 3.14 (#1660)
jorwoods Oct 16, 2025
a196281
chore: pytestify test_datasource_model (#1656)
jorwoods Oct 16, 2025
915f1af
chore: convert workbook tests to pytest (#1645)
jorwoods Oct 16, 2025
59eaebb
chore: convert test_auth to pytest (#1646)
jorwoods Oct 17, 2025
575a1ae
chore: make datasource typing more specific (#1649)
jorwoods Oct 17, 2025
7bd23f4
chore: embrace pytest in test_datasource (#1648)
jorwoods Oct 17, 2025
c31784a
chore: pytestify test_connection_ (#1650)
jorwoods Oct 17, 2025
4ef5b99
chore: pytestify test_custom_view (#1651)
jorwoods Oct 17, 2025
3c6e6e9
chore: pytestify test_data_freshness_policy (#1653)
jorwoods Oct 17, 2025
388d5eb
chore: pytestify test_data_acceleration_report (#1652)
jorwoods Oct 17, 2025
4becca6
chore: pytestify test_dataalert (#1654)
jorwoods Oct 17, 2025
81f80ca
chore: pytestify test_database (#1655)
jorwoods Oct 17, 2025
022e6f1
feat: add WebAuthoringForFlows capability to Permission class (#1642)
valsarajnivea Oct 17, 2025
fd187ba
feat: support collections in favorites (#1647)
jorwoods Oct 17, 2025
cba111a
Add UAT (unified access token) support to JWT login (#1671)
BereketBirbo Oct 22, 2025
857e1c8
fix: mypy issues (#1667)
jorwoods Oct 29, 2025
49ff1ae
Update permissions_item.py --added ExtractRefresh attribute (#1617) (…
jorwoods Oct 29, 2025
2cb03a8
feat: make refresh consistent between endpoints (#1665)
jorwoods Oct 29, 2025
4417beb
chore: pytestify test_endpoint (#1673)
jorwoods Oct 29, 2025
e34cfe7
feat: make ResourceReference hashable (#1668)
jorwoods Nov 10, 2025
7b9d73b
samples: metadata.paginated_query (#1663)
jorwoods Nov 10, 2025
e648cd4
sample: basic user creation (#1664)
jorwoods Nov 10, 2025
0fe4e2a
Add standard Salesforce CODEOWNERS file (#1694)
bcantoni Nov 14, 2025
0f706c6
fix: datasource owner/project missing parsing (#1700)
jorwoods Nov 20, 2025
e8890d6
fix: datasource description update and publish (#1682)
jorwoods Nov 21, 2025
39fbcac
chore: pytestify favorites (#1674)
jorwoods Dec 22, 2025
89bdc42
chore: pytestify filter (#1675)
jorwoods Dec 22, 2025
9c4322e
chore: pytestify flows (#1676)
jorwoods Dec 22, 2025
d4de5bd
chore: pytestify flowruns (#1677)
jorwoods Dec 22, 2025
82a5c50
chore: pytestify flowtask (#1678)
jorwoods Dec 22, 2025
20d738b
chore: pytestify groups (#1679)
jorwoods Dec 22, 2025
423a042
chore: pytestify models repr (#1684)
jorwoods Dec 22, 2025
5e75a72
chore: pytestify group_sets (#1685)
jorwoods Dec 22, 2025
97124be
chore: pytestify jobs (#1686)
jorwoods Dec 22, 2025
ef7b971
chore: pytestify linked_tasks (#1687)
jorwoods Dec 22, 2025
af27931
chore: pytestify metadata (#1688)
jorwoods Dec 22, 2025
27dedc4
chore: pytestify pager (#1690)
jorwoods Dec 22, 2025
455e208
chore: pytestify permission_rule (#1691)
jorwoods Dec 22, 2025
ea10537
chore: pytestify project (#1692)
jorwoods Dec 22, 2025
2882019
chore: pytestify regressions (#1693)
jorwoods Dec 22, 2025
0e652ed
chore: pytestify oidc (#1689)
jorwoods Dec 22, 2025
d61ff8f
fix: black ci errors (#1713)
jorwoods Dec 23, 2025
f3f1ddf
chore: pytestify users (#1717)
jorwoods Dec 23, 2025
4f38f0a
chore: pytestify request_option (#1695)
jorwoods Dec 23, 2025
07be840
chore: pytestify requests (#1696)
jorwoods Dec 23, 2025
bc9154b
chore: pytestify schedule (#1697)
jorwoods Dec 23, 2025
661b53d
chore: pytestify server info (#1698)
jorwoods Dec 23, 2025
4daa34e
chore: pytestify views (#1707)
jorwoods Dec 23, 2025
e2f02bc
chore: pytestify task (#1706)
jorwoods Dec 23, 2025
bb127e8
chore: pytestify auth model (#1705)
jorwoods Dec 23, 2025
ade2ca0
chore: pytestify table (#1703)
jorwoods Dec 23, 2025
fcc8c8e
chore: pytestify subscriptions (#1702)
jorwoods Dec 23, 2025
29bf79a
chore: pytestify sort (#1701)
jorwoods Dec 23, 2025
54c48b0
chore: pytestify wb_model (#1710)
jorwoods Dec 23, 2025
1021903
chore: pytestify webhooks (#1709)
jorwoods Dec 23, 2025
a4f0c8a
chore: pytestify virtual connections (#1708)
jorwoods Dec 23, 2025
108b1bc
chore: pytestify ssl_config (#1722)
jorwoods Dec 23, 2025
bc11d2e
chore: pytestify filesys helpers (#1721)
jorwoods Dec 23, 2025
912b4f1
chore: pytestify metrics (#1720)
jorwoods Dec 23, 2025
eaa1602
chore: pytestify http_requests (#1719)
jorwoods Dec 23, 2025
e51f43c
chore: pytestify test_site (#1699)
jorwoods Dec 23, 2025
b4ef4a8
chore: pytestify file uploads (#1715)
jorwoods Dec 23, 2025
fbe5a95
Update urllib (FOSSA) and black (#1723)
jacalata Dec 23, 2025
ba43c97
feat: delete view (#1712)
jorwoods Dec 23, 2025
1e116f3
feat: batch create schedule (#1714)
jorwoods Dec 23, 2025
fe97749
feat: users csv import (#1409)
jorwoods Dec 23, 2025
4d67996
Add pytest-xdist plugin to speed up tests (#1681)
bcantoni Dec 23, 2025
19aaa33
chore: pytestify sort (#1725)
jorwoods Dec 26, 2025
e6b0ba1
chore: pytestify task_request (#1726)
jorwoods Dec 26, 2025
bfc692c
chore: pytestify exponential_backoff (#1727)
jorwoods Dec 26, 2025
2461518
chore: remove unused unittest imports (#1728)
jorwoods Dec 27, 2025
5146c09
fix: add workbook and view setter for custom view (#1730)
jorwoods Jan 6, 2026
f66bd09
feat: support extensions api (#1672)
jorwoods Jan 8, 2026
24cf1ad
Add support for receiving "Customized Monthly" schedule intervals (#1…
bcantoni Jan 14, 2026
6f525ff
fix: handle parameters for view filters (#1633)
jorwoods Jan 14, 2026
d9f644d
Jac/release automation (#1613)
jacalata Jan 21, 2026
12f50c4
implement #816: project.get_by_id (#1736)
jacalata Jan 22, 2026
09809d0
Merge branch 'master' into development
jacalata Jan 22, 2026
043efa1
refer to single package entrypoint (#1739)
jacalata Feb 1, 2026
6498a4f
jorwoods/package install fix (#1747)
jorwoods Feb 3, 2026
fd3cc99
Updated TSC with new API's
vchavatapalli Jul 15, 2025
72885d1
chore: refactor XML payload into RequestFactory
jorwoods Jul 20, 2025
16b49b4
style: black samples
jorwoods Jul 20, 2025
f5015df
Updated token name, value
vchavatapalli Jul 21, 2025
58c3a25
Clean up
vchavatapalli Jul 21, 2025
46f363f
Added response parsing
vchavatapalli Jul 21, 2025
2db07a9
Fixed issues
vchavatapalli Jul 21, 2025
b6880a3
Minor fixes to request payloads
vchavatapalli Jul 22, 2025
bc75250
New APIs: Update multiple connections in a single workbook/datasource…
vchavatapalli Jul 21, 2025
b40f4b8
Added assertions for test cases
vchavatapalli Jul 23, 2025
6e77096
style fix
vchavatapalli Jul 23, 2025
691597e
Fixed the login method
vchavatapalli Jul 24, 2025
6da100f
feat: enable toggling attribute capture for a site (#1619)
jorwoods Aug 1, 2025
c0af92d
fix: put special fields first (#1622)
jorwoods Aug 1, 2025
c19f581
feat: support OIDC endpoints (#1630)
jorwoods Aug 1, 2025
f1f7878
chore: convert workbook tests to pytest (#1645)
jorwoods Oct 16, 2025
eb08a9c
chore: embrace pytest in test_datasource (#1648)
jorwoods Oct 17, 2025
e110b21
chore: pytestify test_custom_view (#1651)
jorwoods Oct 17, 2025
69e1024
feat: add WebAuthoringForFlows capability to Permission class (#1642)
valsarajnivea Oct 17, 2025
b481498
feat: support collections in favorites (#1647)
jorwoods Oct 17, 2025
977a7e1
fix: mypy issues (#1667)
jorwoods Oct 29, 2025
e6e667b
Update permissions_item.py --added ExtractRefresh attribute (#1617) (…
jorwoods Oct 29, 2025
6415917
feat: make refresh consistent between endpoints (#1665)
jorwoods Oct 29, 2025
b75ebc8
fix: datasource owner/project missing parsing (#1700)
jorwoods Nov 20, 2025
659a445
fix: datasource description update and publish (#1682)
jorwoods Nov 21, 2025
5394f4d
chore: pytestify favorites (#1674)
jorwoods Dec 22, 2025
6184715
chore: pytestify flows (#1676)
jorwoods Dec 22, 2025
5a1eb00
chore: pytestify models repr (#1684)
jorwoods Dec 22, 2025
56791da
chore: pytestify metadata (#1688)
jorwoods Dec 22, 2025
60d1ff4
chore: pytestify project (#1692)
jorwoods Dec 22, 2025
e508797
chore: pytestify oidc (#1689)
jorwoods Dec 22, 2025
ea1aa00
chore: pytestify users (#1717)
jorwoods Dec 23, 2025
aeac515
chore: pytestify request_option (#1695)
jorwoods Dec 23, 2025
4dd27a6
chore: pytestify schedule (#1697)
jorwoods Dec 23, 2025
ace1a35
chore: pytestify server info (#1698)
jorwoods Dec 23, 2025
d7f5600
chore: pytestify views (#1707)
jorwoods Dec 23, 2025
bb894db
chore: pytestify sort (#1701)
jorwoods Dec 23, 2025
f991c67
chore: pytestify test_site (#1699)
jorwoods Dec 23, 2025
b8310e8
Update urllib (FOSSA) and black (#1723)
jacalata Dec 23, 2025
50971e8
feat: delete view (#1712)
jorwoods Dec 23, 2025
a8a2f3a
feat: batch create schedule (#1714)
jorwoods Dec 23, 2025
6f92520
feat: users csv import (#1409)
jorwoods Dec 23, 2025
6e58e4a
Add pytest-xdist plugin to speed up tests (#1681)
bcantoni Dec 23, 2025
c50ec97
chore: pytestify sort (#1725)
jorwoods Dec 26, 2025
1dbc437
chore: remove unused unittest imports (#1728)
jorwoods Dec 27, 2025
6d05cda
fix: add workbook and view setter for custom view (#1730)
jorwoods Jan 6, 2026
c4570a5
feat: support extensions api (#1672)
jorwoods Jan 8, 2026
0432ba3
Add support for receiving "Customized Monthly" schedule intervals (#1…
bcantoni Jan 14, 2026
08c3159
fix: handle parameters for view filters (#1633)
jorwoods Jan 14, 2026
c71bb66
Jac/release automation (#1613)
jacalata Jan 21, 2026
14c3ae2
implement #816: project.get_by_id (#1736)
jacalata Jan 22, 2026
4086f03
refer to single package entrypoint (#1739)
jacalata Feb 1, 2026
b116c69
jorwoods/package install fix (#1747)
jorwoods Feb 3, 2026
bab12fc
the attribute name is auth_type
jacalata Feb 3, 2026
c150916
fix: black ci errors (#1713)
jorwoods Dec 23, 2025
157daab
chore: pytestify ssl_config (#1722)
jorwoods Dec 23, 2025
455f481
Merge branch 'master' into development
jacalata Feb 3, 2026
08647c8
Merge branch 'master' into development
jacalata Feb 3, 2026
3c5977d
Fix incorrect assertion syntax in test_populate_data_quality_warning …
Copilot Feb 26, 2026
2f405f7
Fix typos in batch_update_state docstring (#1744)
Copilot Feb 26, 2026
6282cdb
feat: add SVG format support for view and custom view images (#1755)
RenaSpb Apr 6, 2026
ec0614e
#1090 add check for 409 error code (#1733)
jacalata Apr 6, 2026
314c9d4
Fix W-21968404: Make authentication_type optional in update_connectio…
vchavatapalli May 10, 2026
6acd12f
Update license information in pyproject.toml (#1776)
ecederstrand Jun 4, 2026
3b668cd
Remove deprecated `cgi` module and clean up related dead code (#1771)
Copilot Jun 16, 2026
5d9a3c5
chore: modernize Union and Optional type hints (#1774)
jorwoods Jun 17, 2026
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
15 changes: 11 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ name="tableauserverclient"
dynamic = ["version"]
description='A Python module for working with the Tableau Server REST API.'
authors = [{name="Tableau", email="github@tableau.com"}]
license = "MIT"
license-files = ["LICENSE"]
readme = "README.md"

Expand All @@ -18,15 +19,15 @@ dependencies = [
'urllib3>=2.6.0,<3',
'typing_extensions>=4.0',
]
requires-python = ">=3.9"
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13"
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14"
]
[project.urls]
repository = "https://github.com/tableau/server-client-python"
Expand All @@ -35,8 +36,14 @@ repository = "https://github.com/tableau/server-client-python"
test = ["black==24.10", "build", "mypy==1.4", "pytest>=7.0", "pytest-cov", "pytest-subtests",
"pytest-xdist", "requests-mock>=1.0,<2.0", "types-requests>=2.32.4.20250913"]

[tool.setuptools.package-data]
# Only include data for tableauserverclient, not for samples, test, docs
tableauserverclient = ["*"]

[tool.setuptools.packages.find]
where = ["tableauserverclient"]
where = ["."]
include = ["tableauserverclient*"]

[tool.setuptools.dynamic]
version = {attr = "versioneer.get_version"}

Expand Down
6 changes: 3 additions & 3 deletions samples/update_connections_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ def main():
# Resource-specific
parser.add_argument("resource_type", choices=["workbook", "datasource"])
parser.add_argument("resource_id")
parser.add_argument("datasource_username")
parser.add_argument("authentication_type")
parser.add_argument("--datasource_password", default=None, help="Datasource password (optional)")
parser.add_argument("--datasource_username", help="Datasource username (optional)")
parser.add_argument("--authentication_type", help="Authentication type (optional)")
parser.add_argument("--datasource_password", help="Datasource password (optional)")
parser.add_argument(
"--embed_password", default="true", choices=["true", "false"], help="Embed password (default: true)"
)
Expand Down
58 changes: 29 additions & 29 deletions tableauserverclient/bin/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
import re
import subprocess
import sys
from typing import Any, Callable, Dict, List, Optional, Tuple
from typing import Any, Callable
import functools


def get_keywords() -> Dict[str, str]:
def get_keywords() -> dict[str, str]:
"""Get the keywords needed to look up the version information."""
# these strings will be replaced by git during git-archive.
# setup.py/versioneer.py will grep for the variable names, so they must
Expand Down Expand Up @@ -61,8 +61,8 @@ class NotThisMethod(Exception):
"""Exception raised if a method is not valid for the current scenario."""


LONG_VERSION_PY: Dict[str, str] = {}
HANDLERS: Dict[str, Dict[str, Callable]] = {}
LONG_VERSION_PY: dict[str, str] = {}
HANDLERS: dict[str, dict[str, Callable]] = {}


def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator
Expand All @@ -77,18 +77,18 @@ def decorate(f: Callable) -> Callable:


def run_command(
commands: List[str],
args: List[str],
cwd: Optional[str] = None,
commands: list[str],
args: list[str],
cwd: str | None = None,
verbose: bool = False,
hide_stderr: bool = False,
env: Optional[Dict[str, str]] = None,
) -> Tuple[Optional[str], Optional[int]]:
env: dict[str, str] | None = None,
) -> tuple[str | None, int | None]:
"""Call the given command(s)."""
assert isinstance(commands, list)
process = None

popen_kwargs: Dict[str, Any] = {}
popen_kwargs: dict[str, Any] = {}
if sys.platform == "win32":
# This hides the console window if pythonw.exe is used
startupinfo = subprocess.STARTUPINFO()
Expand Down Expand Up @@ -128,7 +128,7 @@ def versions_from_parentdir(
parentdir_prefix: str,
root: str,
verbose: bool,
) -> Dict[str, Any]:
) -> dict[str, Any]:
"""Try to determine the version from the parent directory name.

Source tarballs conventionally unpack into a directory that includes both
Expand All @@ -153,13 +153,13 @@ def versions_from_parentdir(


@register_vcs_handler("git", "get_keywords")
def git_get_keywords(versionfile_abs: str) -> Dict[str, str]:
def git_get_keywords(versionfile_abs: str) -> dict[str, str]:
"""Extract version information from the given file."""
# the code embedded in _version.py can just fetch the value of these
# keywords. When used from setup.py, we don't want to import _version.py,
# so we do it with a regexp instead. This function is not used from
# _version.py.
keywords: Dict[str, str] = {}
keywords: dict[str, str] = {}
try:
with open(versionfile_abs, "r") as fobj:
for line in fobj:
Expand All @@ -182,10 +182,10 @@ def git_get_keywords(versionfile_abs: str) -> Dict[str, str]:

@register_vcs_handler("git", "keywords")
def git_versions_from_keywords(
keywords: Dict[str, str],
keywords: dict[str, str],
tag_prefix: str,
verbose: bool,
) -> Dict[str, Any]:
) -> dict[str, Any]:
"""Get version information from git keywords."""
if "refnames" not in keywords:
raise NotThisMethod("Short version file found")
Expand Down Expand Up @@ -254,7 +254,7 @@ def git_pieces_from_vcs(
root: str,
verbose: bool,
runner: Callable = run_command
) -> Dict[str, Any]:
) -> dict[str, Any]:
"""Get version from 'git describe' in the root of the source tree.

This only gets called if the git-archive 'subst' keywords were *not*
Expand Down Expand Up @@ -294,7 +294,7 @@ def git_pieces_from_vcs(
raise NotThisMethod("'git rev-parse' failed")
full_out = full_out.strip()

pieces: Dict[str, Any] = {}
pieces: dict[str, Any] = {}
pieces["long"] = full_out
pieces["short"] = full_out[:7] # maybe improved later
pieces["error"] = None
Expand Down Expand Up @@ -386,14 +386,14 @@ def git_pieces_from_vcs(
return pieces


def plus_or_dot(pieces: Dict[str, Any]) -> str:
def plus_or_dot(pieces: dict[str, Any]) -> str:
"""Return a + if we don't already have one, else return a ."""
if "+" in pieces.get("closest-tag", ""):
return "."
return "+"


def render_pep440(pieces: Dict[str, Any]) -> str:
def render_pep440(pieces: dict[str, Any]) -> str:
"""Build up version string, with post-release "local version identifier".

Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
Expand All @@ -418,7 +418,7 @@ def render_pep440(pieces: Dict[str, Any]) -> str:
return rendered


def render_pep440_branch(pieces: Dict[str, Any]) -> str:
def render_pep440_branch(pieces: dict[str, Any]) -> str:
"""TAG[[.dev0]+DISTANCE.gHEX[.dirty]] .

The ".dev0" means not master branch. Note that .dev0 sorts backwards
Expand Down Expand Up @@ -448,7 +448,7 @@ def render_pep440_branch(pieces: Dict[str, Any]) -> str:
return rendered


def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]:
def pep440_split_post(ver: str) -> tuple[str, int | None]:
"""Split pep440 version string at the post-release segment.

Returns the release segments before the post-release and the
Expand All @@ -458,7 +458,7 @@ def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]:
return vc[0], int(vc[1] or 0) if len(vc) == 2 else None


def render_pep440_pre(pieces: Dict[str, Any]) -> str:
def render_pep440_pre(pieces: dict[str, Any]) -> str:
"""TAG[.postN.devDISTANCE] -- No -dirty.

Exceptions:
Expand All @@ -482,7 +482,7 @@ def render_pep440_pre(pieces: Dict[str, Any]) -> str:
return rendered


def render_pep440_post(pieces: Dict[str, Any]) -> str:
def render_pep440_post(pieces: dict[str, Any]) -> str:
"""TAG[.postDISTANCE[.dev0]+gHEX] .

The ".dev0" means dirty. Note that .dev0 sorts backwards
Expand All @@ -509,7 +509,7 @@ def render_pep440_post(pieces: Dict[str, Any]) -> str:
return rendered


def render_pep440_post_branch(pieces: Dict[str, Any]) -> str:
def render_pep440_post_branch(pieces: dict[str, Any]) -> str:
"""TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] .

The ".dev0" means not master branch.
Expand Down Expand Up @@ -538,7 +538,7 @@ def render_pep440_post_branch(pieces: Dict[str, Any]) -> str:
return rendered


def render_pep440_old(pieces: Dict[str, Any]) -> str:
def render_pep440_old(pieces: dict[str, Any]) -> str:
"""TAG[.postDISTANCE[.dev0]] .

The ".dev0" means dirty.
Expand All @@ -560,7 +560,7 @@ def render_pep440_old(pieces: Dict[str, Any]) -> str:
return rendered


def render_git_describe(pieces: Dict[str, Any]) -> str:
def render_git_describe(pieces: dict[str, Any]) -> str:
"""TAG[-DISTANCE-gHEX][-dirty].

Like 'git describe --tags --dirty --always'.
Expand All @@ -580,7 +580,7 @@ def render_git_describe(pieces: Dict[str, Any]) -> str:
return rendered


def render_git_describe_long(pieces: Dict[str, Any]) -> str:
def render_git_describe_long(pieces: dict[str, Any]) -> str:
"""TAG-DISTANCE-gHEX[-dirty].

Like 'git describe --tags --dirty --always -long'.
Expand All @@ -600,7 +600,7 @@ def render_git_describe_long(pieces: Dict[str, Any]) -> str:
return rendered


def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]:
def render(pieces: dict[str, Any], style: str) -> dict[str, Any]:
"""Render the given version pieces into the requested style."""
if pieces["error"]:
return {"version": "unknown",
Expand Down Expand Up @@ -636,7 +636,7 @@ def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]:
"date": pieces.get("date")}


def get_versions() -> Dict[str, Any]:
def get_versions() -> dict[str, Any]:
"""Get version information or return default if unable to do so."""
# I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have
# __file__, we can work backwards from there to the root. Some
Expand Down
17 changes: 0 additions & 17 deletions tableauserverclient/helpers/headers.py

This file was deleted.

19 changes: 9 additions & 10 deletions tableauserverclient/models/collection_item.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from datetime import datetime
from typing import Optional
from xml.etree.ElementTree import Element

from defusedxml.ElementTree import fromstring
Expand All @@ -11,15 +10,15 @@

class CollectionItem:
def __init__(self) -> None:
self.id: Optional[str] = None
self.name: Optional[str] = None
self.description: Optional[str] = None
self.created_at: Optional[datetime] = None
self.updated_at: Optional[datetime] = None
self.owner: Optional[UserItem] = None
self.total_item_count: Optional[int] = None
self.permissioned_item_count: Optional[int] = None
self.visibility: Optional[str] = None # Assuming visibility is a string, adjust as necessary
self.id: str | None = None
self.name: str | None = None
self.description: str | None = None
self.created_at: datetime | None = None
self.updated_at: datetime | None = None
self.owner: UserItem | None = None
self.total_item_count: int | None = None
self.permissioned_item_count: int | None = None
self.visibility: str | None = None # Assuming visibility is a string, adjust as necessary

@classmethod
def from_response(cls, response: bytes, ns) -> list[Self]:
Expand Down
39 changes: 19 additions & 20 deletions tableauserverclient/models/connection_item.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
from typing import Optional

from defusedxml.ElementTree import fromstring

Expand Down Expand Up @@ -51,42 +50,42 @@ class ConnectionItem:
"""

def __init__(self):
self._datasource_id: Optional[str] = None
self._datasource_name: Optional[str] = None
self._id: Optional[str] = None
self._connection_type: Optional[str] = None
self._datasource_id: str | None = None
self._datasource_name: str | None = None
self._id: str | None = None
self._connection_type: str | None = None
self.embed_password: bool = None
self.password: Optional[str] = None
self.server_address: Optional[str] = None
self.server_port: Optional[str] = None
self.username: Optional[str] = None
self.connection_credentials: Optional[ConnectionCredentials] = None
self._query_tagging: Optional[bool] = None
self._auth_type: Optional[str] = None
self.password: str | None = None
self.server_address: str | None = None
self.server_port: str | None = None
self.username: str | None = None
self.connection_credentials: ConnectionCredentials | None = None
self._query_tagging: bool | None = None
self._auth_type: str | None = None

@property
def datasource_id(self) -> Optional[str]:
def datasource_id(self) -> str | None:
return self._datasource_id

@property
def datasource_name(self) -> Optional[str]:
def datasource_name(self) -> str | None:
return self._datasource_name

@property
def id(self) -> Optional[str]:
def id(self) -> str | None:
return self._id

@property
def connection_type(self) -> Optional[str]:
def connection_type(self) -> str | None:
return self._connection_type

@property
def query_tagging(self) -> Optional[bool]:
def query_tagging(self) -> bool | None:
return self._query_tagging

@query_tagging.setter
@property_is_boolean
def query_tagging(self, value: Optional[bool]):
def query_tagging(self, value: bool | None):
# if connection type = hyper, Snowflake, or Teradata, we can't change this value: it is always true
if self._connection_type in ["hyper", "snowflake", "teradata"]:
logger.debug(
Expand All @@ -96,11 +95,11 @@ def query_tagging(self, value: Optional[bool]):
self._query_tagging = value

@property
def auth_type(self) -> Optional[str]:
def auth_type(self) -> str | None:
return self._auth_type

@auth_type.setter
def auth_type(self, value: Optional[str]):
def auth_type(self, value: str | None):
self._auth_type = value

def __repr__(self):
Expand Down
Loading
Loading