From c3561e8e33242c650d0eea73cb842fbf69c7c8ae Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Tue, 8 Dec 2020 14:58:56 +0800 Subject: [PATCH 1/2] [patch tracking] 20201208145849754962 - https://github.com/pypa/pip/commit/fd8ddb6e55086500b1d836b07365ba7404f53e3b --- ...db6e55086500b1d836b07365ba7404f53e3b.patch | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 fd8ddb6e55086500b1d836b07365ba7404f53e3b.patch diff --git a/fd8ddb6e55086500b1d836b07365ba7404f53e3b.patch b/fd8ddb6e55086500b1d836b07365ba7404f53e3b.patch new file mode 100644 index 0000000..93fa919 --- /dev/null +++ b/fd8ddb6e55086500b1d836b07365ba7404f53e3b.patch @@ -0,0 +1,31 @@ +diff --git a/news/9203.bugfix.rst b/news/9203.bugfix.rst +new file mode 100644 +index 0000000000..29b39d66c3 +--- /dev/null ++++ b/news/9203.bugfix.rst +@@ -0,0 +1,2 @@ ++New resolver: Correctly implement PEP 592. Do not return yanked versions from ++an index, unless the version range can only be satisfied by yanked candidates. +diff --git a/src/pip/_internal/resolution/resolvelib/factory.py b/src/pip/_internal/resolution/resolvelib/factory.py +index f4177d981f..c723d343bf 100644 +--- a/src/pip/_internal/resolution/resolvelib/factory.py ++++ b/src/pip/_internal/resolution/resolvelib/factory.py +@@ -193,8 +193,17 @@ def iter_index_candidates(): + specifier=specifier, + hashes=hashes, + ) ++ icans = list(result.iter_applicable()) ++ ++ # PEP 592: Yanked releases must be ignored unless only yanked ++ # releases can satisfy the version range. So if this is false, ++ # all yanked icans need to be skipped. ++ all_yanked = all(ican.link.is_yanked for ican in icans) ++ + # PackageFinder returns earlier versions first, so we reverse. +- for ican in reversed(list(result.iter_applicable())): ++ for ican in reversed(icans): ++ if not all_yanked and ican.link.is_yanked: ++ continue + yield self._make_candidate_from_link( + link=ican.link, + extras=extras, -- Gitee From f06358f779f427001fc7ac2d54cae2888d18cd41 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Tue, 8 Dec 2020 14:58:57 +0800 Subject: [PATCH 2/2] [patch tracking] 20201208145849754962 - 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 3d035b5..1905b6b 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: fd8ddb6e55086500b1d836b07365ba7404f53e3b.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 +* 20201208145849754962 patch-tracking 20.2.2-4 +- append patch file of upstream repository from to + * 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 -- Gitee