<div dir="ltr">Hi all,<div><br></div><div>I have opened <a href="http://bugs.python.org/issue27175">http://bugs.python.org/issue27175</a> a month and a half ago but didn't get any feedback there, so I'll copy-paste it here for comments:</div><div><br></div><div><div>Currently, pickling Path objects lead to issues when working across platforms: Paths (and, thus, objects that contain Paths) created on a POSIX platform (PosixPaths) cannot be unpickled on Windows and vice versa.  There are a few possibilities around this issue.</div><div><br></div><div>- Don't do anything about it, you should use PurePaths if you care about cross-platform compatibility: this would be pretty awkward, as any call to the Path API would require converting back the PurePath to a Path first.</div><div><br></div><div>- Silently convert Paths to PurePaths during pickling (a solution that seems to have been adopted by <a href="http://docs.menpo.org/en/stable/api/menpo/io/export_pickle.html">http://docs.menpo.org/en/stable/api/menpo/io/export_pickle.html</a> for example): it would be better if Paths at least roundtripped correctly within a single platform.</div><div><br></div><div>- Convert Paths to PurePaths at unpickling time, only if the platform is different (and possibly with a warning): this is the least bad solution I came up with so far.  Note that calls to the Path API on a "converted" PurePath object would be invalid anyways as the PurePath (being of a different platform) cannot be representing a valid path.</div><div><br></div><div>Thoughts?</div></div><div><br></div><div>Antony</div></div>