Hello community, here is the log from the commit of package python-requirements-parser for openSUSE:Leap:15.2 checked in at 2020-04-17 13:38:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/python-requirements-parser (Old) and /work/SRC/openSUSE:Leap:15.2/.python-requirements-parser.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-requirements-parser" Fri Apr 17 13:38:08 2020 rev:13 rq:794455 version:0.2.0 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/python-requirements-parser/python-requirements-parser.changes 2020-03-02 13:22:14.462265188 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.python-requirements-parser.new.2738/python-requirements-parser.changes 2020-04-17 13:38:37.384268615 +0200 @@ -1,0 +2,7 @@ +Wed Apr 15 08:39:06 UTC 2020 - Antonio Larrosa <alarr...@suse.com> + +- Add patch to not fail parsing requirements files with valid + options like --only-binary or --trusted-host: + * 0001-Dont-fail-with-valid-options-in-requirements_txt-files.patch + +------------------------------------------------------------------- New: ---- 0001-Dont-fail-with-valid-options-in-requirements_txt-files.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-requirements-parser.spec ++++++ --- /var/tmp/diff_new_pack.Ds25G4/_old 2020-04-17 13:38:37.812268937 +0200 +++ /var/tmp/diff_new_pack.Ds25G4/_new 2020-04-17 13:38:37.816268940 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-requirements-parser # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,8 +23,10 @@ Summary: Pip requirement file parser License: BSD-2-Clause Group: Development/Languages/Python -Url: https://github.com/davidfischer/requirements-parser +URL: https://github.com/davidfischer/requirements-parser Source: https://github.com/davidfischer/requirements-parser/archive/v%{version}.tar.gz#/requirements-parser-%{version}.tar.gz +# PATCH-FIX-UPSTREAM 0001-Dont-fail-with-valid-options-in-requirements_txt-files.patch alarr...@suse.com -- https://github.com/davidfischer/requirements-parser/pull/47 +Patch0: 0001-Dont-fail-with-valid-options-in-requirements_txt-files.patch BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros # SECTION test requirements @@ -40,6 +42,7 @@ %prep %setup -q -n requirements-parser-%{version} +%patch0 -p1 %build %python_build ++++++ 0001-Dont-fail-with-valid-options-in-requirements_txt-files.patch ++++++ >From fd172ae6faf56f3d221666fb336e84df01d8b943 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa <alarr...@suse.com> Date: Wed, 15 Apr 2020 11:40:47 +0200 Subject: [PATCH] Don't fail with valid options in requirements.txt files When parsing requirements.txt files, a number of options can be used that shouldn't make the parser fail. The list of options can be seen at: https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format --- requirements/parser.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/requirements/parser.py b/requirements/parser.py index 024c905..1bb66f5 100644 --- a/requirements/parser.py +++ b/requirements/parser.py @@ -46,5 +46,20 @@ def parse(reqstr): elif line.startswith('-Z') or line.startswith('--always-unzip'): warnings.warn('Unused option --always-unzip. Skipping.') continue + elif line.startswith('-c') or line.startswith('--constraint'): + warnings.warn('--constraint option not supported. Skipping.') + continue + elif line.startswith('--no-binary') or line.startswith('--only-binary'): + warnings.warn('--no-binary and --only-binary options not supported. Skipping.') + continue + elif line.startswith('--require-hashes'): + warnings.warn('Unused option --require-hashes. Skipping.') + continue + elif line.startswith('--pre'): + warnings.warn('Unused option --pre. Skipping.') + continue + elif line.startswith('--trusted-host'): + warnings.warn('Unused option --trusted-host. Skipping.') + continue else: yield Requirement.parse(line)