-
Notifications
You must be signed in to change notification settings - Fork 125
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 warnings.deprecated
#3062
Add warnings.deprecated
#3062
Conversation
ec1fbc7
to
59eb157
Compare
Great, this is a nice issue with pre-commit running a versioned |
892b23f
to
3749ff3
Compare
3749ff3
to
f2d6af7
Compare
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.
Do you know if we're able to utilize this for informing users about pending/existing deprecations?
Few places with deprecating stuff:
Line 2802 in 0e68636
#: Mark the option as deprecated. Instance of :py:class:`Deprecated` |
Line 33 in 0e68636
class Deprecated: |
Line 211 in 0e68636
def assert_feeling_safe(self, deprecated_in_version: str, subject: str) -> None: |
I'm thinking, deprecated decorator, which would accept 'deprecated in' and 'text' args, which would be visible to end user. Like the --feeling-safe, but easily reusable.
Hmm, would need to mull it over. Easily, no, there is none that I could find when navigating through the usage. The implementation seems to rely on native support for deprecation on
That would require decorators to work on attributes? |
/packit build |
/packit test |
f2d6af7
to
91ffdbd
Compare
Signed-off-by: Cristian Le <[email protected]> Signed-off-by: Cristian Le <[email protected]>
Signed-off-by: Cristian Le <[email protected]>
/packit build |
Unrelated failures, merging. |
Signed-off-by: Cristian Le <[email protected]> Signed-off-by: Cristian Le <[email protected]>
This is used to add both static type-checking deprecations and run-time as well. For now it requires upgrading
typing-extensions
to a required conditional dependency, otherwise the dynamic deprecation would not apply (and would require some trickery to make itno-op
on nonTYPE_CHECKING
)Pull Request Checklist
Depends-on #3059,
#3117(managed without it),BGZ#2295924