[python3] compatibility update