Skip to content

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

Closed
wants to merge 3 commits into from

Conversation

marcomix54
Copy link

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):"

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
@@ -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"
Copy link
Contributor

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.

@@ -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"
Copy link
Contributor

@graysonarts graysonarts Jun 18, 2018

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.

Copy link
Author

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.
Copy link
Collaborator

@t8y8 t8y8 left a 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.

@t8y8
Copy link
Collaborator

t8y8 commented Jun 18, 2018

I would support a comment in the code that says "this doesn't need to be updated" because of that

@irwando
Copy link

irwando commented Jul 30, 2019

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.

@irwando irwando closed this Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants