FAQs
Managing warning messages from the CSD Python API
Solution
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)