Hello community,

here is the log from the commit of package python-pysmbc for openSUSE:Factory 
checked in at 2020-01-08 19:32:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pysmbc (Old)
 and      /work/SRC/openSUSE:Factory/.python-pysmbc.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pysmbc"

Wed Jan  8 19:32:13 2020 rev:3 rq:761016 version:1.0.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pysmbc/python-pysmbc.changes      
2019-07-30 13:05:08.174391965 +0200
+++ /work/SRC/openSUSE:Factory/.python-pysmbc.new.6675/python-pysmbc.changes    
2020-01-08 19:32:15.784594356 +0100
@@ -1,0 +2,13 @@
+Mon Jan  6 03:56:31 UTC 2020 - Steve Kowalik <[email protected]>
+
+- Update to 1.0.18:
+  + New in 1.0.18:
+    * Support Fix memleak for auth_fn #32
+    * Support readinto #31
+
+  + New in 1.0.17:
+    * Support buffer protocol #30
+    * exceptions: use a shared superclass #28
+    * setup: autodetect required library dirs #27
+
+-------------------------------------------------------------------

Old:
----
  pysmbc-1.0.16.tar.bz2

New:
----
  pysmbc-1.0.18.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pysmbc.spec ++++++
--- /var/tmp/diff_new_pack.Y4rWP9/_old  2020-01-08 19:32:17.104593927 +0100
+++ /var/tmp/diff_new_pack.Y4rWP9/_new  2020-01-08 19:32:17.140593916 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pysmbc
 #
-# 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
@@ -21,7 +21,7 @@
 # Tests don't work in rpmbuild sandbox
 %bcond_with     test
 Name:           python-pysmbc
-Version:        1.0.16
+Version:        1.0.18
 Release:        0
 Summary:        Python bindings for samba clients (libsmbclient)
 License:        GPL-2.0-or-later

++++++ pysmbc-1.0.16.tar.bz2 -> pysmbc-1.0.18.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pysmbc-1.0.16/NEWS new/pysmbc-1.0.18/NEWS
--- old/pysmbc-1.0.16/NEWS      2019-04-06 12:03:48.000000000 +0200
+++ new/pysmbc-1.0.18/NEWS      2019-09-27 10:38:14.000000000 +0200
@@ -1,6 +1,15 @@
 NEWS
 ----
 
+New in 1.0.18:
+* Support Fix memleak for auth_fn #32
+* Support readinto #31
+
+New in 1.0.17:
+* Support buffer protocol #30
+* exceptions: use a shared superclass #28
+* setup: autodetect required library dirs #27
+
 New in 1.0.15.5:
 * fix NUL-termination bug
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pysmbc-1.0.16/PKG-INFO new/pysmbc-1.0.18/PKG-INFO
--- old/pysmbc-1.0.16/PKG-INFO  2019-04-06 12:05:05.000000000 +0200
+++ new/pysmbc-1.0.18/PKG-INFO  2019-09-27 10:38:36.000000000 +0200
@@ -1,12 +1,11 @@
 Metadata-Version: 1.1
 Name: pysmbc
-Version: 1.0.16
+Version: 1.0.18
 Summary: Python bindings for libsmbclient
