Feature or enhancement
Proposal:
Seems like when adding warnings.deprecated in #104004, it was forgotten to add one of the two stack skipping arguments.
It needs it for the same reasons why it already got stacklevel, e.g. because adding decorators adds stack levels in a hard to predict way (e.g. a 3rd party decorator might start calling the wrapped function one level deeper, suddenly changing where the warning points)
Has this already been discussed elsewhere?
Yes, and it was accepted, but then apparently fogotten, see link below
cc @brettcannon @JelleZijlstra
Links to previous discussion of this feature:
https://discuss.python.org/t/pep-702-marking-deprecations-using-the-type-system/23036/11
Linked PRs
Feature or enhancement
Proposal:
Seems like when adding
warnings.deprecatedin #104004, it was forgotten to add one of the two stack skipping arguments.It needs it for the same reasons why it already got
stacklevel, e.g. because adding decorators adds stack levels in a hard to predict way (e.g. a 3rd party decorator might start calling the wrapped function one level deeper, suddenly changing where the warning points)Has this already been discussed elsewhere?
Yes, and it was accepted, but then apparently fogotten, see link below
cc @brettcannon @JelleZijlstra
Links to previous discussion of this feature:
https://discuss.python.org/t/pep-702-marking-deprecations-using-the-type-system/23036/11
Linked PRs
skip_file_prefixestowarnings.deprecated#156937