-
Notifications
You must be signed in to change notification settings - Fork 20
Conversation
connection_type=connection_type) | ||
return resp, content | ||
|
||
http.request = new_request |
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.
Wait, why can't subclass 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.
subclass google_auth_httplib2.AuthorizedHttp?
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.
Yeah. That seems like the obvious way to customize a classes behavior and I was wondering if that would be more appropriate here.
The newest version of google-api-python client fixes the bug that we encountered when trying to use this. Updated the package versioning as well as removed duplicate code. Latest output of print statements: ------------Create Project------- Which shows that the user agent string has been appeneded. |
http=http_client) | ||
auth_http = google_auth_httplib2.AuthorizedHttp(credentials) | ||
user_agent = '/'.join(['django-cloud-deploy', __version__.__version__]) | ||
auth_http = http.set_user_agent(auth_http, user_agent) |
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.
auth_http = http.set_user_agent(auth_http, user_agent) | |
http.set_user_agent(auth_http, user_agent) |
We previosuly thought we were sending the user agent string, but googleapis/google-api-python-client#656 showed us that it was implemented incorrectly. The additional code from utils is required until this
PR: googleapis/google-api-python-client#658 is merged.