Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ArtifactoryPath: override PurePath.__reduce__ to fix pickling
`pathlib.PurePath` instances can be reconstructed from only `self._parts`, so that is all that `PurePath.__reduce__` returns. This means that pickling an `ArtifactoryPath` objects strips out all other instance state including, crucially, `self.session` and the auth data it includes. This commit overrides `__reduce__` to include `self.__dict__` in the returned tuple, which is restored as instance state on unpickle per https://docs.python.org/3/library/pickle.html#object.__reduce__.
- Loading branch information