Hello community,

here is the log from the commit of package python-lmdb for openSUSE:Factory 
checked in at 2019-11-26 17:02:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-lmdb (Old)
 and      /work/SRC/openSUSE:Factory/.python-lmdb.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-lmdb"

Tue Nov 26 17:02:43 2019 rev:5 rq:750894 version:0.98

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-lmdb/python-lmdb.changes  2019-08-13 
13:22:56.605391875 +0200
+++ /work/SRC/openSUSE:Factory/.python-lmdb.new.26869/python-lmdb.changes       
2019-11-26 17:04:23.340006565 +0100
@@ -1,0 +2,8 @@
+Tue Nov 26 00:43:19 UTC 2019 - Martin Herkt <9+suse@cirno.systems>
+
+- Update to v0.98
+  * Fix that a duplicate argument to a lmdb method would cause
+    an assert.
+  * Fix crash under debug cpython when mdb_cursor_open failed
+
+-------------------------------------------------------------------

Old:
----
  lmdb-0.97.tar.gz

New:
----
  lmdb-0.98.tar.gz

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

Other differences:
------------------
++++++ python-lmdb.spec ++++++
--- /var/tmp/diff_new_pack.YAwss9/_old  2019-11-26 17:04:24.100006303 +0100
+++ /var/tmp/diff_new_pack.YAwss9/_new  2019-11-26 17:04:24.104006301 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-lmdb
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-lmdb
-Version:        0.97
+Version:        0.98
 Release:        0
 Summary:        Universal Python binding for the LMDB 'Lightning' Database
 License:        OLDAP-2.8

++++++ lmdb-0.97.tar.gz -> lmdb-0.98.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lmdb-0.97/ChangeLog new/lmdb-0.98/ChangeLog
--- old/lmdb-0.97/ChangeLog     2019-08-12 05:04:19.000000000 +0200
+++ new/lmdb-0.98/ChangeLog     2019-11-06 18:52:32.000000000 +0100
@@ -1,9 +1,22 @@
+2019-11-06 v0.98
+* Fix that a duplicate argument to a lmdb method would cause an assert.
+
+* Solaris needs ```#include "python.h"``` as soon as possible.  Fix
+  contributed by Jesús Cea.
+
+* Fix crash under debug cpython when mdb_cursor_open failed
+
+
 2019-08-11 v0.97
+
 * Fix a missed GIL unlock sequence.  Reported by ajschorr.
+
 * Fix argv check in JEP (cpython under Java) environment.  Contributed by
   de-code.
 
+
 2019-07-14 v0.96
+
 * First release under new maintainer, Nic Watson.
 
 * Doc updates.
@@ -14,6 +27,7 @@
   requested. This significantly improves read performance to retrieve keys
   with large values when the value isn't retrieved. Reported by Dan Patton.
 
+
 2019-06-08 v0.95
 
 * The minimum supported version of Python is now 2.7.
@@ -31,6 +45,7 @@
 * Database names may be reused after they are dropped on CFFI, without
   reopening the environment. Fix contributed by Gareth Bult.
 
+
 2018-04-09 v0.94
 
 * CPython argument parsing now matches the behaviour of CFFI, and most sane
@@ -43,6 +58,7 @@
 
 * Fixed several 2.7/3 bugs in command line tool.
 
+
 2017-07-16 v0.93
 
 * py-lmdb is now built with AppVeyor CI, providing early feedback on Windows
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lmdb-0.97/PKG-INFO new/lmdb-0.98/PKG-INFO
--- old/lmdb-0.97/PKG-INFO      2019-08-12 05:10:42.000000000 +0200
+++ new/lmdb-0.98/PKG-INFO      2019-11-06 22:40:10.000000000 +0100
@@ -1,12 +1,12 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: lmdb
-Version: 0.97
+Version: 0.98
 Summary: Universal Python binding for the LMDB 'Lightning' Database
-Home-page: http://github.com/dw/py-lmdb/
+Home-page: http://github.com/jnwatson/py-lmdb/
 Author: David Wilson
-Author-email: UNKNOWN
+Maintainer: Nic Watson
 License: OpenLDAP BSD
-Description: UNKNOWN
+Description: Universal Python binding for the LMDB 'Lightning' Database
 Platform: UNKNOWN
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: Implementation :: CPython
@@ -21,5 +21,7 @@
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
 Classifier: Topic :: Database
 Classifier: Topic :: Database :: Database Engines/Servers
