Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Lib/pathlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,7 @@ def __rtruediv__(self, key):
return NotImplemented

def __reduce__(self):
# Using the parts tuple helps share interned path parts
# when pickling related paths.
return (self.__class__, self.parts)
return self.__class__, tuple(self._raw_paths)

def __repr__(self):
return "{}({!r})".format(self.__class__.__name__, self.as_posix())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Speed up pickling of :class:`pathlib.PurePath` objects. Patch by Barney
Gale.