-
Notifications
You must be signed in to change notification settings - Fork 9
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
logging future warnings #50
Comments
FYI @idomic |
Do you mean every time we show the future warnings, meanwhile we will log the event to PostHog? |
a function that will show a FutureWarning, but also log the event to posthog |
@tonykploomber please write an AC of what you think is expected here before starting on this. |
Acceptance Criteria: We want to record:
@edublancas Let me know if this makes sense to you. And we want to make it as the decorator function and apply it to |
We created the from warnings import warn
def deprecation_warning(message):
warn(message, FutureWarning)
# also log the event to posthog Then, if in JupySQL we want to deprecate if args.some_argument is not None:
deprecation_warning("--some argument has been deprecated") Later, we can decide if we also add posthog calls to the |
whenever we have to change the API, we display a FutureWarning to users so they have a chance to update their code. However, we don't know the proportion of them that already switched.
It'd be better to log these events, so we know when users need more time to switch because we want to ship new features as fast as possible without compromising stability.
We can add a
telemetry.deprecation_warning
method that useswarnings.warn
(with FutureWarning) and captures the event.The text was updated successfully, but these errors were encountered: