-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Have /api return the IPython version #6654
Conversation
Note this is IPython version, not API version, but I'm not sure this really matters for now. |
That's perfect! Thank you. John -----Original Message----- closes #6647 You can merge this Pull Request by running |
I agree, knowing the ipython version will be sufficient information to implement appropriate logic in EIN. Thanks again! John -----Original Message----- Note this is IPython version, not API version, but I'm not sure this really matters for now. |
@json_errors | ||
def get(self): | ||
# not authenticated, so give as few info as possible | ||
self.finish(json.dumps({"version":IPython.version_info})) |
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 should probably just be IPython.__version__
. We aren't using version tuples in any other APIs.
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 should probably just be IPython.version. We aren't using version tuples in any other APIs.
But it's an API, it would require frontends to parse or version string, which we always know is sooo reliable. Or worse, people will start comparing strings and will be bitten by "10.0.0" < "9.0.0". And's it's not because we did things wrong elsewhere that we shouldn't do it right here.
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.
But it's an API, it would require frontends to parse or version string
Yup, as all version checks should. We store the IPython version in js in a string, too. Versions are generally stored in strings.
Yes, I'm optimistic that we will reach IPython 9.0.0 and skip over it from 8 to 10. |
return version as a string, to be consistent with other APIs. closes ipython#6647
Amended. |
LGTM |
Have /api return the IPython version
Have /api return the IPython version
closes #6647
Mostly opening that to discus what we should have in here.
@millejoh would that suite you ?
I'm reluctant on displaying more on a non-authenticated response, like os, commit....
and I believe at least this should be available on non-auth user so that at least they know how to authenticate.