diff --git a/97b2b0cdee755b3ca5975c6ec111234b2eb97146.patch b/97b2b0cdee755b3ca5975c6ec111234b2eb97146.patch new file mode 100644 index 0000000000000000000000000000000000000000..b8c4046ca8797fe8d476ccfd3d8ce16c8007a507 --- /dev/null +++ b/97b2b0cdee755b3ca5975c6ec111234b2eb97146.patch @@ -0,0 +1,51 @@ +diff --git a/news/f0b01f0a-f673-4c1b-9959-3196b6c000e9.trivial.rst b/news/f0b01f0a-f673-4c1b-9959-3196b6c000e9.trivial.rst +new file mode 100644 +index 0000000000..e69de29bb2 +diff --git a/src/pip/_internal/req/req_uninstall.py b/src/pip/_internal/req/req_uninstall.py +index 43d42c3b41..eea2508db8 100644 +--- a/src/pip/_internal/req/req_uninstall.py ++++ b/src/pip/_internal/req/req_uninstall.py +@@ -13,7 +13,6 @@ + from pip._internal.utils.compat import WINDOWS + from pip._internal.utils.logging import indent_log + from pip._internal.utils.misc import ( +- FakeFile, + ask, + dist_in_usersite, + dist_is_local, +@@ -90,7 +89,7 @@ def uninstallation_paths(dist): + + UninstallPathSet.add() takes care of the __pycache__ .py[co]. + """ +- r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD'))) ++ r = csv.reader(dist.get_metadata_lines('RECORD')) + for row in r: + path = os.path.join(dist.location, row[0]) + yield path +diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py +index dcd23ec65f..bd205ada5d 100644 +--- a/src/pip/_internal/utils/misc.py ++++ b/src/pip/_internal/utils/misc.py +@@ -572,22 +572,6 @@ def write_output(msg, *args): + logger.info(msg, *args) + + +-class FakeFile: +- """Wrap a list of lines in an object with readline() to make +- ConfigParser happy.""" +- def __init__(self, lines): +- self._gen = iter(lines) +- +- def readline(self): +- try: +- return next(self._gen) +- except StopIteration: +- return '' +- +- def __iter__(self): +- return self._gen +- +- + class StreamWrapper(StringIO): + + @classmethod diff --git a/python-pip.spec b/python-pip.spec index 3d035b59a33f24b5c58f6925acf4d9cb6a79f840..9261cad749f60b61e264a0171e90c87411ca3be7 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -6,7 +6,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: 3 +Release: 4 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 @@ -16,6 +16,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: 97b2b0cdee755b3ca5975c6ec111234b2eb97146.patch Source10: pip-allow-older-versions.patch %description %{_description} @@ -112,6 +113,9 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} %{python_wheeldir}/%{python_wheelname} %changelog +* 20201228025849754267 patch-tracking 20.2.2-4 +- append patch file of upstream repository from <97b2b0cdee755b3ca5975c6ec111234b2eb97146> to <97b2b0cdee755b3ca5975c6ec111234b2eb97146> + * Wed Nov 4 2020 wangjie -20.2.2-3 - Type:NA - ID:NA @@ -161,4 +165,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