Hello community, here is the log from the commit of package python-pip-api for openSUSE:Factory checked in at 2019-07-23 22:40:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pip-api (Old) and /work/SRC/openSUSE:Factory/.python-pip-api.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pip-api" Tue Jul 23 22:40:09 2019 rev:4 rq:717861 version:0.0.12 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pip-api/python-pip-api.changes 2019-06-20 18:54:47.968796427 +0200 +++ /work/SRC/openSUSE:Factory/.python-pip-api.new.4126/python-pip-api.changes 2019-07-23 22:40:11.606936511 +0200 @@ -1,0 +2,6 @@ +Tue Jul 23 11:27:24 UTC 2019 - Tomáš Chvátal <tchva...@suse.com> + +- Update to 0.0.12: + * Bugfix with relative paths (#39) + +------------------------------------------------------------------- Old: ---- pip-api-0.0.10.tar.gz New: ---- pip-api-0.0.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pip-api.spec ++++++ --- /var/tmp/diff_new_pack.wf9qxG/_old 2019-07-23 22:40:12.126936403 +0200 +++ /var/tmp/diff_new_pack.wf9qxG/_new 2019-07-23 22:40:12.126936403 +0200 @@ -18,12 +18,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pip-api -Version: 0.0.10 +Version: 0.0.12 Release: 0 Summary: The official unofficial pip API License: Apache-2.0 Group: Development/Languages/Python -URL: http://github.com/di/pip-api +URL: https://github.com/di/pip-api Source: https://files.pythonhosted.org/packages/source/p/pip-api/pip-api-%{version}.tar.gz Patch0: unvendor.patch BuildRequires: %{python_module packaging >= 16.1} ++++++ pip-api-0.0.10.tar.gz -> pip-api-0.0.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pip-api-0.0.10/PKG-INFO new/pip-api-0.0.12/PKG-INFO --- old/pip-api-0.0.10/PKG-INFO 2019-06-07 06:27:43.000000000 +0200 +++ new/pip-api-0.0.12/PKG-INFO 2019-07-09 18:40:22.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pip-api -Version: 0.0.10 +Version: 0.0.12 Summary: An unofficial, importable pip API Home-page: http://github.com/di/pip-api Author: Dustin Ingram diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pip-api-0.0.10/pip_api/_parse_requirements.py new/pip-api-0.0.12/pip_api/_parse_requirements.py --- old/pip-api-0.0.10/pip_api/_parse_requirements.py 2019-06-06 22:24:25.000000000 +0200 +++ new/pip-api-0.0.12/pip_api/_parse_requirements.py 2019-07-09 11:56:43.000000000 +0200 @@ -177,6 +177,7 @@ while to_parse: filename = to_parse.pop() + dirname = os.path.dirname(filename) parsed.add(filename) # Combine multi-line commands @@ -203,8 +204,9 @@ raise elif known.requirements: - if known.requirements not in parsed: - to_parse.add(known.requirements) + full_path = os.path.join(dirname, known.requirements) + if full_path not in parsed: + to_parse.add(full_path) elif known.editable: name, url = _parse_editable(known.editable) req = requirements.Requirement("%s @ %s" % (name, url)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pip-api-0.0.10/pip_api.egg-info/PKG-INFO new/pip-api-0.0.12/pip_api.egg-info/PKG-INFO --- old/pip-api-0.0.10/pip_api.egg-info/PKG-INFO 2019-06-07 06:27:43.000000000 +0200 +++ new/pip-api-0.0.12/pip_api.egg-info/PKG-INFO 2019-07-09 18:40:22.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pip-api -Version: 0.0.10 +Version: 0.0.12 Summary: An unofficial, importable pip API Home-page: http://github.com/di/pip-api Author: Dustin Ingram diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pip-api-0.0.10/setup.py new/pip-api-0.0.12/setup.py --- old/pip-api-0.0.10/setup.py 2019-06-07 06:27:15.000000000 +0200 +++ new/pip-api-0.0.12/setup.py 2019-07-09 18:39:53.000000000 +0200 @@ -24,5 +24,5 @@ python_requires=">=2.7,!=3.0,!=3.1,!=3.2,!=3.3", url="http://github.com/di/pip-api", summary="An unofficial, importable pip API", - version="0.0.10", + version="0.0.12", ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pip-api-0.0.10/tests/test_parse_requirements.py new/pip-api-0.0.12/tests/test_parse_requirements.py --- old/pip-api-0.0.10/tests/test_parse_requirements.py 2019-06-06 22:24:25.000000000 +0200 +++ new/pip-api-0.0.12/tests/test_parse_requirements.py 2019-07-09 11:56:43.000000000 +0200 @@ -176,3 +176,15 @@ assert set(result) == {"django", "pip-api"} assert str(result["django"]) == "Django==1.11" assert str(result["pip-api"]).startswith("pip-api@ file:///") + + +def test_parse_requirements_with_relative_references(monkeypatch): + files = { + "reqs/base.txt": ["django==1.11\n"], + "reqs/test.txt": ["-r base.txt\n"], + "reqs/dev.txt": ["-r base.txt\n" "-r test.txt\n"], + } + monkeypatch.setattr(pip_api._parse_requirements, "_read_file", files.get) + + result = pip_api.parse_requirements("reqs/dev.txt") + assert set(result) == {"django"}