Preparation for Python3 support