Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-nbxmpp for openSUSE:Factory 
checked in at 2024-07-01 11:20:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-nbxmpp (Old)
 and      /work/SRC/openSUSE:Factory/.python-nbxmpp.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-nbxmpp"

Mon Jul  1 11:20:54 2024 rev:50 rq:1184069 version:5.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-nbxmpp/python-nbxmpp.changes      
2024-06-11 18:32:15.179359396 +0200
+++ /work/SRC/openSUSE:Factory/.python-nbxmpp.new.18349/python-nbxmpp.changes   
2024-07-01 11:21:22.581259427 +0200
@@ -1,0 +2,6 @@
+Sun Jun 30 07:15:22 UTC 2024 - Dirk Müller <dmuel...@suse.com>
+
+- update to 5.0.1:
+  * SecurityLabels: Add restrict attribute
+
+-------------------------------------------------------------------

Old:
----
  python-nbxmpp-5.0.0.tar.bz2

New:
----
  python-nbxmpp-5.0.1.tar.bz2

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

Other differences:
------------------
++++++ python-nbxmpp.spec ++++++
--- /var/tmp/diff_new_pack.71I4A5/_old  2024-07-01 11:21:23.053276622 +0200
+++ /var/tmp/diff_new_pack.71I4A5/_new  2024-07-01 11:21:23.053276622 +0200
@@ -16,20 +16,20 @@
 #
 
 
-# Requires at least python 3.10
-%define skip_python38 1
-%define skip_python39 1
 %{?sle15_python_module_pythons}
 %define _name   nbxmpp
 Name:           python-nbxmpp
-Version:        5.0.0
+Version:        5.0.1
 Release:        0
 Summary:        XMPP library by Gajim team
 License:        GPL-3.0-or-later
 Group:          Development/Languages/Python
 URL:            https://dev.gajim.org/gajim/python-nbxmpp
 Source:         %{url}/-/archive/%{version}/python-nbxmpp-%{version}.tar.bz2
+BuildRequires:  %{python_module base >= 3.10}
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools >= 65.0}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-generators >= 20220912
 BuildRequires:  python-rpm-macros >= 20220912
@@ -73,6 +73,6 @@
 %files %{python_files}
 %license COPYING
 %doc ChangeLog README.md
-%{python_sitelib}/%{_name}/
-%{python_sitelib}/%{_name}-*
+%{python_sitelib}/%{_name}
+%{python_sitelib}/%{_name}-%{version}.dist-info
 

++++++ python-nbxmpp-5.0.0.tar.bz2 -> python-nbxmpp-5.0.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-nbxmpp-5.0.0/ChangeLog 
new/python-nbxmpp-5.0.1/ChangeLog
--- old/python-nbxmpp-5.0.0/ChangeLog   2024-06-07 23:42:52.000000000 +0200
+++ new/python-nbxmpp-5.0.1/ChangeLog   2024-06-22 09:17:59.000000000 +0200
@@ -1,3 +1,9 @@
+nbxmpp 5.0.1 (20 Jun 2024)
+
+  Improvements
+
+  * SecurityLabels: Add restrict attribute
+
 nbxmpp 5.0.0 (04 Jun 2024)
 
   New
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-nbxmpp-5.0.0/nbxmpp/__init__.py 
new/python-nbxmpp-5.0.1/nbxmpp/__init__.py
--- old/python-nbxmpp-5.0.0/nbxmpp/__init__.py  2024-06-07 23:42:52.000000000 
+0200
+++ new/python-nbxmpp-5.0.1/nbxmpp/__init__.py  2024-06-22 09:17:59.000000000 
+0200
@@ -4,4 +4,4 @@
 
 from .protocol import *  # noqa: F403, E402
 
-__version__: str = '5.0.0'
+__version__: str = '5.0.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-nbxmpp-5.0.0/nbxmpp/modules/security_labels.py 
new/python-nbxmpp-5.0.1/nbxmpp/modules/security_labels.py
--- old/python-nbxmpp-5.0.0/nbxmpp/modules/security_labels.py   2024-06-07 
23:42:52.000000000 +0200
+++ new/python-nbxmpp-5.0.1/nbxmpp/modules/security_labels.py   2024-06-22 
09:17:59.000000000 +0200
@@ -25,6 +25,7 @@
 from nbxmpp.simplexml import Node
 from nbxmpp.structs import StanzaHandler
 from nbxmpp.task import iq_request_task
+from nbxmpp.util import from_xs_boolean
 
 
 class SecurityLabels(BaseModule):
@@ -63,18 +64,27 @@
         catalog_node = response.getTag('catalog',
                                        namespace=Namespace.SECLABEL_CATALOG)
 
+        try:
+            restrict = from_xs_boolean(catalog_node.getAttr('restrict'))
+        except Exception:
+            restrict = False
+
         items = catalog_node.getTags('item')
 
         labels = {}
         default = None
         for item in items:
-            label = item.getAttr('selector')
-            if label is None:
+            selector = item.getAttr('selector')
+            if selector is None:
                 continue
 
+            if item.getAttr('default') == 'true':
+                default = selector
+
             security = item.getTag('securitylabel',
                                    namespace=Namespace.SECLABEL)
             if security is None:
+                labels[selector] = None
                 continue
 
             try:
@@ -82,12 +92,9 @@
             except ValueError:
                 continue
 
-            labels[label] = security_label
-
-            if item.getAttr('default') == 'true':
-                default = label
+            labels[selector] = security_label
 
-        yield Catalog(labels=labels, default=default)
+        yield Catalog(labels=labels, default=default, restrict=restrict)
 
 
 def _make_catalog_request(domain, jid):
@@ -156,8 +163,9 @@
 
 @dataclass
 class Catalog:
-    labels: dict[str, SecurityLabel]
+    labels: dict[str, SecurityLabel | None]
     default: str
+    restrict: bool
 
-    def get_label_names(self):
+    def get_label_names(self) -> list[str]:
         return list(self.labels.keys())

Reply via email to