Add `warnings.deprecated`
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 it no-op on non TYPE_CHECKING)
Pull Request Checklist
- [x] implement the feature
- [x] write the documentation
- [x] mention the version
- [x] include a release note
Depends-on #3059, #3117, ~~BGZ#2295924~~
Great, this is a nice issue with pre-commit running a versioned tmt-lint instead of the current one from source (dependencies are not being updated)
Do you know if we're able to utilize this for informing users about pending/existing deprecations?
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 click and dataclasses side, so would have to rely on them to figure out how to make a support for type-hinting these.
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.
That would require decorators to work on attributes?
/packit build
/packit test
/packit build
Unrelated failures, merging.