I tried to review your commits relating to py3 compatibility. I am unsure about "PY3" os environment. Is this set by the python3 installation or must be set by hand?
This must be set by hand. Python 3 support is not functional yet, so I have kept the 'Pywikibot is not Python 3 compatible' error in place. Of course, to work on Py3 support, one has to be able to ignore that error -- which is exactly what the PY3 environment variable does.