Re: Deprecation APIs and language tooling

12 Jul
2021
12 Jul
'21
3:53 p.m.
This already exists as `warnings.DeprecationWarning` see the documentation here: https://docs.python.org/3/library/exceptions.html#DeprecationWarning
That said, the fact that this is hidden by default [as seen here]( https://docs.python.org/3/library/warnings.html)..
Base category for warnings about deprecated features when those warnings
are intended for other Python developers (ignored by default, unless triggered by code in `__main__`).
..makes it almost useless for most. Going back to your original suggestion though, having some decorator similar to NodeJs `util.deprecate` (which only prints the warning once) would be very convenient and much easier detected by editors and linters.
625
Age (days ago)
625
Last active (days ago)
0 comments
1 participants
participants (1)
-
Blue