setup.py distributed with mako runs 2to3 by default on systems with python3.
2to3 automatically changes unicode() to str() making some of the places where unicode() appears incorrect.
i.e. filters.py line 59: unicode(str(x), encoding=key)
is getting changed to: str(str(x), encoding=key)