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

Storage: Add 'stacklevel=2' to deprecation warnings. #5897

Merged
merged 1 commit into from
Sep 7, 2018
Merged

Storage: Add 'stacklevel=2' to deprecation warnings. #5897

merged 1 commit into from
Sep 7, 2018

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Sep 6, 2018

Add test assertion for warning from 'Bucket.location' setter.

Add test assertion for warning from 'Bucket.location' setter.
@tseaver tseaver added the api: storage Issues related to the Cloud Storage API. label Sep 6, 2018
@tseaver tseaver requested a review from frankyn September 6, 2018 22:53
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 6, 2018
@tseaver
Copy link
Contributor Author

tseaver commented Sep 7, 2018

@frankyn FWIW, stacklevel=2 makes the warning report the file / line number of the caller of the deprecated method, which is much more useful than the file / line number where the warning was emitted.

Copy link
Member

@frankyn frankyn left a comment

Choose a reason for hiding this comment

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

LGTM, had to read a little bit to understand. thanks for adding an explanation.

@tseaver tseaver merged commit de5b775 into googleapis:master Sep 7, 2018
@tseaver tseaver deleted the storage-bump_stack_level_in_deprecation_warnings branch September 7, 2018 18:58
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 Cloud 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.

3 participants