
Perhaps another approach would be to make a more general purpose warning decorator, that would give a warning when invoking a function or instantiating a class. It could be used for deprecation notices, of course, but has the potential for tooling to give other types of warnings, such as using a thread unsafe call in a threading context.
What about "mark" import mark @mark.deprecated @mark.slow @mark.thread_unsafe @mark.insecure On Thu, Jul 29, 2021, 5:26 PM Leonardo Freua < leonardo.batista.freua@gmail.com> wrote:
Hi Sergei, I really thought your proposal was very good, in fact, it's quite complete with examples in libraries that I didn't even know implement a depreciation API.
Thanks for the contribution. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/TGQVDH... Code of Conduct: http://python.org/psf/codeofconduct/