From eff160a69bfe0378142754f289d6904556b148ff Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Mon, 8 Sep 2025 21:44:12 +0800 Subject: [PATCH] Fix test Signed-off-by: Manjusaka --- Lib/pathlib/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/pathlib/__init__.py b/Lib/pathlib/__init__.py index 5b79b20cb0e..498444ee544 100644 --- a/Lib/pathlib/__init__.py +++ b/Lib/pathlib/__init__.py @@ -214,6 +214,8 @@ def __hash__(self): hash_data = [self._drv + self._root] + self._tail elif self._tail and self.parser.splitdrive(self._tail[0])[0]: hash_data = ['.'] + self._tail + if self.parser is not posixpath: + hash_data = [part.lower() for part in hash_data] self._hash = hash(tuple(hash_data)) return self._hash