Allow XBlock to run under python 3