From: Barney Gale Date: Fri, 17 Apr 2020 17:47:27 +0000 (+0100) Subject: bpo-39894: Route calls from pathlib.Path.samefile() to os.stat() via the path accesso... X-Git-Tag: v3.9.0a6~80 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5b1d9184bb0e34391637c06bc7651fb6de8a6240;p=thirdparty%2FPython%2Fcpython.git bpo-39894: Route calls from pathlib.Path.samefile() to os.stat() via the path accessor (GH-18836) --- diff --git a/Lib/pathlib.py b/Lib/pathlib.py index d3e89dfbc88a..88ebe030c7ff 100644 --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -1131,7 +1131,7 @@ class Path(PurePath): try: other_st = other_path.stat() except AttributeError: - other_st = os.stat(other_path) + other_st = self._accessor.stat(other_path) return os.path.samestat(st, other_st) def iterdir(self):