Switch to using __name__

func_name was deprecated in Python 3