Mysql python3 compatibility hack