ENH: some python3 compatibilities