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 <rep...@bugs.python.org>
<http://bugs.python.org/issue26182>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to