How to disable Python warnings?

Look at the Temporarily Suppressing Warnings section of the Python docs: If you are using code that you know will raise a warning, such as a deprecated function, but do not want to see the warning, then it is possible to suppress the warning using the catch_warnings context manager: import warnings def fxn(): warnings.warn(“deprecated”, DeprecationWarning) … Read more