+Description-Content-Type: text/plain
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lmdb-0.97/README.md new/lmdb-0.98/README.md
--- old/lmdb-0.97/README.md     2019-08-12 05:04:19.000000000 +0200
+++ new/lmdb-0.98/README.md     2019-11-06 18:52:32.000000000 +0100
@@ -2,10 +2,6 @@
 
 See [the documentation](https://lmdb.readthedocs.io) for more information.
 
-# py-lmdb Has a New Maintainer!
-
-Hi.  My name is Nic Watson.   With lots of help from David, the author and 
original maintainer, I'm taking over maintenance of py-lmdb.  Please be patient 
as we work out the details of the handover.
-
 ### CI State
 
 | Platform | Branch | Status |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lmdb-0.97/lmdb/__init__.py 
new/lmdb-0.98/lmdb/__init__.py
--- old/lmdb-0.97/lmdb/__init__.py      2019-08-12 05:08:03.000000000 +0200
+++ new/lmdb-0.98/lmdb/__init__.py      2019-11-06 18:52:32.000000000 +0100
@@ -50,5 +50,5 @@
     from lmdb.cffi import __all__
     from lmdb.cffi import __doc__
 
-__version__ = '0.97'
+__version__ = '0.98'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lmdb-0.97/lmdb/cpython.c new/lmdb-0.98/lmdb/cpython.c
--- old/lmdb-0.97/lmdb/cpython.c        2019-08-12 05:04:19.000000000 +0200
+++ new/lmdb-0.98/lmdb/cpython.c        2019-11-06 18:52:32.000000000 +0100
@@ -22,6 +22,9 @@
 
 #define PY_SSIZE_T_CLEAN
 
+/* Include order matters! */
+#include "Python.h"
+
 /* Search lib/win32 first, then fallthrough to <stdint.h> as required.*/
 #include "stdint.h"
 
@@ -39,7 +42,6 @@
 
 #include <sys/stat.h>
 
-#include "Python.h"
 #include "structmember.h"
 
 #ifdef HAVE_MEMSINK
@@ -755,7 +757,7 @@
     }
 
     if(args) {
-        int size = (int) PyTuple_GET_SIZE(args);
+        Py_ssize_t size = PyTuple_GET_SIZE(args);
         if(size > specsize) {
             type_error("too many positional arguments.");
             return -1;
@@ -791,8 +793,7 @@
 
             i = READ_ID(specidx);
             if(set & (1 << i)) {
-                PyErr_Format(PyExc_TypeError, "duplicate argument: %s",
-                             PyBytes_AS_STRING(pkey));
+                PyErr_Format(PyExc_TypeError, "duplicate argument: %U", pkey);
                 return -1;
             }
 
@@ -862,7 +863,7 @@
         env->spare_txns = self->spare_next;
         env->max_spare_txns++;
         self->flags &= ~TRANS_SPARE;
-        _Py_NewReference(self);
+        _Py_NewReference((PyObject *)self);
         UNLOCKED(rc, mdb_txn_renew(self->txn));
 
         if(rc) {
@@ -884,6 +885,7 @@
     }
 
     if(rc) {
+        _Py_ForgetReference((PyObject *)self);
         PyObject_Del(self);
         return err_set("mdb_txn_begin", rc);
     }
@@ -929,6 +931,7 @@
     self = PyObject_New(CursorObject, &PyCursor_Type);
     UNLOCKED(rc, mdb_cursor_open(trans->txn, db->dbi, &self->curs));
     if(rc) {
+        _Py_ForgetReference((PyObject *)self);
         PyObject_Del(self);
         return err_set("mdb_cursor_open", rc);
     }
@@ -3656,7 +3659,7 @@
 {
     size_t count;
     char qualname[64];
-    int i;
+    size_t i;
 
     Error = PyErr_NewException("lmdb.Error", NULL, NULL);
     if(! Error) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lmdb-0.97/lmdb.egg-info/PKG-INFO 
new/lmdb-0.98/lmdb.egg-info/PKG-INFO
--- old/lmdb-0.97/lmdb.egg-info/PKG-INFO        2019-08-12 05:10:42.000000000 
+0200
+++ new/lmdb-0.98/lmdb.egg-info/PKG-INFO        2019-11-06 22:40:10.000000000 
+0100
@@ -1,12 +1,12 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: lmdb
-Version: 0.97
+Version: 0.98
 Summary: Universal Python binding for the LMDB 'Lightning' Database
-Home-page: http://github.com/dw/py-lmdb/
+Home-page: http://github.com/jnwatson/py-lmdb/
 Author: David Wilson
-Author-email: UNKNOWN
+Maintainer: Nic Watson
 License: OpenLDAP BSD
-Description: UNKNOWN
+Description: Universal Python binding for the LMDB 'Lightning' Database
 Platform: UNKNOWN
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: Implementation :: CPython
@@ -21,5 +21,7 @@
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
 Classifier: Topic :: Database
 Classifier: Topic :: Database :: Database Engines/Servers
+Description-Content-Type: text/plain
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lmdb-0.97/setup.py new/lmdb-0.98/setup.py
--- old/lmdb-0.97/setup.py      2019-08-12 05:04:19.000000000 +0200
+++ new/lmdb-0.98/setup.py      2019-11-06 18:52:32.000000000 +0100
@@ -156,9 +156,12 @@
     name = 'lmdb',
     version = grep_version(),
     description = "Universal Python binding for the LMDB 'Lightning' Database",
+    long_description = "Universal Python binding for the LMDB 'Lightning' 
Database",
+    long_description_content_type = "text/plain",
     author = 'David Wilson',
+    maintainer = 'Nic Watson',
     license = 'OpenLDAP BSD',
-    url = 'http://github.com/dw/py-lmdb/',
+    url = 'http://github.com/jnwatson/py-lmdb/',
     packages = ['lmdb'],
     classifiers = [
         "Programming Language :: Python",
@@ -174,6 +177,7 @@
         "Programming Language :: Python :: 3.4",
         "Programming Language :: Python :: 3.5",
         "Programming Language :: Python :: 3.6",
+        "Programming Language :: Python :: 3.7",
         "Topic :: Database",
         "Topic :: Database :: Database Engines/Servers",
     ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lmdb-0.97/tests/crash_test.py 
new/lmdb-0.98/tests/crash_test.py
--- old/lmdb-0.97/tests/crash_test.py   2019-08-12 05:04:19.000000000 +0200
+++ new/lmdb-0.98/tests/crash_test.py   2019-11-06 18:52:32.000000000 +0100
@@ -33,7 +33,6 @@
 from __future__ import with_statement
 
 import itertools
-import os
 import random
 import unittest
 
@@ -69,11 +68,6 @@
         self.env.close()
         self.env.close()
 
-    def testDbDoubleClose(self):
-        db = self.env.open_db(key=B('dave3'))
-        #db.close()
-        #db.close()
-
     def testTxnCloseActiveIter(self):
         with self.env.begin() as txn:
             it = txn.cursor().iternext()
@@ -197,7 +191,7 @@
         me_txn0 previously cached MDB_TXN_ERROR permanently. Fixed by
         17bf75b12eb94d9903cd62329048b146d5313bad.
         """
-        path, env = testlib.temp_env(map_size=4096*9, sync=False, 
max_spare_txns=0)
+        path, env = testlib.temp_env(map_size=4096 * 9, sync=False, 
max_spare_txns=0)
         for i in itertools.count():
             try:
                 with env.begin(write=True) as txn:
@@ -220,8 +214,7 @@
         txn = env.begin()
         cur = txn.cursor()
         ite = cur.iternext()
-        nex = getattr(ite, 'next',
-            getattr(ite, '__next__', None))
+        nex = getattr(ite, 'next', getattr(ite, '__next__', None))
         assert nex is not None
         self.assertRaises(StopIteration, nex)
 
@@ -231,7 +224,7 @@
         testlib.cleanup()
 
     def test_multiput_segfault(self):
-        # 
https://github.com/dw/py-lmdb/issues/17://github.com/dw/py-lmdb/issues/173
+        # http://github.com/jnwatson/py-lmdb/issues/173
         _, env = testlib.temp_env()
         db = env.open_db(b'foo', dupsort=True)
         txn = env.begin(db=db, write=True)
@@ -251,5 +244,39 @@
         txn.put(b'a', b'5')
         txn.commit()
 
+class InvalidArgTest(unittest.TestCase):
+    def tearDown(self):
+        testlib.cleanup()
+
+    def test_duplicate_arg(self):
+        # https://github.com/jnwatson/py-lmdb/issues/203
+        _, env = testlib.temp_env()
+        txn = env.begin(write=True)
+        c = txn.cursor()
+        self.assertRaises(TypeError, c.get, b'a', key=True)
+
+class BadCursorTest(unittest.TestCase):
+    def tearDown(self):
+        testlib.cleanup()
+
+    def test_cursor_open_failure(self):
+        '''
+        Test the error path for when mdb_cursor_open fails
+
+        Note:
+            this only would crash if cpython is built with Py_TRACE_REFS
+        '''
+        # https://github.com/jnwatson/py-lmdb/issues/216
+        path, env = testlib.temp_env()
+        db = env.open_db(b'db', dupsort=True)
+        env.close()
+        del env
+
+        env = lmdb.open(path, readonly=True, max_dbs=4)
+        txn1 = env.begin(write=False)
+        db = env.open_db(b'db', dupsort=True, txn=txn1)
+        txn2 = env.begin(write=False)
+        self.assertRaises(lmdb.InvalidParameterError, txn2.cursor, db=db)
+
 if __name__ == '__main__':
     unittest.main()


Reply via email to