Hello community, here is the log from the commit of package python-dephell for openSUSE:Factory checked in at 2020-10-29 09:49:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-dephell (Old) and /work/SRC/openSUSE:Factory/.python-dephell.new.3463 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-dephell" Thu Oct 29 09:49:11 2020 rev:17 rq:844696 version:0.8.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-dephell/python-dephell.changes 2020-09-04 11:05:00.438812859 +0200 +++ /work/SRC/openSUSE:Factory/.python-dephell.new.3463/python-dephell.changes 2020-10-29 09:49:20.128220106 +0100 @@ -1,0 +2,8 @@ +Tue Oct 27 21:13:39 UTC 2020 - Benjamin Greiner <[email protected]> + +- Support newer pip version + * dephell-pr473-pip-20-2.patch gh#dephell/dephell#473 +- Support newer bowler version using a different patch lib + * dephell-pr474-bowler-09.patch gh#dephell/dephell#474 + +------------------------------------------------------------------- New: ---- dephell-pr473-pip-20-2.patch dephell-pr474-bowler-09.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-dephell.spec ++++++ --- /var/tmp/diff_new_pack.alWUDG/_old 2020-10-29 09:49:21.960221670 +0100 +++ /var/tmp/diff_new_pack.alWUDG/_new 2020-10-29 09:49:21.960221670 +0100 @@ -38,8 +38,12 @@ Source1: macros.py-dephell # PATCH-FIX-OPENSUSE we don't pin package versions Patch0: never-pin-deps.patch -# PATCH-FIX-UPSTREAM support the pytest 6 entrypoints. Part of https://github.com/dephell/dephell/pull/458 +# PATCH-FIX-UPSTREAM dephell-pytest6.patch -- support the pytest 6 entrypoints. Part of gh#dephell/dephell#458 Patch1: https://github.com/dephell/dephell/commit/b34011c04e49562b5afe3e946f01024ad5629ac1.patch#/dephell-pytest6.patch +# PATCH-FIX-UPSTREAM dephell-pr473-pip-20-2.patch gh#dephell#dephell#473 -- support pip 20.2 changed internal API (rebased because of patch1) +Patch2: dephell-pr473-pip-20-2.patch +# PATCH-FIX-UPSTREAM dephell-pr474-bowler-09.patch gh#dephell#dephell#474 -- support updated bowler 0.9 +Patch3: https://patch-diff.githubusercontent.com/raw/dephell/dephell/pull/474.patch#/dephell-pr474-bowler-09.patch BuildRequires: %{python_module base >= 3.5} BuildRequires: %{python_module setuptools} BuildRequires: bash @@ -143,9 +147,7 @@ test, build graph, show outdated, audit. Manage venvs, build package, bump version. %prep -%setup -q -n dephell-%{version} -%patch0 -p1 -%patch1 -p1 +%autosetup -p1 -n dephell-%{version} sed -i -e '1i #!/bin/sh' dephell/templates/docker_prepare.sh ++++++ dephell-pr473-pip-20-2.patch ++++++ >From a3872e15312d8382017fbd6888744f4025cae5ac Mon Sep 17 00:00:00 2001 From: Ben Greiner <[email protected]> Date: Tue, 27 Oct 2020 22:18:42 +0100 Subject: [PATCH] support changed pip parser api --- dephell/converters/pip.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) Index: dephell-0.8.3/dephell/converters/pip.py =================================================================== --- dephell-0.8.3.orig/dephell/converters/pip.py +++ dephell-0.8.3/dephell/converters/pip.py @@ -9,6 +9,7 @@ import attr from dephell_discover import Root as PackageRoot from dephell_links import DirLink, FileLink from pip._internal.req import parse_requirements +from pip._internal.req.req_install import InstallRequirement # app from ..context_tools import chdir @@ -33,6 +34,14 @@ except ImportError: except ImportError: from pip._internal.network.session import PipSession +try: + # pip >= 20.2 + from pip._internal.req.req_file import ParsedRequirement + from pip._internal.req.constructors import \ + install_req_from_parsed_requirement +except ImportError: + ParsedRequirement = None + @attr.s() class PIPConverter(BaseConverter): @@ -93,8 +102,15 @@ class PIPConverter(BaseConverter): ) deps = [] - for req in reqs: + for ireq in reqs: # https://github.com/pypa/pip/blob/master/src/pip/_internal/req/req_install.py + if isinstance(ireq, InstallRequirement): + req = ireq + elif isinstance(ireq, ParsedRequirement): + req = install_req_from_parsed_requirement(ireq) + else: + raise Exception("Another internal API change, why do you " + "keep using internal APIs?") if req.req is None: req.req = SimpleNamespace( name=req.link.url.split('/')[-1], ++++++ dephell-pr474-bowler-09.patch ++++++ >From 46b11204afc2b26e33164705519af47980023b95 Mon Sep 17 00:00:00 2001 From: Ben Greiner <[email protected]> Date: Tue, 27 Oct 2020 22:23:50 +0100 Subject: [PATCH] add trailing newline for patch test --- tests/test_commands/test_vendor_import.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_commands/test_vendor_import.py b/tests/test_commands/test_vendor_import.py index 995a9b93..3f6a00ac 100644 --- a/tests/test_commands/test_vendor_import.py +++ b/tests/test_commands/test_vendor_import.py @@ -16,7 +16,7 @@ @pytest.mark.skipif(IS_WINDOWS, reason='unsupported on windows') def test_patch_imports(temp_path: Path): (temp_path / 'project').mkdir() - (temp_path / 'project' / '__init__.py').write_text('import requests\nimport django') + (temp_path / 'project' / '__init__.py').write_text('import requests\nimport django\n') (temp_path / 'project' / 'vendor' / 'requests').mkdir(parents=True) (temp_path / 'project' / 'vendor' / 'requests' / '__init__.py').touch() @@ -34,5 +34,5 @@ def test_patch_imports(temp_path: Path): output_path=temp_path / 'project' / 'vendor', ) - expected = 'import project.vendor.requests as requests\nimport django' + expected = 'import project.vendor.requests as requests\nimport django\n' assert (temp_path / 'project' / '__init__.py').read_text() == expected
