Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-dotmap for openSUSE:Factory 
checked in at 2021-09-09 23:07:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-dotmap (Old)
 and      /work/SRC/openSUSE:Factory/.python-dotmap.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-dotmap"

Thu Sep  9 23:07:38 2021 rev:4 rq:917708 version:1.3.24

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-dotmap/python-dotmap.changes      
2020-10-22 14:26:47.150992857 +0200
+++ /work/SRC/openSUSE:Factory/.python-dotmap.new.1899/python-dotmap.changes    
2021-09-09 23:08:05.348868907 +0200
@@ -1,0 +2,18 @@
+Thu Sep  9 11:33:09 UTC 2021 - Matej Cepl <mc...@suse.com>
+
+- Replace python setup.py test with running unittest runner directly.
+
+-------------------------------------------------------------------
+Fri Sep  3 11:42:02 UTC 2021 - John Paul Adrian Glaubitz 
<adrian.glaub...@suse.com>
+
+- Update to 1.3.24
+  * Include license metadata in setup.py (#79)
+  * drop 2.7 support
+  * ignore ds store
+  * drop python 2.7 test support
+  * update pytest
+  * Donate link for those interested
+- from version 1.2.23
+  * fix for circular references in __init__ (#71)
+
+-------------------------------------------------------------------

Old:
----
  dotmap-1.3.22.tar.gz

New:
----
  dotmap-1.3.24.tar.gz

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

Other differences:
------------------
++++++ python-dotmap.spec ++++++
--- /var/tmp/diff_new_pack.T46TPZ/_old  2021-09-09 23:08:05.772869399 +0200
+++ /var/tmp/diff_new_pack.T46TPZ/_new  2021-09-09 23:08:05.776869404 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-dotmap
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 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-dotmap
-Version:        1.3.22
+Version:        1.3.24
 Release:        0
 Summary:        Python ordered, dynamically-expandable dot-access dictionary
 License:        MIT
@@ -44,7 +44,7 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%python_exec setup.py test
+%pyunittest -v dotmap.test
 
 %files %{python_files}
 %doc README.md

++++++ dotmap-1.3.22.tar.gz -> dotmap-1.3.24.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dotmap-1.3.22/PKG-INFO new/dotmap-1.3.24/PKG-INFO
--- old/dotmap-1.3.22/PKG-INFO  2020-10-11 22:47:28.335612800 +0200
+++ new/dotmap-1.3.24/PKG-INFO  2021-07-29 15:21:35.666164400 +0200
@@ -1,16 +1,18 @@
 Metadata-Version: 2.1
 Name: dotmap
-Version: 1.3.22
+Version: 1.3.24
 Summary: ordered, dynamically-expandable dot-access dictionary
 Home-page: https://github.com/drgrib/dotmap
 Author: Chris Redford
 Author-email: credf...@gmail.com
-License: UNKNOWN
+License: MIT
 Download-URL: https://github.com/drgrib/dotmap/tarball/1.0
 Description: # DotMap
         
         [![Build 
Status](https://travis-ci.com/drgrib/dotmap.svg?branch=master)](https://travis-ci.com/drgrib/dotmap)
         
+        
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate?business=N2GLXLS5KBFBY&item_name=Chris+Redford&currency_code=USD)
+        
         # Install
         ```
         pip3 install dotmap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dotmap-1.3.22/README.md new/dotmap-1.3.24/README.md
--- old/dotmap-1.3.22/README.md 2020-06-04 17:33:56.000000000 +0200
+++ new/dotmap-1.3.24/README.md 2021-05-30 03:46:17.000000000 +0200
@@ -2,6 +2,8 @@
 
 [![Build 
Status](https://travis-ci.com/drgrib/dotmap.svg?branch=master)](https://travis-ci.com/drgrib/dotmap)
 
+[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate?business=N2GLXLS5KBFBY&item_name=Chris+Redford&currency_code=USD)
+
 # Install
 ```
 pip3 install dotmap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dotmap-1.3.22/dotmap/__init__.py 
new/dotmap-1.3.24/dotmap/__init__.py
--- old/dotmap-1.3.22/dotmap/__init__.py        2020-10-11 22:47:16.000000000 
+0200
+++ new/dotmap-1.3.24/dotmap/__init__.py        2021-05-30 03:46:17.000000000 
+0200
@@ -23,11 +23,12 @@
         self._map = OrderedDict()
         self._dynamic = kwargs.pop('_dynamic', True)
         self._prevent_method_masking = kwargs.pop('_prevent_method_masking', 
False)
+        trackedIDs = kwargs.pop('_trackedIDs', {})
 
         if args:
             d = args[0]
             # for recursive assignment handling
-            trackedIDs = {id(d): self}
+            trackedIDs[id(d)] = self
 
             src = []
             if isinstance(d, MutableMapping):
@@ -39,17 +40,23 @@
                 if self._prevent_method_masking and k in reserved_keys:
                     raise KeyError('"{}" is reserved'.format(k))
                 if isinstance(v, dict):
-                    if id(v) in trackedIDs:
-                        v = trackedIDs[id(v)]
+                    idv = id(v)
+                    if idv in trackedIDs:
+                        v = trackedIDs[idv]
                     else:
-                        v = self.__class__(v, _dynamic=self._dynamic, 
_prevent_method_masking = self._prevent_method_masking)
-                        trackedIDs[id(v)] = v
+                        trackedIDs[idv] = v
+                        v = self.__class__(v, _dynamic=self._dynamic, 
_prevent_method_masking = self._prevent_method_masking, _trackedIDs = 
trackedIDs)
                 if type(v) is list:
                     l = []
                     for i in v:
                         n = i
                         if isinstance(i, dict):
-                            n = self.__class__(i, _dynamic=self._dynamic, 
_prevent_method_masking = self._prevent_method_masking)
+                            idi = id(i)
+                            if idi in trackedIDs:
+                                n = trackedIDs[idi]
+                            else:
+                                trackedIDs[idi] = i
+                                n = self.__class__(i, _dynamic=self._dynamic, 
_prevent_method_masking = self._prevent_method_masking)
                         l.append(n)
                     v = l
                 self._map[k] = v
@@ -143,21 +150,31 @@
     def __repr__(self):
         return str(self)
 
-    def toDict(self):
+    def toDict(self, seen = None):
+        if seen is None:
+            seen = {}
+
         d = {}
+
+        seen[id(self)] = d
+
         for k,v in self.items():
             if issubclass(type(v), DotMap):
-                # bizarre recursive assignment support
-                if id(v) == id(self):
-                    v = d
+                idv = id(v)
+                if idv in seen:
+                    v = seen[idv]
                 else:
-                    v = v.toDict()
+                    v = v.toDict(seen = seen)
             elif type(v) in (list, tuple):
                 l = []
                 for i in v:
                     n = i
                     if issubclass(type(i), DotMap):
-                        n = i.toDict()
+                        idv = id(n)
+                        if idv in seen:
+                            n = seen[idv]
+                        else:
+                            n = i.toDict(seen = seen)
                     l.append(n)
                 if type(v) is tuple:
                     v = tuple(l)
@@ -647,5 +664,25 @@
     except KeyError:
         print('nested dict attrib masking ok')
 
+    print('\n== DotMap __init__, toDict, and __str__ with circular references 
==')
+
+    a = { 'name': 'a'}
+    b = { 'name': 'b'}
+    c = { 'name': 'c', 'list': []}
+
+    # Create circular reference
+    a['b'] = b
+    b['c'] = c
+    c['a'] = a
+    c['list'].append(b)
+
+    print(a)
+    x = DotMap(a)
+    print(x)
+    y = x.toDict()
+    assert id(y['b']['c']['a']) == id(y)
+    assert id(y['b']['c']['list'][0]) == id(y['b'])
+    print(y)
+
     # final print
     print()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dotmap-1.3.22/dotmap.egg-info/PKG-INFO 
new/dotmap-1.3.24/dotmap.egg-info/PKG-INFO
--- old/dotmap-1.3.22/dotmap.egg-info/PKG-INFO  2020-10-11 22:47:28.000000000 
+0200
+++ new/dotmap-1.3.24/dotmap.egg-info/PKG-INFO  2021-07-29 15:21:35.000000000 
+0200
@@ -1,16 +1,18 @@
 Metadata-Version: 2.1
 Name: dotmap
-Version: 1.3.22
+Version: 1.3.24
 Summary: ordered, dynamically-expandable dot-access dictionary
 Home-page: https://github.com/drgrib/dotmap
 Author: Chris Redford
 Author-email: credf...@gmail.com
-License: UNKNOWN
+License: MIT
 Download-URL: https://github.com/drgrib/dotmap/tarball/1.0
 Description: # DotMap
         
         [![Build 
Status](https://travis-ci.com/drgrib/dotmap.svg?branch=master)](https://travis-ci.com/drgrib/dotmap)
         
+        
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate?business=N2GLXLS5KBFBY&item_name=Chris+Redford&currency_code=USD)
+        
         # Install
         ```
         pip3 install dotmap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dotmap-1.3.22/setup.py new/dotmap-1.3.24/setup.py
--- old/dotmap-1.3.22/setup.py  2020-10-11 22:47:21.000000000 +0200
+++ new/dotmap-1.3.24/setup.py  2021-07-29 15:21:27.000000000 +0200
@@ -4,7 +4,7 @@
     long_description = fh.read()
 
 setup(
-       version = '1.3.22',
+       version = '1.3.24',
     name='dotmap',
     packages=['dotmap'],  # this must be the same as the name above
     description='ordered, dynamically-expandable dot-access dictionary',
@@ -17,4 +17,5 @@
     classifiers=[],
     long_description=long_description,
     long_description_content_type="text/markdown",
+    license="MIT",
 )

Reply via email to