To be safe I think we should also hash `getattr(self.func, '__code__', None)` and `getattr(self.func, '__dict__', None)` as based on some inline ipython checks, adding attributes or modifying the `__code__` attribute does not change the hash value.