Python 3 compatibility for the most recent 2 patchsets :)