From 240ed7dd39ede831c2e9ce59f6165ad4c3aeaa81 Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Tue, 27 Oct 2020 20:36:10 +0800 Subject: [PATCH] Minimal effort for Python 2 Don't fix what's not reported. --- src/pip/_internal/utils/temp_dir.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pip/_internal/utils/temp_dir.py b/src/pip/_internal/utils/temp_dir.py index d2c42feea28..4475a7d40ae 100644 --- a/src/pip/_internal/utils/temp_dir.py +++ b/src/pip/_internal/utils/temp_dir.py @@ -203,8 +203,7 @@ def cleanup(self): # natively for paths, and the bytes-text conversion omission avoids # errors caused by the environment configuring encodings incorrectly. if WINDOWS: - encoding = sys.getfilesystemencoding() - rmtree(ensure_text(self._path, encoding=encoding)) + rmtree(ensure_text(self._path)) else: rmtree(self._path)