Python 2 and 3 compatibility for 90bcc3a44ec1430b4.