py3k portability updates