From 6e9085d129d04f4e7d9c1e7333c3c8c90d15542b Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Wed, 28 Oct 2020 02:30:11 +0800 Subject: [PATCH 1/2] [patch tracking] 20201028023007638464 - https://github.com/pypa/pip/commit/a0ec4be98bcad63f9848c9c7b0cd2ed9afa00ff3 --- ...4be98bcad63f9848c9c7b0cd2ed9afa00ff3.patch | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 a0ec4be98bcad63f9848c9c7b0cd2ed9afa00ff3.patch diff --git a/a0ec4be98bcad63f9848c9c7b0cd2ed9afa00ff3.patch b/a0ec4be98bcad63f9848c9c7b0cd2ed9afa00ff3.patch new file mode 100644 index 0000000..ecdc07a --- /dev/null +++ b/a0ec4be98bcad63f9848c9c7b0cd2ed9afa00ff3.patch @@ -0,0 +1,54 @@ +diff --git a/news/8658.bugfix.rst b/news/8658.bugfix.rst +new file mode 100644 +index 0000000000..6e43c8b3c0 +--- /dev/null ++++ b/news/8658.bugfix.rst +@@ -0,0 +1,2 @@ ++Only converts Windows path to unicode on Python 2 to avoid regressions when a ++POSIX environment does not configure the file system encoding correctly. +diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py +index c122beb32b..4fb64d2672 100644 +--- a/src/pip/_internal/utils/misc.py ++++ b/src/pip/_internal/utils/misc.py +@@ -137,7 +137,7 @@ def get_prog(): + # Retry every half second for up to 3 seconds + @retry(stop_max_delay=3000, wait_fixed=500) + def rmtree(dir, ignore_errors=False): +- # type: (Text, bool) -> None ++ # type: (AnyStr, bool) -> None + shutil.rmtree(dir, ignore_errors=ignore_errors, + onerror=rmtree_errorhandler) + +diff --git a/src/pip/_internal/utils/temp_dir.py b/src/pip/_internal/utils/temp_dir.py +index 220a093e2f..371958c931 100644 +--- a/src/pip/_internal/utils/temp_dir.py ++++ b/src/pip/_internal/utils/temp_dir.py +@@ -10,6 +10,7 @@ + from pip._vendor.contextlib2 import ExitStack + from pip._vendor.six import ensure_text + ++from pip._internal.utils.compat import WINDOWS + from pip._internal.utils.misc import enum, rmtree + from pip._internal.utils.typing import MYPY_CHECK_RUNNING + +@@ -195,10 +196,17 @@ def cleanup(self): + """Remove the temporary directory created and reset state + """ + self._deleted = True +- if os.path.exists(self._path): +- # Make sure to pass unicode on Python 2 to make the contents also +- # use unicode, ensuring non-ASCII names and can be represented. ++ if not os.path.exists(self._path): ++ return ++ # Make sure to pass unicode on Python 2 to make the contents also ++ # use unicode, ensuring non-ASCII names and can be represented. ++ # This is only done on Windows because POSIX platforms use bytes ++ # natively for paths, and the bytes-text conversion omission avoids ++ # errors caused by the environment configuring encodings incorrectly. ++ if WINDOWS: + rmtree(ensure_text(self._path)) ++ else: ++ rmtree(self._path) + + + class AdjacentTempDirectory(TempDirectory): -- Gitee From 4366cf9229c57f19a65e4e9ff34500fbf277689b Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Wed, 28 Oct 2020 02:30:11 +0800 Subject: [PATCH 2/2] [patch tracking] 20201028023007638464 - update spec file --- python-pip.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 05f810a..bc25ab1 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -7,7 +7,7 @@ pip is the package installer for Python. You can use pip to install packages fro %global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d}) Name: python-%{srcname} Version: 20.2.2 -Release: 2 +Release: 3 Summary: A tool for installing and managing Python packages License: MIT and Python and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD) URL: http://www.pip-installer.org @@ -17,6 +17,7 @@ Patch1: allow-stripping-given-prefix-from-wheel-RECORD-files.patch Patch2: emit-a-warning-when-running-with-root-privileges.patch Patch3: remove-existing-dist-only-if-path-conflicts.patch Patch6000: dummy-certifi.patch +Patch6001: a0ec4be98bcad63f9848c9c7b0cd2ed9afa00ff3.patch Source10: pip-allow-older-versions.patch %description %{_description} @@ -140,6 +141,9 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} %{python_wheeldir}/%{python_wheelname} %changelog +* 20201028023007638464 patch-tracking 20.2.2-3 +- append patch file of upstream repository from to + * Tue Sep 1 2020 wenzhanli - 20.2.2-2 - add pip-allow-older-versions.patch @@ -183,4 +187,4 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} - DESC: Synchronize a patch * Mon Sep 23 2019 openEuler Buildteam - 18.0-6 -- Package init +- Package init \ No newline at end of file -- Gitee