From 9de936bf203cbfa8f6b5a01364b62a3ea730e296 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Mon, 9 Nov 2020 06:30:14 +0800 Subject: [PATCH 1/3] [patch tracking] 20201109063007638942 - https://github.com/pypa/pip/commit/ee7c56e0313a5edf63e549ea287208f7ce9ca415 --- ...56e0313a5edf63e549ea287208f7ce9ca415.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ee7c56e0313a5edf63e549ea287208f7ce9ca415.patch diff --git a/ee7c56e0313a5edf63e549ea287208f7ce9ca415.patch b/ee7c56e0313a5edf63e549ea287208f7ce9ca415.patch new file mode 100644 index 0000000..b0671ca --- /dev/null +++ b/ee7c56e0313a5edf63e549ea287208f7ce9ca415.patch @@ -0,0 +1,21 @@ +diff --git a/news/9100.feature.rst b/news/9100.feature.rst +new file mode 100644 +index 0000000000..eb6c728394 +--- /dev/null ++++ b/news/9100.feature.rst +@@ -0,0 +1 @@ ++The new resolver now resolves packages in a deterministic order. +diff --git a/src/pip/_internal/resolution/resolvelib/provider.py b/src/pip/_internal/resolution/resolvelib/provider.py +index 7f7d0e1540..c0e6b60d90 100644 +--- a/src/pip/_internal/resolution/resolvelib/provider.py ++++ b/src/pip/_internal/resolution/resolvelib/provider.py +@@ -57,7 +57,8 @@ def get_preference( + ): + # type: (...) -> Any + transitive = all(parent is not None for _, parent in information) +- return (transitive, bool(candidates)) ++ key = next(iter(candidates)).name if candidates else "" ++ return (transitive, key) + + def find_matches(self, requirements): + # type: (Sequence[Requirement]) -> Iterable[Candidate] -- Gitee From c8992fee317724976174185734106b67186a28e6 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Mon, 9 Nov 2020 06:30:14 +0800 Subject: [PATCH 2/3] [patch tracking] 20201109063007638942 - https://github.com/pypa/pip/commit/a4f4bfbf8ba7fd1e60884a439907e3f2a32e117a --- ...bfbf8ba7fd1e60884a439907e3f2a32e117a.patch | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 a4f4bfbf8ba7fd1e60884a439907e3f2a32e117a.patch diff --git a/a4f4bfbf8ba7fd1e60884a439907e3f2a32e117a.patch b/a4f4bfbf8ba7fd1e60884a439907e3f2a32e117a.patch new file mode 100644 index 0000000..4d7a388 --- /dev/null +++ b/a4f4bfbf8ba7fd1e60884a439907e3f2a32e117a.patch @@ -0,0 +1,117 @@ +diff --git a/src/pip/_internal/req/req_file.py b/src/pip/_internal/req/req_file.py +index c8c9165d33..0af60fa056 100644 +--- a/src/pip/_internal/req/req_file.py ++++ b/src/pip/_internal/req/req_file.py +@@ -105,7 +105,6 @@ def __init__( + self, + filename, # type: str + lineno, # type: int +- comes_from, # type: Optional[str] + args, # type: str + opts, # type: Values + constraint, # type: bool +@@ -113,7 +112,6 @@ def __init__( + # type: (...) -> None + self.filename = filename + self.lineno = lineno +- self.comes_from = comes_from + self.opts = opts + self.constraint = constraint + +@@ -134,7 +132,6 @@ def parse_requirements( + filename, # type: str + session, # type: PipSession + finder=None, # type: Optional[PackageFinder] +- comes_from=None, # type: Optional[str] + options=None, # type: Optional[optparse.Values] + constraint=False, # type: bool + ): +@@ -144,13 +141,12 @@ def parse_requirements( + :param filename: Path or url of requirements file. + :param session: PipSession instance. + :param finder: Instance of pip.index.PackageFinder. +- :param comes_from: Origin description of requirements. + :param options: cli options. + :param constraint: If true, parsing a constraint file rather than + requirements file. + """ + line_parser = get_line_parser(finder) +- parser = RequirementsFileParser(session, line_parser, comes_from) ++ parser = RequirementsFileParser(session, line_parser) + + for parsed_line in parser.parse(filename, constraint): + parsed_req = handle_line( +@@ -333,12 +329,10 @@ def __init__( + self, + session, # type: PipSession + line_parser, # type: LineParser +- comes_from, # type: Optional[str] + ): + # type: (...) -> None + self._session = session + self._line_parser = line_parser +- self._comes_from = comes_from + + def parse(self, filename, constraint): + # type: (str, bool) -> Iterator[ParsedLine] +@@ -382,9 +376,7 @@ def _parse_and_recurse(self, filename, constraint): + + def _parse_file(self, filename, constraint): + # type: (str, bool) -> Iterator[ParsedLine] +- _, content = get_file_content( +- filename, self._session, comes_from=self._comes_from +- ) ++ _, content = get_file_content(filename, self._session) + + lines_enum = preprocess(content) + +@@ -399,7 +391,6 @@ def _parse_file(self, filename, constraint): + yield ParsedLine( + filename, + line_number, +- self._comes_from, + args_str, + opts, + constraint, +@@ -553,15 +544,14 @@ def expand_env_variables(lines_enum): + yield line_number, line + + +-def get_file_content(url, session, comes_from=None): +- # type: (str, PipSession, Optional[str]) -> Tuple[str, Text] ++def get_file_content(url, session): ++ # type: (str, PipSession) -> Tuple[str, Text] + """Gets the content of a file; it may be a filename, file: URL, or + http: URL. Returns (location, content). Content is unicode. + Respects # -*- coding: declarations on the retrieved files. + + :param url: File path or url. + :param session: PipSession instance. +- :param comes_from: Origin description of requirements. + """ + scheme = get_url_scheme(url) + +@@ -572,11 +562,6 @@ def get_file_content(url, session, comes_from=None): + return resp.url, resp.text + + elif scheme == 'file': +- if comes_from and comes_from.startswith('http'): +- raise InstallationError( +- 'Requirements file {} references URL {}, ' +- 'which is local'.format(comes_from, url) +- ) + url = url_to_path(url) + + try: +diff --git a/tests/unit/test_req.py b/tests/unit/test_req.py +index 083d2c2c60..e168a3cc16 100644 +--- a/tests/unit/test_req.py ++++ b/tests/unit/test_req.py +@@ -47,7 +47,6 @@ def get_processed_req_from_line(line, fname='file', lineno=1): + parsed_line = ParsedLine( + fname, + lineno, +- fname, + args_str, + opts, + False, -- Gitee From 9584169f36fd516ecc44171e0db51fbc2a719e4a Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Mon, 9 Nov 2020 06:30:14 +0800 Subject: [PATCH 3/3] [patch tracking] 20201109063007638942 - update spec file --- python-pip.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python-pip.spec b/python-pip.spec index 3d035b5..f5518a8 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,8 @@ 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: ee7c56e0313a5edf63e549ea287208f7ce9ca415.patch +Patch6002: a4f4bfbf8ba7fd1e60884a439907e3f2a32e117a.patch Source10: pip-allow-older-versions.patch %description %{_description} @@ -112,6 +114,9 @@ install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir} %{python_wheeldir}/%{python_wheelname} %changelog +* 20201109063007638942 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 +166,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