def __getstate__(self):
        """
        Support serialization by discarding cached L{os.stat} results and
        returning everything else.
        """
        d = self.__dict__.copy()
        if '_statinfo' in d:
            del d['_statinfo']
        return d

        Support serialization by discarding cached L{os.stat} results and
        returning everything else.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/filepath.py