Skip to content
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

Fix url encoding of list parameters #3657

Merged
merged 1 commit into from
Jul 25, 2017
Merged

Conversation

isra17
Copy link
Contributor

@isra17 isra17 commented Jul 24, 2017

Issue can easily be reproduce with API using list parameters such as testIamPermissions in Cloud Storage.
Before the fix, using a list end up with this error:

bucket.test_iam_permissions(['storage.buckets.delete','storage.buckets.get'])
# Raises
# google.cloud.exceptions.BadRequest: 400 null is not a valid Google Cloud Storage permission. (GET https://www.googleapis.com/storage/v1/b/some-buckets/iam/testPermissions?permissions=%5B%27storage.buckets.delete%27%2C+%27storage.buckets.get%27%5D)

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Jul 24, 2017
@isra17
Copy link
Contributor Author

isra17 commented Jul 24, 2017

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Jul 24, 2017
Copy link
Contributor

@tseaver tseaver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@isra17 Thanks for the patch! Can you please add a unit test (like the one in your example above) which fails when 'query_params' contains a list value?

@isra17
Copy link
Contributor Author

isra17 commented Jul 25, 2017

Couldn't really add a test from my initial example since API tests rely on mocking, but I modified the _http test.

@tseaver tseaver merged commit a88a334 into googleapis:master Jul 25, 2017
@tseaver
Copy link
Contributor

tseaver commented Jul 25, 2017

@isra17 Thank you very much!

landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 21, 2017
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: core cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants