Follow on to #2405 that handles some Python3-specific issues that slipped through the cracks