python3 compatibility for account models