Skip to content

Commit 52259d9

Browse files
jacalataclaude
andcommitted
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 <noreply@anthropic.com>
1 parent a5a8c48 commit 52259d9

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

‎tableauserverclient/server/endpoint/data_acceleration_report_endpoint.py‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import warnings
23

34
from .default_permissions_endpoint import _DefaultPermissionsEndpoint
45
from .endpoint import api, Endpoint
@@ -21,6 +22,38 @@ def baseurl(self):
2122

2223
@api(version="3.8")
2324
def get(self, req_options=None):
25+
"""
26+
Gets the data acceleration report for the current site, which compares
27+
page load times for sheets before and after data acceleration.
28+
29+
Deprecated: this method will be removed in a future release of this
30+
library. Tableau retired data acceleration and its REST API methods
31+
in Tableau Server 2026.2, and it was never available on Tableau Cloud.
32+
33+
REST API: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_site.htm#get_data_acceleration_report
34+
35+
Parameters
36+
----------
37+
req_options : RequestOptions, optional
38+
Options to pass to the request.
39+
40+
Returns
41+
-------
42+
DataAccelerationReportItem
43+
The report, with one comparison record per accelerated sheet.
44+
45+
Warnings
46+
--------
47+
This method is deprecated. Tableau Cloud and Tableau Server 2026.2 and
48+
later return an error for this request.
49+
"""
50+
warnings.warn(
51+
"DataAccelerationReport.get is deprecated and will be removed. Tableau retired data acceleration "
52+
"in Tableau Server 2026.2.",
53+
DeprecationWarning,
54+
# 3, not 2: the @api wrapper adds a frame, and the warning should point at the caller.
55+
stacklevel=3,
56+
)
2457
logger.info("Querying data acceleration report")
2558
url = self.baseurl
2659
server_response = self.get_request(url, req_options)

‎test/test_data_acceleration_report.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ def test_get_data_acceleration_report(server):
2626
response_xml = GET_XML.read_text()
2727
with requests_mock.mock() as m:
2828
m.get(server.data_acceleration_report.baseurl, text=response_xml)
29-
data_acceleration_report = server.data_acceleration_report.get()
29+
with pytest.warns(DeprecationWarning, match="deprecated and will be removed") as record:
30+
data_acceleration_report = server.data_acceleration_report.get()
3031

32+
assert record[0].filename == __file__
3133
assert 2 == len(data_acceleration_report.comparison_records)
3234

3335
assert "site-1" == data_acceleration_report.comparison_records[0].site

0 commit comments

Comments
 (0)