-Home-page: http://cyberelk.net/tim/software/pysmbc/
+Home-page: https://github.com/hamano/pysmbc
 Author: ['Tim Waugh <[email protected]>', 'Tsukasa Hamano 
<[email protected]>', 'Roberto Polli <[email protected]>']
 Author-email: UNKNOWN
 License: GPLv2+
-Download-URL: http://cyberelk.net/tim/data/pysmbc/
 Description: This is a set of Python bindings for the libsmbclient library
         from the samba project.
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pysmbc-1.0.16/pysmbc.egg-info/PKG-INFO 
new/pysmbc-1.0.18/pysmbc.egg-info/PKG-INFO
--- old/pysmbc-1.0.16/pysmbc.egg-info/PKG-INFO  2019-04-06 12:05:05.000000000 
+0200
+++ new/pysmbc-1.0.18/pysmbc.egg-info/PKG-INFO  2019-09-27 10:38:36.000000000 
+0200
@@ -1,12 +1,11 @@
 Metadata-Version: 1.1
 Name: pysmbc
-Version: 1.0.16
+Version: 1.0.18
 Summary: Python bindings for libsmbclient
-Home-page: http://cyberelk.net/tim/software/pysmbc/
+Home-page: https://github.com/hamano/pysmbc
 Author: ['Tim Waugh <[email protected]>', 'Tsukasa Hamano 
<[email protected]>', 'Roberto Polli <[email protected]>']
 Author-email: UNKNOWN
 License: GPLv2+
-Download-URL: http://cyberelk.net/tim/data/pysmbc/
 Description: This is a set of Python bindings for the libsmbclient library
         from the samba project.
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pysmbc-1.0.16/setup.py new/pysmbc-1.0.18/setup.py
--- old/pysmbc-1.0.16/setup.py  2019-04-06 12:04:29.000000000 +0200
+++ new/pysmbc-1.0.18/setup.py  2019-09-27 10:37:31.000000000 +0200
@@ -63,9 +63,18 @@
             dirs.append(p[2:])
     return dirs
 
+def pkgconfig_L(pkg):
+    dirs = []
+    c = subprocess.Popen(["pkg-config", "--libs", pkg], stdout=subprocess.PIPE)
+    (stdout, stderr) = c.communicate ()
+    for p in stdout.decode('ascii').split():
+        if p.startswith("-L"):
+            dirs.append(p[2:])
+    return dirs
+
 setup(
     name="pysmbc",
-    version="1.0.16",
+    version="1.0.18",
     description="Python bindings for libsmbclient",
     long_description=__doc__,
     author=[
@@ -73,8 +82,7 @@
         "Tsukasa Hamano <[email protected]>",
         "Roberto Polli <[email protected]>",
     ],
-    url="http://cyberelk.net/tim/software/pysmbc/";,
-    download_url="http://cyberelk.net/tim/data/pysmbc/";,
+    url="https://github.com/hamano/pysmbc";,
     license="GPLv2+",
     packages=["smbc"],
     classifiers=[
@@ -94,6 +102,7 @@
             "smbc/smbcdirent.c"
         ],
         libraries=["smbclient"],
+        library_dirs=pkgconfig_L("smbclient"),
         include_dirs=pkgconfig_I("smbclient")
         )
     ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pysmbc-1.0.16/smbc/context.c 
new/pysmbc-1.0.18/smbc/context.c
--- old/pysmbc-1.0.16/smbc/context.c    2019-04-06 12:03:48.000000000 +0200
+++ new/pysmbc-1.0.18/smbc/context.c    2019-09-27 10:36:50.000000000 +0200
@@ -137,7 +137,7 @@
          return -1;
        }
 
-      Py_XINCREF (auth);
+      Py_INCREF (auth);
       self->auth_fn = auth;
     }
        
@@ -183,6 +183,7 @@
       smbc_free_context (self->context, 1);
     }
 
+  Py_XDECREF (self->auth_fn);
   Py_TYPE(self)->tp_free ((PyObject *) self);
 }
 
@@ -890,7 +891,8 @@
       return -1;
     }
 
-  Py_XINCREF (value);
+  Py_XDECREF (self->auth_fn);
+  Py_INCREF (value);
   self->auth_fn = value;
   smbc_setFunctionAuthDataWithContext (self->context, auth_fn);
   return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pysmbc-1.0.16/smbc/file.c 
new/pysmbc-1.0.18/smbc/file.c
--- old/pysmbc-1.0.16/smbc/file.c       2019-04-06 12:03:48.000000000 +0200
+++ new/pysmbc-1.0.18/smbc/file.c       2019-09-27 10:36:50.000000000 +0200
@@ -173,19 +173,43 @@
 }
 
 static PyObject *
