chore: remove legacy REST API version shim for servers pre-2.4

Open
#1,824 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
api

Research direction

Review server.py, especially _PRODUCT_TO_REST_VERSION, _get_legacy_version(), and _determine_highest_version(). First resolve whether the minimum supported version should be 2.4 or 3.0, then remove the legacy compatibility paths and update the minimum and default versions so pre-2.4 servers are no longer supported.

Written by the indexing model from the issue text.

Description

Summary

Remove the compatibility shim that supports connecting to Tableau Server versions that predate REST API 2.4 (i.e., Tableau Server 10.0 and earlier, released before 2017).

Background

server.py currently has:

_PRODUCT_TO_REST_VERSION = {
    "10.0": "2.3",
    "9.3": "2.2",
    ...
}
minimum_supported_server_version = "2.3"
default_server_version = "2.4"  # first version that dropped the legacy auth endpoint

The _get_legacy_version() method hits /auth?format=xml — a pre-2.4 endpoint — because servers that old don't support the standard /serverinfo REST API endpoint. _determine_highest_version() falls back to this when serverInfo returns a 404.

What to remove

  • _PRODUCT_TO_REST_VERSION dict
  • _get_legacy_version() method
  • The two except branches in _determine_highest_version() that call _get_legacy_version()
  • Raise minimum_supported_server_version to "2.4" (or "3.0" — see below)
  • Update default_server_version to match

Impact on users

None, unless they are connecting to Tableau Server 10.0 (released 2016) or earlier. Tableau Server 10.x reached end of life in 2019. All currently-supported Tableau Server versions use REST API 3.x.

Note: the @api(version="2.x") decorators on endpoint methods are minimum version requirements, not upper bounds — they are unaffected by this change and no endpoint methods are removed.

Decision needed

Should minimum_supported_server_version be raised to "2.4" (first version with /serverinfo) or "3.0" (Tableau Server 2018.1, 6+ years old)? The code change is identical either way; the difference is only the documented policy.

Dominant language
Python
Stars
716
Forks
446
Avg merge
8d 8h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tableau/server-client-python

All issues in tableau/server-client-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.