> 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.fr...@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-le...@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/TGQVDHA4QWFSQYSJUUBERSTH4FJ76QDH/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@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/7WCBL5GUYQKDI45OD5VYKPQGSDEO6W5N/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to