New submission from Leonardo Freua <[email protected]>:
Would it be interesting to create a @deprecated decorator to avoid adding
warnings.warn("deprecation message", DeprecationWarning, stacklevel=2) in
methods body?
Using the decorator approach to indicate depreciation would make the methods
cleaner (leaving only their responsibilities in the body) and would be easier
to identify, as the cue would be close to the method signature and not mixed
with the logic inside the body.
If everyone agrees, I could submit a PR (as a draft) for us to evaluate this
functionality.
----------
components: Library (Lib)
messages: 397958
nosy: Leonardofreua
priority: normal
severity: normal
status: open
title: Create a @deprecated decorator (annotation)
type: enhancement
versions: Python 3.11
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue44701>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com