-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add function decorator #6413
Add function decorator #6413
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
f"This will be removed in version: {self.version}." | ||
) | ||
return line_wrap_message(warning_tag(f"Deprecated functionality\n\n{description}")) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what the text log line looks like:
17:42:33 [WARNING]: Deprecated functionality
Call to deprecated function raise_compiler_error.
Details of deprecation: Not doing it this way
To resolve this deprecation: raise CompilationException directly.
This will be removed in version 1.5.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dbeatty10 can I get your feedback on what information would be useful to get passed as an adapter maintainer? The user won't be able to do anything here but ideally the maintainer can easily fix the deprecated function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for my late reply here @emmyoop !
Here's a variant aiming to be succint and readable:
17:42:33 [WARNING]: `raise_compiler_error` is deprecated and will be removed in dbt-core version 1.5.0
Adapter maintainers can resolve this deprecation by using `raise CompilationException` directly instead.
Lorem ipsum dolor sit amet
Here's where each of the relevant variables would fit in:
17:42:33 [WARNING]: `{self.function_name}` is deprecated and will be removed in dbt-core version {self.version}
Adapter maintainers can resolve this deprecation by {self.suggested_action}.
{self.reason}
f472f37
to
5231c2d
Compare
bd34660
to
e85fb67
Compare
5231c2d
to
ac59674
Compare
resolves #6393
Description
Add decorator and attach to functions to be removed from
exceptions.py
as part of #6339Checklist
changie new
to create a changelog entry