Removed usage of names that don't exist on py3k

Some of the semantics will probably need adjustment, but for now this is the best we can do. flake8 now runs clean under py3k, we have to wait for all the dependencies to be ported at this point.