Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pysmb for openSUSE:Factory checked in at 2022-02-05 23:23:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pysmb (Old) and /work/SRC/openSUSE:Factory/.python-pysmb.new.1898 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pysmb" Sat Feb 5 23:23:02 2022 rev:9 rq:951667 version:1.2.7 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pysmb/python-pysmb.changes 2021-01-18 14:46:18.546064158 +0100 +++ /work/SRC/openSUSE:Factory/.python-pysmb.new.1898/python-pysmb.changes 2022-02-05 23:23:38.619735728 +0100 @@ -1,0 +2,15 @@ +Fri Feb 4 00:24:09 UTC 2022 - Matej Cepl <mc...@suse.com> + +- Fix testing on older Leap versions. + +------------------------------------------------------------------- +Wed Feb 2 05:55:01 UTC 2022 - Steve Kowalik <steven.kowa...@suse.com> + +- Update to 1.2.7: + * Fix compatibility issues on file retrievals with Likewise servers (#177) + * Improve SMBConnection's connect() method to remove the need to provide + sock_family parameter for IPv6 addresses in Python 3.x (#180) +- Add patch fix-smbconnection-tests.patch: + * Use correct nose 2 decorators + +------------------------------------------------------------------- Old: ---- pysmb-1.2.6.zip New: ---- fix-smbconnection-tests.patch pysmb-1.2.7.zip ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pysmb.spec ++++++ --- /var/tmp/diff_new_pack.dDKBso/_old 2022-02-05 23:23:39.115732336 +0100 +++ /var/tmp/diff_new_pack.dDKBso/_new 2022-02-05 23:23:39.119732309 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-pysmb # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,13 +17,15 @@ Name: python-pysmb -Version: 1.2.6 +Version: 1.2.7 Release: 0 Summary: SMB/CIFS library to support file sharing between Windows and Linux machines License: Zlib Group: Development/Languages/Python URL: https://miketeo.net/projects/pysmb Source: https://files.pythonhosted.org/packages/source/p/pysmb/pysmb-%{version}.zip +# PATCH-FIX-UPSTREAM gh#miketeo/pysmb#189 +Patch0: fix-smbconnection-tests.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -31,13 +33,13 @@ Requires: python-pyasn1 BuildArch: noarch # SECTION test requirements -# nose packages still imported despite pytest -BuildRequires: %{python_module nose} -BuildRequires: %{python_module pyasn1} -BuildRequires: %{python_module pytest} -%if 0%{?suse_version} < 1550 +%if 0%{?sle_version} && 0%{?sle_version} <= 150400 +BuildRequires: python-nose BuildRequires: python-twisted %endif +BuildRequires: %{python_module nose2} +BuildRequires: %{python_module pyasn1} +BuildRequires: %{python_module pytest} # /SECTION %python_subpackages @@ -45,26 +47,25 @@ pysmb is an experimental SMB/CIFS library written in Python. It implements the client-side SMB/CIFS protocol which allows your Python application to access and transfer files to/from SMB/CIFS shared folders like your Windows file sharing and Samba folders. %prep -%setup -q -n pysmb-%{version} +%autosetup -p1 -n pysmb-%{version} + +sed -Ei "1{/^#!\/usr\/bin\/python/d}" python*/smb/*/sha256.py %build %python_build %install %python_install - -%{python_expand # Remove hashbangs from a non-exec file -sed -Ei "1{/^#!\/usr\/bin\/python/d}" %{buildroot}%{$python_sitelib}/smb/utils/sha256.py -} - %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %{python_expand # Run only the tests that can work without network (and only from the right python[2,3] dir) -# (the trick here is that $python_ is expanded early by the pytest and python_expand macros, not by the shell) - $python_testdir=${python_flavor:0:7} +python_testdir_str=$python +python_testdir=${python_testdir_str:0:7} +export PYTHONPATH=%{$python_sitelib} PYTHONDONTWRITEBYTECODE=1 +find . -name \*.pyc\* -delete +pytest-%{$python_bin_suffix} ${python_testdir} -k 'not (SMB or test_broadcast)' } -%pytest ${$python_testdir} -k 'not SMB and not test_broadcast' %files %{python_files} %doc CHANGELOG README.txt ++++++ fix-smbconnection-tests.patch ++++++ Index: pysmb-1.2.7/python3/tests/SMBConnectionTests/test_getattributes.py =================================================================== --- pysmb-1.2.7.orig/python3/tests/SMBConnectionTests/test_getattributes.py +++ pysmb-1.2.7/python3/tests/SMBConnectionTests/test_getattributes.py @@ -2,7 +2,7 @@ from smb.SMBConnection import SMBConnection from .util import getConnectionInfo -from nose2.tools.decorators import with_setup +from nose2.tools.decorators import with_setup, with_teardown from smb import smb_structs conn = None @@ -25,7 +25,8 @@ def teardown_func(): global conn conn.close() -@with_setup(setup_func_SMB2, teardown_func) +@with_setup(setup_func_SMB2) +@with_teardown(teardown_func) def test_getAttributes_SMB2(): global conn info = conn.getAttributes('smbtest', '/Test Folder with Long Name/') @@ -39,7 +40,8 @@ def test_getAttributes_SMB2(): info = conn.getAttributes('smbtest', u'/\u6d4b\u8bd5\u6587\u4ef6\u5939') assert info.isDirectory -@with_setup(setup_func_SMB1, teardown_func) +@with_setup(setup_func_SMB1) +@with_teardown(teardown_func) def test_getAttributes_SMB1(): global conn info = conn.getAttributes('smbtest', '/Test Folder with Long Name/') @@ -53,4 +55,4 @@ def test_getAttributes_SMB1(): info = conn.getAttributes('smbtest', u'/\u6d4b\u8bd5\u6587\u4ef6\u5939') assert info.isDirectory - \ No newline at end of file + Index: pysmb-1.2.7/python3/tests/SMBConnectionTests/test_SMBHandler.py =================================================================== --- pysmb-1.2.7.orig/python3/tests/SMBConnectionTests/test_SMBHandler.py +++ pysmb-1.2.7/python3/tests/SMBConnectionTests/test_SMBHandler.py @@ -2,7 +2,7 @@ import os, urllib.request, urllib.parse, urllib.error, urllib.request, urllib.error, urllib.parse, time, random from smb.SMBHandler import SMBHandler -import util +from . import util try: