changes by nick.york for python3