py3 fixes
Merge pull request #1284 from kivy/py3_fixes

py3 fixes