Hello community, here is the log from the commit of package python-dephell-links for openSUSE:Leap:15.2 checked in at 2020-03-06 12:40:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/python-dephell-links (Old) and /work/SRC/openSUSE:Leap:15.2/.python-dephell-links.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-dephell-links" Fri Mar 6 12:40:23 2020 rev:2 rq:781659 version:0.1.5 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/python-dephell-links/python-dephell-links.changes 2020-02-22 17:50:17.213510117 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.python-dephell-links.new.26092/python-dephell-links.changes 2020-03-06 12:43:47.506848913 +0100 @@ -1,0 +2,6 @@ +Tue Mar 3 15:17:51 CET 2020 - Matej Cepl <mc...@suse.com> + +- Upgrade to 0.1.5: + - Fix path-like links for cygwin-like paths on Windows + +------------------------------------------------------------------- Old: ---- dephell_links-0.1.4.tar.gz New: ---- dephell_links-0.1.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-dephell-links.spec ++++++ --- /var/tmp/diff_new_pack.rOx1yI/_old 2020-03-06 12:43:48.902849762 +0100 +++ /var/tmp/diff_new_pack.rOx1yI/_new 2020-03-06 12:43:48.942849786 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-dephell-links # -# 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 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-dephell-links -Version: 0.1.4 +Version: 0.1.5 Release: 0 Summary: Dephell library to parse dependency links License: MIT ++++++ dephell_links-0.1.4.tar.gz -> dephell_links-0.1.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dephell_links-0.1.4/PKG-INFO new/dephell_links-0.1.5/PKG-INFO --- old/dephell_links-0.1.4/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/dephell_links-0.1.5/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: dephell-links -Version: 0.1.4 +Version: 0.1.5 Summary: Parse dependency links Project-URL: Repository, https://github.com/dephell/dephell_links Author: Gram diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dephell_links-0.1.4/dephell_links/__init__.py new/dephell_links-0.1.5/dephell_links/__init__.py --- old/dephell_links-0.1.4/dephell_links/__init__.py 2019-04-19 11:38:02.000000000 +0200 +++ new/dephell_links-0.1.5/dephell_links/__init__.py 2019-12-30 15:18:57.000000000 +0100 @@ -4,6 +4,7 @@ from ._unknown import UnknownLink from ._url import URLLink from ._vcs import VCSLink +from ._constants import IS_WINDOWS __all__ = [ @@ -13,4 +14,5 @@ 'UnknownLink', 'URLLink', 'VCSLink', + 'IS_WINDOWS', ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dephell_links-0.1.4/dephell_links/_constants.py new/dephell_links-0.1.5/dephell_links/_constants.py --- old/dephell_links-0.1.4/dephell_links/_constants.py 1970-01-01 01:00:00.000000000 +0100 +++ new/dephell_links-0.1.5/dephell_links/_constants.py 2019-12-30 15:18:57.000000000 +0100 @@ -0,0 +1,6 @@ +# built-in +import os +import platform + + +IS_WINDOWS = (os.name == 'nt') or (platform.system() == 'Windows') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dephell_links-0.1.4/dephell_links/_path.py new/dephell_links-0.1.5/dephell_links/_path.py --- old/dephell_links-0.1.4/dephell_links/_path.py 2019-04-19 11:38:02.000000000 +0200 +++ new/dephell_links-0.1.5/dephell_links/_path.py 2019-12-30 15:18:57.000000000 +0100 @@ -6,6 +6,7 @@ # app from ._cached_property import cached_property +from ._constants import IS_WINDOWS class _PathLink: @@ -17,7 +18,10 @@ def parse(cls, link) -> Optional['_PathLink']: if '@' in link: return None - if link.startswith('file://'): + if IS_WINDOWS and link.startswith('file:///'): + # cygwin-like absolute paths (file:///c:/foo/bar) + link = link[len('file:///'):] + elif link.startswith('file://'): link = link[len('file://'):] if '://' in link: return None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dephell_links-0.1.4/dephell_links.egg-info/PKG-INFO new/dephell_links-0.1.5/dephell_links.egg-info/PKG-INFO --- old/dephell_links-0.1.4/dephell_links.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/dephell_links-0.1.5/dephell_links.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: dephell-links -Version: 0.1.4 +Version: 0.1.5 Summary: Parse dependency links Project-URL: Repository, https://github.com/dephell/dephell_links Author: Gram diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dephell_links-0.1.4/dephell_links.egg-info/SOURCES.txt new/dephell_links-0.1.5/dephell_links.egg-info/SOURCES.txt --- old/dephell_links-0.1.4/dephell_links.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/dephell_links-0.1.5/dephell_links.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100 @@ -2,10 +2,11 @@ README.rst setup.cfg setup.py -dephell_links/_path.py dephell_links/_parse.py -dephell_links/_vcs.py -dephell_links/_url.py dephell_links/_cached_property.py +dephell_links/_constants.py dephell_links/__init__.py +dephell_links/_url.py +dephell_links/_path.py +dephell_links/_vcs.py dephell_links/_unknown.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dephell_links-0.1.4/setup.py new/dephell_links-0.1.5/setup.py --- old/dephell_links-0.1.4/setup.py 2019-05-23 20:41:16.000000000 +0200 +++ new/dephell_links-0.1.5/setup.py 2019-12-30 15:19:00.000000000 +0100 @@ -21,10 +21,10 @@ setup( long_description=readme, name='dephell_links', - version='0.1.4', + version='0.1.5', description='Parse dependency links', python_requires='>=3.5', - project_urls={'repository': 'https://github.com/dephell/dephell_links'}, + project_urls={"repository": "https://github.com/dephell/dephell_links"}, author='Gram', author_email='master_f...@mail.ru', license='MIT', @@ -45,6 +45,7 @@ 'Operating System :: Unix' ], packages=['dephell_links'], + package_dir={"": "."}, package_data={}, install_requires=['attrs'], ) Binary files old/dephell_links-0.1.4/tests/__pycache__/__init__.cpython-35.pyc and new/dephell_links-0.1.5/tests/__pycache__/__init__.cpython-35.pyc differ Binary files old/dephell_links-0.1.4/tests/__pycache__/__init__.cpython-37.pyc and new/dephell_links-0.1.5/tests/__pycache__/__init__.cpython-37.pyc differ Binary files old/dephell_links-0.1.4/tests/__pycache__/test_parsing.cpython-35-PYTEST.pyc and new/dephell_links-0.1.5/tests/__pycache__/test_parsing.cpython-35-PYTEST.pyc differ Binary files old/dephell_links-0.1.4/tests/__pycache__/test_parsing.cpython-37-PYTEST.pyc and new/dephell_links-0.1.5/tests/__pycache__/test_parsing.cpython-37-PYTEST.pyc differ Binary files old/dephell_links-0.1.4/tests/__pycache__/test_urllink.cpython-37-PYTEST.pyc and new/dephell_links-0.1.5/tests/__pycache__/test_urllink.cpython-37-PYTEST.pyc differ Binary files old/dephell_links-0.1.4/tests/__pycache__/test_vcs.cpython-35-PYTEST.pyc and new/dephell_links-0.1.5/tests/__pycache__/test_vcs.cpython-35-PYTEST.pyc differ Binary files old/dephell_links-0.1.4/tests/__pycache__/test_vcs.cpython-37-PYTEST.pyc and new/dephell_links-0.1.5/tests/__pycache__/test_vcs.cpython-37-PYTEST.pyc differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dephell_links-0.1.4/tests/test_parsing.py new/dephell_links-0.1.5/tests/test_parsing.py --- old/dephell_links-0.1.4/tests/test_parsing.py 2019-04-02 10:19:36.000000000 +0200 +++ new/dephell_links-0.1.5/tests/test_parsing.py 2019-12-30 15:18:57.000000000 +0100 @@ -1,16 +1,43 @@ +# built-in +from pathlib import Path + # project import pytest -from dephell_links import DirLink, FileLink, URLLink, VCSLink, parse_link +from dephell_links import DirLink, FileLink, URLLink, VCSLink, parse_link, IS_WINDOWS + + +skipif_not_windows = pytest.mark.skipif(not IS_WINDOWS, reason='not Windows') -@pytest.mark.parametrize('link_type, url', [ - (VCSLink, 'https://github.com/r1chardj0n3s/parse.git'), - (URLLink, 'https://github.com/divio/django-cms/archive/release/3.4.x.zip'), - (FileLink, './tests/test_parsing.py'), - (FileLink, './this_file_does_not_exists.py'), - (DirLink, '.'), +@pytest.mark.parametrize('link_type, url, expected', [ + (VCSLink, 'https://github.com/r1chardj0n3s/parse.git', None), + (URLLink, 'https://github.com/divio/django-cms/archive/release/3.4.x.zip', None), + (FileLink, './tests/test_parsing.py', None), + (FileLink, 'file://./tests/test_parsing.py', './tests/test_parsing.py'), + (FileLink, 'file://{}'.format(Path('./tests/test_parsing.py').absolute()), + str(Path('./tests/test_parsing.py').absolute())), + (FileLink, 'file://{}'.format(Path('./tests/test_parsing.py').absolute().as_posix()), + Path('./tests/test_parsing.py').absolute().as_posix()), + (FileLink, './this_file_does_not_exists.py', None), + (DirLink, '.', None), + (DirLink, 'file://.', '.'), + (DirLink, 'file://{}'.format(Path('.').absolute()), str(Path('.').absolute())), + (DirLink, 'file://{}'.format(Path('.').absolute().as_posix()), Path('.').absolute().as_posix()), + + # Windows only + pytest.param(FileLink, 'file:///{}'.format(Path('./tests/test_parsing.py').absolute().as_posix()), + Path('./tests/test_parsing.py').absolute().as_posix(), marks=skipif_not_windows), + pytest.param(FileLink, 'file:///{}'.format(Path('./tests/test_parsing.py').absolute()), + str(Path('./tests/test_parsing.py').absolute()), marks=skipif_not_windows), + pytest.param(DirLink, 'file:///{}'.format(Path('.').absolute().as_posix()), + Path('.').absolute().as_posix(), marks=skipif_not_windows), + pytest.param(DirLink, 'file:///{}'.format(Path('.').absolute()), + str(Path('.').absolute()), marks=skipif_not_windows), ]) -def test_parsing(link_type, url): +def test_parsing(link_type, url, expected): link = parse_link(url) assert isinstance(link, link_type) - assert link.short == url + + if not expected: + expected = url + assert link.short == expected