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

Small APIdocs improvement #2828

Merged
merged 5 commits into from Mar 18, 2024
Merged

Conversation

antonpirker
Copy link
Member

@antonpirker antonpirker commented Mar 15, 2024

This PR makes sure all apidocs are recreated always (by deleting an eventually existing docs/_build folder) and also adds some minor changes to set_level and set_tag to make the types of parameters clear.

This is related to this Docs PR: getsentry/sentry-docs#5432

Makefile Show resolved Hide resolved
Copy link
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

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

Looks good, see comment

sentry_sdk/scope.py Show resolved Hide resolved
@antonpirker antonpirker enabled auto-merge (squash) March 18, 2024 09:12

:param value: The level to set.
"""
logger.warning(
Copy link
Member

Choose a reason for hiding this comment

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

@antonpirker Why are you emitting the warning with logger? When I have had to emit deprecation warnings, I usually do so as follows:

warnings.warn("blah blah blah", DeprecationWarning, stacklevel=2)

Is there any significant difference with using logger.warning vs warnings.warn? Do we have a preference in the SDKs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just used it because all the other deprecation warnings in that file do it the same way.

@antonpirker antonpirker merged commit 9bdd029 into master Mar 18, 2024
124 checks passed
@antonpirker antonpirker deleted the antonpirker/small-apidocs-improvement branch March 18, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants