Hello community,

here is the log from the commit of package python3-pickleshare for 
openSUSE:Factory checked in at 2016-07-18 21:24:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-pickleshare (Old)
 and      /work/SRC/openSUSE:Factory/.python3-pickleshare.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-pickleshare"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-pickleshare/python3-pickleshare.changes  
2016-05-25 21:25:11.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.python3-pickleshare.new/python3-pickleshare.changes 
    2016-07-18 21:24:51.000000000 +0200
@@ -1,0 +2,10 @@
+Fri Jul 15 15:21:46 UTC 2016 - a...@gmx.de
+
+- update to version 0.7.3:
+  * Fix environment marker
+  * Include license and test files in sdists
+  * Fix for multiple processes creating a folder
+  * handle exception and keep Python 2 support
+  * Remove unused import
+
+-------------------------------------------------------------------
@@ -6 +15,0 @@
-

Old:
----
  pickleshare-0.7.2.tar.gz

New:
----
  pickleshare-0.7.3.tar.gz

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

Other differences:
------------------
++++++ python3-pickleshare.spec ++++++
--- /var/tmp/diff_new_pack.1aYDLt/_old  2016-07-18 21:24:52.000000000 +0200
+++ /var/tmp/diff_new_pack.1aYDLt/_new  2016-07-18 21:24:52.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python3-pickleshare
-Version:        0.7.2
+Version:        0.7.3
 Release:        0
 Summary:        Tiny shelve-like database with concurrency support
 License:        MIT

++++++ pickleshare-0.7.2.tar.gz -> pickleshare-0.7.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pickleshare-0.7.2/LICENSE 
new/pickleshare-0.7.3/LICENSE
--- old/pickleshare-0.7.2/LICENSE       1970-01-01 01:00:00.000000000 +0100
+++ new/pickleshare-0.7.3/LICENSE       2016-07-15 15:12:52.000000000 +0200
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Ville Vainio
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pickleshare-0.7.2/MANIFEST.in 
new/pickleshare-0.7.3/MANIFEST.in
--- old/pickleshare-0.7.2/MANIFEST.in   1970-01-01 01:00:00.000000000 +0100
+++ new/pickleshare-0.7.3/MANIFEST.in   2016-07-15 15:12:52.000000000 +0200
@@ -0,0 +1,2 @@
+include LICENSE
+include test_pickleshare.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pickleshare-0.7.2/PKG-INFO 
new/pickleshare-0.7.3/PKG-INFO
--- old/pickleshare-0.7.2/PKG-INFO      2016-04-08 21:19:09.000000000 +0200
+++ new/pickleshare-0.7.3/PKG-INFO      2016-07-15 15:26:10.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pickleshare
-Version: 0.7.2
+Version: 0.7.3
 Summary: Tiny 'shelve'-like database with concurrency support
 Home-page: https://github.com/pickleshare/pickleshare
 Author: Ville Vainio
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pickleshare-0.7.2/pickleshare.egg-info/PKG-INFO 
new/pickleshare-0.7.3/pickleshare.egg-info/PKG-INFO
--- old/pickleshare-0.7.2/pickleshare.egg-info/PKG-INFO 2016-04-08 
21:19:09.000000000 +0200
+++ new/pickleshare-0.7.3/pickleshare.egg-info/PKG-INFO 2016-07-15 
15:26:10.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pickleshare
-Version: 0.7.2
+Version: 0.7.3
 Summary: Tiny 'shelve'-like database with concurrency support
 Home-page: https://github.com/pickleshare/pickleshare
 Author: Ville Vainio
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pickleshare-0.7.2/pickleshare.egg-info/SOURCES.txt 
new/pickleshare-0.7.3/pickleshare.egg-info/SOURCES.txt
--- old/pickleshare-0.7.2/pickleshare.egg-info/SOURCES.txt      2016-04-08 
21:19:09.000000000 +0200
+++ new/pickleshare-0.7.3/pickleshare.egg-info/SOURCES.txt      2016-07-15 
15:26:10.000000000 +0200
@@ -1,6 +1,9 @@
+LICENSE
+MANIFEST.in
 pickleshare.py
 setup.cfg
 setup.py
+test_pickleshare.py
 pickleshare.egg-info/PKG-INFO
 pickleshare.egg-info/SOURCES.txt
 pickleshare.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pickleshare-0.7.2/pickleshare.py 
new/pickleshare-0.7.3/pickleshare.py
--- old/pickleshare-0.7.2/pickleshare.py        2016-04-08 21:12:49.000000000 
+0200
+++ new/pickleshare-0.7.3/pickleshare.py        2016-07-15 15:16:33.000000000 
+0200
@@ -36,7 +36,7 @@
 from __future__ import print_function
 
 
-__version__ = "0.7.2"
+__version__ = "0.7.3"
 
 try:
     from pathlib import Path
@@ -50,7 +50,6 @@
     import cPickle as pickle
 except ImportError:
     import pickle
-import glob
 import errno
 
 def gethashfile(key):
@@ -65,7 +64,13 @@
         root = os.path.abspath(os.path.expanduser(str(root)))
         self.root = Path(root)
         if not self.root.is_dir():
-            self.root.mkdir(parents=True)
+            # catching the exception is necessary if multiple processes are 
concurrently trying to create a folder
+            # exists_ok keyword argument of mkdir does the same but only from 
Python 3.5
+            try:
+                self.root.mkdir(parents=True)
+            except OSError as e:
+                if e.errno != errno.EEXIST:
+                    raise
         # cache has { 'key' : (obj, orig_mod_time) }
         self.cache = {}
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pickleshare-0.7.2/setup.cfg 
new/pickleshare-0.7.3/setup.cfg
--- old/pickleshare-0.7.2/setup.cfg     2016-04-08 21:19:09.000000000 +0200
+++ new/pickleshare-0.7.3/setup.cfg     2016-07-15 15:26:10.000000000 +0200
@@ -2,7 +2,7 @@
 universal = 1
 
 [egg_info]
-tag_svn_revision = 0
 tag_build = 
 tag_date = 0
+tag_svn_revision = 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pickleshare-0.7.2/test_pickleshare.py 
new/pickleshare-0.7.3/test_pickleshare.py
--- old/pickleshare-0.7.2/test_pickleshare.py   1970-01-01 01:00:00.000000000 
+0100
+++ new/pickleshare-0.7.3/test_pickleshare.py   2016-07-15 15:12:52.000000000 
+0200
@@ -0,0 +1,54 @@
+from __future__ import print_function
+import os
+
+from pickleshare import PickleShareDB
+
+def test_pickleshare(tmpdir):
+    db = PickleShareDB(tmpdir)
+    db.clear()
+    print("Should be empty:",db.items())
+    assert len(db) == 0
+    db['hello'] = 15
+    assert db['hello'] == 15
+    db['aku ankka'] = [1,2,313]
+    assert db['aku ankka'] == [1,2,313]
+    db['paths/nest/ok/keyname'] = [1,(5,46)]
+    assert db['paths/nest/ok/keyname'] == [1,(5,46)]
+
+    db.hset('hash', 'aku', 12)
+    db.hset('hash', 'ankka', 313)
+    assert db.hget('hash', 'aku') == 12
+    assert db.hget('hash', 'ankka') == 313
+
+    print("all hashed",db.hdict('hash'))
+    print(db.keys())
+    print(db.keys('paths/nest/ok/k*'))
+    print(dict(db)) # snapsot of whole db
+    db.uncache() # frees memory, causes re-reads later
+
+    # shorthand for accessing deeply nested files
+    lnk = db.getlink('myobjects/test')
+    lnk.foo = 2
+    lnk.bar = lnk.foo + 5
+    assert lnk.bar == 7
+
+def test_stress(tmpdir):
+    db = PickleShareDB(tmpdir)
+    import time,sys
+    for i in range(100):
+        for j in range(500):
+            if i % 15 == 0 and i < 70:
+                if str(j) in db:
+                    del db[str(j)]
+                continue
+
+            if j%33 == 0:
+                time.sleep(0.02)
+
+            db[str(j)] = db.get(str(j), []) + [(i,j,"proc %d" % os.getpid())]
+            db.hset('hash',j, db.hget('hash',j,15) + 1 )
+
+        print(i, end=' ')
+        sys.stdout.flush()
+        if i % 10 == 0:
+            db.uncache()


Reply via email to