+File_readinto (File *self, PyObject *args)
+{
+  Context *ctx = self->context;
+  smbc_read_fn fn;
+  Py_buffer buf;
+  ssize_t len;
+
+  if (!PyArg_ParseTuple (args, "|s*", &buf))
+       return NULL;
+
+  fn = smbc_getFunctionRead (ctx->context);
+
+  len = (*fn) (ctx->context, self->file, buf.buf, buf.len);
+  PyBuffer_Release(&buf);
+  if (len < 0)
+    {
+      pysmbc_SetFromErrno ();
+      return NULL;
+    }
+
+  return PyLong_FromLong (len);
+}
+
+static PyObject *
 File_write (File *self, PyObject *args)
 {
   Context *ctx = self->context;
-  int size = 0;
   smbc_write_fn fn;
-  char *buf;
+  Py_buffer buf;
   ssize_t len;
 
-  if (!PyArg_ParseTuple (args, "s#", &buf, &size))
+  if (!PyArg_ParseTuple (args, "s*", &buf))
     return NULL;
 
   fn = smbc_getFunctionWrite (ctx->context);
-  len = (*fn) (ctx->context, self->file, buf, size);
+  len = (*fn) (ctx->context, self->file, buf.buf, buf.len);
+  PyBuffer_Release(&buf);
   if (len < 0)
     {
       pysmbc_SetFromErrno ();
@@ -307,6 +331,12 @@
         "@param size: size of reading\n"
         "@return: read data"
        },
+       {"readinto", (PyCFunction)File_readinto, METH_VARARGS,
+        "readinto(b) -> int\n\n"
+        "@type b: writable bytes-like object\n"
+        "@param b: buffer to fill\n"
+        "@return: number of bytes read"
+       },
        {"write", (PyCFunction)File_write, METH_VARARGS,
         "write(buf) -> int\n\n"
         "@type buf: string\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pysmbc-1.0.16/smbc/smbcmodule.c 
new/pysmbc-1.0.18/smbc/smbcmodule.c
--- old/pysmbc-1.0.16/smbc/smbcmodule.c 2019-04-06 12:03:48.000000000 +0200
+++ new/pysmbc-1.0.18/smbc/smbcmodule.c 2019-09-27 10:36:50.000000000 +0200
@@ -127,35 +127,39 @@
   INT_CONSTANT (SMBC_, XATTR_FLAG_REPLACE);
 
   // define exception objects
-  NoEntryError = PyErr_NewException("smbc.NoEntryError", NULL, NULL);
+  PyObject *SmbError = PyErr_NewException("smbc.SmbError", PyExc_IOError, 
NULL);
+  Py_INCREF(SmbError);
+  PyModule_AddObject(m, "SmbError", SmbError);
+
+  NoEntryError = PyErr_NewException("smbc.NoEntryError", SmbError, NULL);
   Py_INCREF(NoEntryError);
   PyModule_AddObject(m, "NoEntryError", NoEntryError);
 
-  PermissionError = PyErr_NewException("smbc.PermissionError", NULL, NULL);
+  PermissionError = PyErr_NewException("smbc.PermissionError", SmbError, NULL);
   Py_INCREF(PermissionError);
   PyModule_AddObject(m, "PermissionError", PermissionError);
 
-  ExistsError = PyErr_NewException("smbc.ExistsError", NULL, NULL);
+  ExistsError = PyErr_NewException("smbc.ExistsError", SmbError, NULL);
   Py_INCREF(ExistsError);
   PyModule_AddObject(m, "ExistsError", ExistsError);
 
-  NotEmptyError = PyErr_NewException("smbc.NotEmptyError", NULL, NULL);
+  NotEmptyError = PyErr_NewException("smbc.NotEmptyError", SmbError, NULL);
   Py_INCREF(NotEmptyError);
   PyModule_AddObject(m, "NotEmptyError", NotEmptyError);
 
-  TimedOutError = PyErr_NewException("smbc.TimedOutError", NULL, NULL);
+  TimedOutError = PyErr_NewException("smbc.TimedOutError", SmbError, NULL);
   Py_INCREF(TimedOutError);
   PyModule_AddObject(m, "TimedOutError", TimedOutError);
 
-  NoSpaceError = PyErr_NewException("smbc.NoSpaceError", NULL, NULL);
+  NoSpaceError = PyErr_NewException("smbc.NoSpaceError", SmbError, NULL);
   Py_INCREF(NoSpaceError);
   PyModule_AddObject(m, "NoSpaceError", NoSpaceError);
 
-  NotDirectoryError = PyErr_NewException("smbc.NotDirectoryError", NULL, NULL);
+  NotDirectoryError = PyErr_NewException("smbc.NotDirectoryError", SmbError, 
NULL);
   Py_INCREF(NotDirectoryError);
   PyModule_AddObject(m, "NotDirectoryError", NotDirectoryError);
 
-  ConnectionRefusedError = PyErr_NewException("smbc.ConnectionRefusedError", 
NULL, NULL);
+  ConnectionRefusedError = PyErr_NewException("smbc.ConnectionRefusedError", 
SmbError, NULL);
   Py_INCREF(ConnectionRefusedError);
   PyModule_AddObject(m, "ConnectionRefusedError", ConnectionRefusedError);
 


Reply via email to