From 563d990d389e82efcbe4c41b604fb5865b3f823c Mon Sep 17 00:00:00 2001 From: Jac Fitzgerald Date: Wed, 17 Jun 2026 21:01:14 -0700 Subject: [PATCH 1/2] chore: bump black from 24.10 to 26.3.1 Fixes high severity CVE in black's cache file handling. black is a dev-only dependency; end users are not affected. Co-Authored-By: Claude Sonnet 4.6 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c832ffe71..ebb4fe8be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ classifiers = [ repository = "https://github.com/tableau/server-client-python" [project.optional-dependencies] -test = ["black==24.10", "build", "mypy==1.4", "pytest>=7.0", "pytest-cov", "pytest-subtests", +test = ["black==26.3.1", "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] From 8149979d81347adfcadcf07d35d9b2e9fd160d41 Mon Sep 17 00:00:00 2001 From: Jac Fitzgerald Date: Wed, 17 Jun 2026 21:45:18 -0700 Subject: [PATCH 2/2] style: apply black 26.3.1 formatting Co-Authored-By: Claude Sonnet 4.6 --- samples/export.py | 2 +- samples/smoke_test.py | 1 - tableauserverclient/datetime_helpers.py | 1 - tableauserverclient/helpers/strings.py | 1 - tableauserverclient/models/column_item.py | 2 +- tableauserverclient/models/data_alert_item.py | 4 +--- tableauserverclient/models/subscription_item.py | 8 ++------ .../server/endpoint/data_alert_endpoint.py | 1 - tableauserverclient/server/endpoint/schedules_endpoint.py | 2 +- tableauserverclient/server/pager.py | 1 - tableauserverclient/server/request_factory.py | 2 +- tableauserverclient/server/server.py | 1 - test/test_extensions.py | 1 - test/test_job.py | 1 - 14 files changed, 7 insertions(+), 21 deletions(-) diff --git a/samples/export.py b/samples/export.py index b2506cf46..3200d491f 100644 --- a/samples/export.py +++ b/samples/export.py @@ -73,7 +73,7 @@ def main(): # We encode that information above in the const=(...) parameter to the add_argument function to make # the code automatically adapt for the type of export the user is doing. # We unroll that information into methods we can call, or objects we can create by using getattr() - (populate_func_name, option_factory_name, member_name, extension) = args.type + populate_func_name, option_factory_name, member_name, extension = args.type populate = getattr(server.views, populate_func_name) if args.workbook: populate = getattr(server.workbooks, populate_func_name) diff --git a/samples/smoke_test.py b/samples/smoke_test.py index b23eacdb8..778686abf 100644 --- a/samples/smoke_test.py +++ b/samples/smoke_test.py @@ -4,7 +4,6 @@ import logging import tableauserverclient as TSC - logger = logging.getLogger("Sample") logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler()) diff --git a/tableauserverclient/datetime_helpers.py b/tableauserverclient/datetime_helpers.py index 00f62faf8..7beb0276e 100644 --- a/tableauserverclient/datetime_helpers.py +++ b/tableauserverclient/datetime_helpers.py @@ -1,6 +1,5 @@ import datetime - ZERO = datetime.timedelta(0) HOUR = datetime.timedelta(hours=1) diff --git a/tableauserverclient/helpers/strings.py b/tableauserverclient/helpers/strings.py index 6ba4e48d9..1ad70e677 100644 --- a/tableauserverclient/helpers/strings.py +++ b/tableauserverclient/helpers/strings.py @@ -2,7 +2,6 @@ from functools import singledispatch from typing import TypeVar, overload - # the redact method can handle either strings or bytes, but it can't mix them. # Generic type so we can write the actual logic once, then use singledispatch to # create the replacement text with the correct type diff --git a/tableauserverclient/models/column_item.py b/tableauserverclient/models/column_item.py index 3a7416e28..dd4c1254f 100644 --- a/tableauserverclient/models/column_item.py +++ b/tableauserverclient/models/column_item.py @@ -54,7 +54,7 @@ def from_response(cls, resp, ns): all_column_xml = parsed_response.findall(".//t:column", namespaces=ns) for column_xml in all_column_xml: - (id, name, description, remote_type) = cls._parse_element(column_xml, ns) + id, name, description, remote_type = cls._parse_element(column_xml, ns) column_item = cls(name) column_item._set_values(id, name, description, remote_type) all_column_items.append(column_item) diff --git a/tableauserverclient/models/data_alert_item.py b/tableauserverclient/models/data_alert_item.py index ff62c3ae8..02ebb6409 100644 --- a/tableauserverclient/models/data_alert_item.py +++ b/tableauserverclient/models/data_alert_item.py @@ -37,9 +37,7 @@ def __init__(self): def __repr__(self) -> str: return "".format( - **self.__dict__ - ) + public={_public}>".format(**self.__dict__) @property def id(self) -> str | None: diff --git a/tableauserverclient/models/subscription_item.py b/tableauserverclient/models/subscription_item.py index 61c75e2d6..9ae99e398 100644 --- a/tableauserverclient/models/subscription_item.py +++ b/tableauserverclient/models/subscription_item.py @@ -29,14 +29,10 @@ def __init__(self, subject: str, schedule_id: str, user_id: str, target: "Target def __repr__(self) -> str: if self.id is not None: return "