Warning messages from the CSD Python API can be suppressed or turned into errors using a native Python feature described at this link.
The function to use is warnings.filterwarnings
.
To throw an exception whenever a deprecated function is called:
import warnings warnings.filterwarnings('error', '.*deprecated.*', DeprecationWarning, '.*', 0)
To instead ignore all warnings about deprecated functions:
import warnings warnings.filterwarnings('ignore', '.*deprecated.*', DeprecationWarning, '.*', 0)
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article