smart_str() is not so smart. If you find a cleaner way to make it work with Python 3.X go for it.