-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fixed some python2->3 string issues #671
Conversation
@@ -171,6 +172,9 @@ def make_exception(response, content, use_json=True): | |||
:rtype: instance of :class:`GCloudError`, or a concrete subclass. | |||
:returns: Exception specific to the error response. | |||
""" | |||
if six.PY3 and isinstance(content, bytes): | |||
content = content.decode('utf-8') # pragma: NO COVER Py3K |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@foozlevazquez How did you test that the failures in #653 are passing? Can you add unit tests? Also, can you PS I see you've signed the CLA, @googlebot is useful sometimes! |
@foozlevazquez Is this the
|
Great! Let me know if you need some help and I can make some suggestions / lend a hand. |
@foozlevazquez What's up? |
@dhermes Also, I realized that #653 has a root cause of some python2-3 string crap that is taking place in oauth2client here - So I'm working on a pull-request for that as well. Essentially I'm having to untangle a set of fixes I made in a hacking frenzy... :) Thanks for checking. |
That's great! I can help on the The people who added Python 3 support there weren't actually running unit tests (eek!) and I tried to fix most of it in: |
+1 to fixing any/all issues in oauth2client. @nathanielmanistaatgoogle or @soltanmm is likely to be quicker than me with the code reviews. |
The origin of this all is some code that simply does the following:
The example above dies with the infamous I've initiated googleapis/oauth2client#136 to fix and test the above. To fix problems with |
* docs: Minor formatting chore: Update gapic-generator-python to v1.11.5 build: Update rules_python to 0.24.0 PiperOrigin-RevId: 563436317 Source-Link: googleapis/googleapis@42fd37b Source-Link: googleapis/googleapis-gen@280264c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjgwMjY0Y2EwMmZiOTMxNmI0MjM3YTk2ZDBhZjFhMjM0M2E4MWE1NiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
fixes: Attribute error thrown in gcloud/exceptions.py #653