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


On Thu, Jul 29, 2021, 5:26 PM Leonardo Freua <> 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 --
To unsubscribe send an email to
Message archived at
Code of Conduct: