-
Notifications
You must be signed in to change notification settings - Fork 94
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
Mscolab refactor2 #2533
Mscolab refactor2 #2533
Conversation
76bd423
to
8905a00
Compare
8905a00
to
c64067d
Compare
c64067d
to
a3dfc2b
Compare
* Move (most) communication with server to ConnectionManager class to have consistent calls and error handling (e.g. timeout). * More consistently use json() method of response. * Removed single letter variables.
a3dfc2b
to
0e45a73
Compare
if r.status_code == 401: | ||
raise requests.exceptions.ConnectionError | ||
response = session.post(url, data=data, timeout=tuple(config_loader(dataset="MSCOLAB_timeout"))) | ||
response.raise_for_status() |
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.
I am not sure what happens on e.g. 403 now.
The 401 in the past was used to get into the http_auth, which already is changed too.
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.
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.
I mean we only raised explicity on 401 raise requests.exceptions.ConnectionError
I have not found where it was used and got changed there now too
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.
The next envisioned change goes deeper in this direction, but I wanted to keep it "small".
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.
I looked up the changes against some existing servers and have not found a problem.
Anyway a few comments added, please have a look
update copyright string
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.
looks good, also mscolab tutorial suceeds
Purpose of PR?:
Handle communication with server in a more consistent manner.
Does this PR introduce a breaking change?
No