-
Notifications
You must be signed in to change notification settings - Fork 484
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
feat(hub): Emit deprecation warnings from Hub
API
#3280
feat(hub): Emit deprecation warnings from Hub
API
#3280
Conversation
When testing this change manually, I was able to see the deprecation warnings in console when calling Hub APIs from a simple Python script. However, when I tried calling Hub APIs from a request handler (both in Flask and FastAPI), I did not see the deprecation warning in the console, unless I manually configured a warning filter to display deprecation warnings. Do you have any idea why this could be @sl0thentr0py? Is there anything we can do here to make sure server framework users get warned, or is this just a configuration option that the user would have to set? |
Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time. ❌ Failed Test Results:Completed 13480 tests with View the full list of failed testspy3.12-common
py3.12-gevent
py3.13-common
|
@szokeasaurusrex I was wondering earlier why you guys are using the |
@sl0thentr0py I wanted to make this be raised as a However, I looked into Do you think using the |
so far everyone else has just used |
@sl0thentr0py after further investigation, it looks like the reason why I was not seeing the Furthermore, using the So in short, I think using |
fee1fd7
to
556a1fd
Compare
`sentry_sdk.Hub` has been deprecated since Sentry SDK version 2.0.0 per our docs; however, we waited with adding deprecation warnings because the SDK itself was still using `Hub` APIs until recently. Since we no longer use `Hub` APIs in the SDK (except in `Hub` APIs which are themselves deprecated), we can now start emitting deprecation warnings. Closes #3265
556a1fd
to
da15b63
Compare
Deprecation warnings can also be set to always be shown by setting the Seems like Python is intentionally designed to limit deprecation warnings from showing in logs at runtime, which makes sense because they are not actionable for end users of an application, only for developers. |
32d1874
to
1365d2b
Compare
1365d2b
to
69eb0f0
Compare
sentry_sdk.Hub
has been deprecated since Sentry SDK version 2.0.0 per our docs; however, we waited with adding deprecation warnings because the SDK itself was still usingHub
APIs until recently.Since we no longer use
Hub
APIs in the SDK (except inHub
APIs which are themselves deprecated), we can now start emitting deprecation warnings.Closes #3265