Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP4:Update
python-requirements-parser
0001-Dont-fail-with-valid-options-in-requiremen...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Dont-fail-with-valid-options-in-requirements_txt-files.patch of Package python-requirements-parser
From fd172ae6faf56f3d221666fb336e84df01d8b943 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa <alarrosa@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)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor