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: update user_project usage and documentation in bucket/client class methods #396

Merged
merged 8 commits into from Mar 23, 2021

Conversation

cojenco
Copy link
Contributor

@cojenco cojenco commented Mar 22, 2021

The parameter user_project is the project to be billed for the request; It is required for requests to buckets that have Requester Pays enabled. This PR includes changes with the aim of enhancing consistency and clarity to user_project usage:

  • revise user_project description in docstring to be consistent with c.g.c and other language libraries
  • correct user_project usage in docstring examples and deprecated Bucket.create()
  • add example using user_project in Client.get_bucket(), which is used frequently in the samples

Fixes #148

@cojenco cojenco requested a review from a team March 22, 2021 22:59
@cojenco cojenco requested a review from a team as a code owner March 22, 2021 22:59
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/python-storage API. label Mar 22, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 22, 2021
google/cloud/storage/bucket.py Outdated Show resolved Hide resolved
google/cloud/storage/client.py Outdated Show resolved Hide resolved
@cojenco cojenco requested a review from andrewsg March 23, 2021 21:14
Copy link
Contributor

@andrewsg andrewsg left a comment

Choose a reason for hiding this comment

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

Thanks!

@cojenco cojenco merged commit 1a2734b into master Mar 23, 2021
@cojenco cojenco deleted the user-project-148 branch March 23, 2021 23:15
cojenco added a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
…ss methods (googleapis#396)

* fix: update documentation and usage of user_project in bucket class methods

* revise Bucket.create() docstring

* revise Bucket @Property user_project docstring

* add example to client.get_bucket() with user_project

* revise deprecated Bucket.create() and unit test

* fix lint

* address review changes
cojenco added a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
…ss methods (googleapis#396)

* fix: update documentation and usage of user_project in bucket class methods

* revise Bucket.create() docstring

* revise Bucket @Property user_project docstring

* add example to client.get_bucket() with user_project

* revise deprecated Bucket.create() and unit test

* fix lint

* address review changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/python-storage API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose 'user_project' parameter to the bucket class related methods
2 participants