diff --git a/artifactory.py b/artifactory.py index 5131f5b..43d0f4e 100755 --- a/artifactory.py +++ b/artifactory.py @@ -1565,6 +1565,12 @@ def _init(self, *args, **kwargs): super(ArtifactoryPath, self)._init(*args, **kwargs) + def __reduce__(self): + # pathlib.PurePath.__reduce__ doesn't include instance state, but we + # have state that needs to be included when pickling + pathlib_reduce = super().__reduce__() + return pathlib_reduce[0], pathlib_reduce[1], self.__dict__ + @property def top(self): obj = ArtifactoryPath(self.drive)