MySQL Connector/Python Developer Guide / ... / Connector/Python API Reference / Errors and Exceptions / errors.Warning Exception
This exception is used for reporting important warnings, however, Connector/Python does not use it. It is included to be compliant with the Python Database Specification v2.0 (PEP-249).
Consider using either more strictServer SQL Modes or theraise_on_warnings connection argument to make Connector/Python raise errors when your queries produce warnings.
errors.Warning is a subclass of the PythonStandardError.