[issue26182] Deprecation warnings for the future async and await keywords

Brett Cannon report at bugs.python.org
Tue Feb 2 13:10:08 EST 2016


Brett Cannon added the comment:

I'm not quite sure what you mean by "do not know how to check if the deprecation warning are enabled". Do you mean how do you make sure you don't emit a DeprecationWarning if someone hasn't turned warnings on? If that's the case then if you look at some example code and read https://docs.python.org/3/c-api/exceptions.html#issuing-warnings you will notice that when you call the warning-related functions, all you have to do is check if the return value is < 0, then return like there is an exception raised. Otherwise the warnings module handles whether something will be shown.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26182>
_______________________________________


More information about the Python-bugs-list mailing list