use 2to3 on some files + fix type tests in parser.py