From 52259d9e008d29eafa047043b8ffd75205fb623a Mon Sep 17 00:00:00 2001 From: Jac Fitzgerald Date: Mon, 9 Nov 2026 13:54:32 -0800 Subject: [PATCH 1/3] Deprecate DataAccelerationReport.get Tableau deprecated data acceleration in Tableau Server 2022.1 and retired it, with its REST API methods, in Tableau Server 2026.2. It was never available on Tableau Cloud. Emit a DeprecationWarning from get so callers are told the method will be removed in a future release. Related to #734 Co-Authored-By: Claude Code --- .../data_acceleration_report_endpoint.py | 33 +++++++++++++++++++ test/test_data_acceleration_report.py | 4 ++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/tableauserverclient/server/endpoint/data_acceleration_report_endpoint.py b/tableauserverclient/server/endpoint/data_acceleration_report_endpoint.py index 579001156..168afa915 100644 --- a/tableauserverclient/server/endpoint/data_acceleration_report_endpoint.py +++ b/tableauserverclient/server/endpoint/data_acceleration_report_endpoint.py @@ -1,4 +1,5 @@ import logging +import warnings from .default_permissions_endpoint import _DefaultPermissionsEndpoint from .endpoint import api, Endpoint @@ -21,6 +22,38 @@ def baseurl(self): @api(version="3.8") def get(self, req_options=None): + """ + Gets the data acceleration report for the current site, which compares + page load times for sheets before and after data acceleration. + + Deprecated: this method will be removed in a future release of this + library. Tableau retired data acceleration and its REST API methods + in Tableau Server 2026.2, and it was never available on Tableau Cloud. + + REST API: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_site.htm#get_data_acceleration_report + + Parameters + ---------- + req_options : RequestOptions, optional + Options to pass to the request. + + Returns + ------- + DataAccelerationReportItem + The report, with one comparison record per accelerated sheet. + + Warnings + -------- + This method is deprecated. Tableau Cloud and Tableau Server 2026.2 and + later return an error for this request. + """ + warnings.warn( + "DataAccelerationReport.get is deprecated and will be removed. Tableau retired data acceleration " + "in Tableau Server 2026.2.", + DeprecationWarning, + # 3, not 2: the @api wrapper adds a frame, and the warning should point at the caller. + stacklevel=3, + ) logger.info("Querying data acceleration report") url = self.baseurl server_response = self.get_request(url, req_options) diff --git a/test/test_data_acceleration_report.py b/test/test_data_acceleration_report.py index c0589a84b..56fcbd954 100644 --- a/test/test_data_acceleration_report.py +++ b/test/test_data_acceleration_report.py @@ -26,8 +26,10 @@ def test_get_data_acceleration_report(server): response_xml = GET_XML.read_text() with requests_mock.mock() as m: m.get(server.data_acceleration_report.baseurl, text=response_xml) - data_acceleration_report = server.data_acceleration_report.get() + with pytest.warns(DeprecationWarning, match="deprecated and will be removed") as record: + data_acceleration_report = server.data_acceleration_report.get() + assert record[0].filename == __file__ assert 2 == len(data_acceleration_report.comparison_records) assert "site-1" == data_acceleration_report.comparison_records[0].site From 3ed416145fb679e3f8fb77c31c169b2f717cefb6 Mon Sep 17 00:00:00 2001 From: Jac Fitzgerald Date: Mon, 9 Nov 2026 13:55:28 -0800 Subject: [PATCH 2/3] Fix DataAccelerationReportItem.__repr__ repr() raised because it referenced self.site, which the item does not have, and a bare sheet_uri. Report the number of comparison records instead, and add a test. Co-Authored-By: Claude Code --- tableauserverclient/models/data_acceleration_report_item.py | 2 +- test/test_data_acceleration_report.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tableauserverclient/models/data_acceleration_report_item.py b/tableauserverclient/models/data_acceleration_report_item.py index 3a8883bed..3bc509a06 100644 --- a/tableauserverclient/models/data_acceleration_report_item.py +++ b/tableauserverclient/models/data_acceleration_report_item.py @@ -47,7 +47,7 @@ def __init__(self, comparison_records): self._comparison_records = comparison_records def __repr__(self): - return f"<(deprecated)DataAccelerationReportItem site={self.site} sheet={sheet_uri}>" + return f"<(deprecated)DataAccelerationReportItem records={len(self._comparison_records)}>" @property def comparison_records(self): diff --git a/test/test_data_acceleration_report.py b/test/test_data_acceleration_report.py index 56fcbd954..f4924ae9e 100644 --- a/test/test_data_acceleration_report.py +++ b/test/test_data_acceleration_report.py @@ -45,3 +45,8 @@ def test_get_data_acceleration_report(server): assert "1.29" == data_acceleration_report.comparison_records[1].avg_non_accelerated_plt assert "3" == data_acceleration_report.comparison_records[1].accelerated_session_count assert "0.372" == data_acceleration_report.comparison_records[1].avg_accelerated_plt + + +def test_data_acceleration_report_item_repr(): + item = TSC.models.DataAccelerationReportItem([]) + assert "records=0" in repr(item) From 841e256b65d60ebc91055384e5dfc10b143ad09c Mon Sep 17 00:00:00 2001 From: Jac Fitzgerald Date: Tue, 10 Nov 2026 12:49:39 -0800 Subject: [PATCH 3/3] DataAccelerationReport.get docstring: state the REST API version and the 404 response Co-Authored-By: Claude Code --- .../server/endpoint/data_acceleration_report_endpoint.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tableauserverclient/server/endpoint/data_acceleration_report_endpoint.py b/tableauserverclient/server/endpoint/data_acceleration_report_endpoint.py index 168afa915..96ced4ebf 100644 --- a/tableauserverclient/server/endpoint/data_acceleration_report_endpoint.py +++ b/tableauserverclient/server/endpoint/data_acceleration_report_endpoint.py @@ -28,7 +28,8 @@ def get(self, req_options=None): Deprecated: this method will be removed in a future release of this library. Tableau retired data acceleration and its REST API methods - in Tableau Server 2026.2, and it was never available on Tableau Cloud. + in Tableau Server 2026.2 (REST API 3.29). The method is not available + on Tableau Cloud. REST API: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_site.htm#get_data_acceleration_report @@ -45,7 +46,7 @@ def get(self, req_options=None): Warnings -------- This method is deprecated. Tableau Cloud and Tableau Server 2026.2 and - later return an error for this request. + later respond to this request with a 404 (error code 404003). """ warnings.warn( "DataAccelerationReport.get is deprecated and will be removed. Tableau retired data acceleration "