Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-tri.struct for 
openSUSE:Factory checked in at 2022-10-12 18:24:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tri.struct (Old)
 and      /work/SRC/openSUSE:Factory/.python-tri.struct.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-tri.struct"

Wed Oct 12 18:24:41 2022 rev:3 rq:1009905 version:4.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tri.struct/python-tri.struct.changes      
2021-01-25 18:23:52.424450739 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-tri.struct.new.2275/python-tri.struct.changes
    2022-10-12 18:26:20.977908851 +0200
@@ -1,0 +2,6 @@
+Tue Oct 11 16:10:20 UTC 2022 - Yogalakshmi Arunachalam <[email protected]>
+
+- Update to version 4.1.0 
+  * Avoid setting confusing context on AttributeError exceptions (from when 
not finding __missing__)
+
+-------------------------------------------------------------------

Old:
----
  tri.struct-4.0.0.tar.gz

New:
----
  tri.struct-4.1.0.tar.gz

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

Other differences:
------------------
++++++ python-tri.struct.spec ++++++
--- /var/tmp/diff_new_pack.BJpt15/_old  2022-10-12 18:26:21.581910181 +0200
+++ /var/tmp/diff_new_pack.BJpt15/_new  2022-10-12 18:26:21.585910189 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-tri.struct
 #
-# 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
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-tri.struct
-Version:        4.0.0
+Version:        4.1.0
 Release:        0
 Summary:        Python dictionaries with attribute access
 License:        BSD-3-Clause

++++++ tri.struct-4.0.0.tar.gz -> tri.struct-4.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tri.struct-4.0.0/HISTORY.rst 
new/tri.struct-4.1.0/HISTORY.rst
--- old/tri.struct-4.0.0/HISTORY.rst    2020-08-20 13:19:54.000000000 +0200
+++ new/tri.struct-4.1.0/HISTORY.rst    2021-02-01 15:43:32.000000000 +0100
@@ -1,5 +1,12 @@
 Changelog
 ---------
+
+4.1.0 (2021-02-01)
+~~~~~~~~~~~~~~~~~~
+
+* Avoid setting confusing context on AttributeError exceptions (from when not 
finding __missing__)
+
+
 4.0.0 (2020-12-20)
 ~~~~~~~~~~~~~~~~~~
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tri.struct-4.0.0/lib/tri_struct/__init__.py 
new/tri.struct-4.1.0/lib/tri_struct/__init__.py
--- old/tri.struct-4.0.0/lib/tri_struct/__init__.py     2020-08-20 
13:19:54.000000000 +0200
+++ new/tri.struct-4.1.0/lib/tri_struct/__init__.py     2021-02-01 
15:43:32.000000000 +0100
@@ -5,7 +5,7 @@
     FastStruct = None
 
 
-__version__ = '4.0.0'  # pragma: no mutate
+__version__ = '4.1.0'  # pragma: no mutate
 __all__ = ['Struct', 'FastStruct', 'FrozenStruct', 'merged', 'DefaultStruct', 
'to_default_struct']  # pragma: no mutate
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tri.struct-4.0.0/lib/tri_struct/_pystruct.py 
new/tri.struct-4.1.0/lib/tri_struct/_pystruct.py
--- old/tri.struct-4.0.0/lib/tri_struct/_pystruct.py    2020-08-20 
13:19:54.000000000 +0200
+++ new/tri.struct-4.1.0/lib/tri_struct/_pystruct.py    2021-02-01 
15:43:32.000000000 +0100
@@ -43,9 +43,11 @@
             except AttributeError as e:
                 try:
                     missing_ = object.__getattribute__(self, '__missing__')
-                    return missing_.__get__(self)(item)
                 except AttributeError:
-                    raise e
+                    pass
+                else:
+                    return missing_.__get__(self)(item)
+                raise e
         return dict.__getitem__(self, item)
 
     def __setattr__(self, key, value):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tri.struct-4.0.0/tests/test_struct.py 
new/tri.struct-4.1.0/tests/test_struct.py
--- old/tri.struct-4.0.0/tests/test_struct.py   2020-08-20 13:19:54.000000000 
+0200
+++ new/tri.struct-4.1.0/tests/test_struct.py   2021-02-01 15:43:32.000000000 
+0100
@@ -213,6 +213,13 @@
     assert m.bar == 1
 
 
+def test_attribute_exception(Struct):
+    with pytest.raises(AttributeError) as e:
+        Struct().foo
+    assert str(e.value) == "'Struct' object has no attribute 'foo'"
+    assert e.value.__context__ is None
+
+
 # because of class name & module renaming, pickling the different
 # implementations won't, unless you also switch the tri_struct.Struct
 # implementation to match

Reply via email to