Skip to content

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

Merged
tseaver merged 1 commit into
googleapis:masterfrom
tseaver:storage-bump_stack_level_in_deprecation_warnings
Sep 7, 2018
Merged

Storage: Add 'stacklevel=2' to deprecation warnings.#5897
tseaver merged 1 commit into
googleapis:masterfrom
tseaver:storage-bump_stack_level_in_deprecation_warnings

Conversation

@tseaver

@tseaver tseaver commented Sep 6, 2018

Copy link
Copy Markdown
Contributor

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
@tseaver tseaver requested a review from theacodes as a code owner September 6, 2018 22:53
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 6, 2018
@tseaver

tseaver commented Sep 7, 2018

Copy link
Copy Markdown
Contributor Author

@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.

@frankyn frankyn left a comment

Copy link
Copy Markdown
Contributor

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