-
Notifications
You must be signed in to change notification settings - Fork 444
Adding reference to new REST API version 3.0 #305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Adding to "_PRODUCT_TO_REST_VERSION" the new REST API version. Changing in "def __init__(self, server_address, use_server_version=False):" Changing in "def _determine_highest_version(self):"
Adding reference to new REST API version 3.0
tableauserverclient/server/server.py
Outdated
@@ -76,7 +77,7 @@ def _get_legacy_version(self): | |||
def _determine_highest_version(self): | |||
try: | |||
old_version = self.version | |||
self.version = "2.4" | |||
self.version = "3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change this one. The endpoint we are using to check the highest version was introduced in 2.4, so we need to force it to use that version to cover old versions.
tableauserverclient/server/server.py
Outdated
@@ -30,7 +31,7 @@ def __init__(self, server_address, use_server_version=False): | |||
self._session = requests.Session() | |||
self._http_options = dict() | |||
|
|||
self.version = "2.3" | |||
self.version = "3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change this one either. 2.3 is the oldest version we support, so we want to default to the oldest version unless specifically detected to be earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Russ,
So if I remove this change and initialise the server with use_server_version = True. then it works. Is that how I'm supposed to do it?
Do we expect people to know that or is it documented?
Marc
Remove unnecessary changes from Russells' feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be necessary -- the server_info call will get the version from the response as long as it gets called.
I would support a comment in the code that says "this doesn't need to be updated" because of that |
As mentioned we changed how version numbers were accessed, now going through the getServerInfo call. No need for these updates and no action in a year. Closing this. |
On server.py
Adding to "_PRODUCT_TO_REST_VERSION" the new REST API version.
Changing in "def init(self, server_address, use_server_version=False):"
Changing in "def _determine_highest_version(self):"