Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-python-bindings for 
openSUSE:Factory checked in at 2023-02-25 19:54:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-python-bindings (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-python-bindings.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-python-bindings"

Sat Feb 25 19:54:35 2023 rev:52 rq:1067446 version:4.5.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/yast2-python-bindings/yast2-python-bindings.changes  
    2022-07-21 11:33:11.978938057 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-python-bindings.new.31432/yast2-python-bindings.changes
   2023-02-25 19:54:41.831113306 +0100
@@ -1,0 +2,10 @@
+Wed Feb  8 15:57:19 UTC 2023 - Noel Power <[email protected]>
+
+- Misc fixes to examples; (bsc#1199343).
+- Fix python2 utf8 handling (python2 code wasn't displaying unicode
+  strings); (bsc#1199348).
+- Change conversion of Py_None to YCP_Void instead of YCP_Null;
+  (bsc#1199344).
+- 4.5.2
+
+-------------------------------------------------------------------

Old:
----
  yast2-python-bindings-4.5.1.tar.bz2

New:
----
  yast2-python-bindings-4.5.2.tar.bz2

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

Other differences:
------------------
++++++ yast2-python-bindings.spec ++++++
--- /var/tmp/diff_new_pack.1PDGwc/_old  2023-02-25 19:54:42.887119814 +0100
+++ /var/tmp/diff_new_pack.1PDGwc/_new  2023-02-25 19:54:42.891119838 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-python-bindings
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,7 @@
 %bcond_with python2
 %endif
 Name:           yast2-python-bindings
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 Summary:        Python bindings for the YaST platform
 License:        GPL-2.0-only

++++++ yast2-python-bindings-4.5.1.tar.bz2 -> 
yast2-python-bindings-4.5.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/BarGraph3.py 
new/yast2-python-bindings-4.5.2/examples/BarGraph3.py
--- old/yast2-python-bindings-4.5.1/examples/BarGraph3.py       2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/BarGraph3.py       2023-02-23 
16:46:07.000000000 +0100
@@ -96,12 +96,13 @@
             else:
               new_values = ycpbuiltins.add(
                       new_values,
-                      old_val + (-(sign) * (inc / (len(values) - 1) ))
+                      old_val + (-(sign) * (inc // (len(values) - 1) ))
                       )
 
             i2 = i2 + 1
 
           values = copy.deepcopy(new_values)
+
           UI.ChangeWidget(Id("bar"), "Values", values)
 
         if button_id == "close" or "button_id" == "cancel":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/ComboBox2.py 
new/yast2-python-bindings-4.5.2/examples/ComboBox2.py
--- old/yast2-python-bindings-4.5.1/examples/ComboBox2.py       2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/ComboBox2.py       2023-02-23 
16:46:07.000000000 +0100
@@ -56,7 +56,7 @@
       UI.OpenDialog(
         VBox(
           Label("You will get a pizza with:"),
-          Label("toppings"),
+          Label(toppings),
           PushButton("&OK")
         )
       )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/DefaultButtons1.py 
new/yast2-python-bindings-4.5.2/examples/DefaultButtons1.py
--- old/yast2-python-bindings-4.5.1/examples/DefaultButtons1.py 2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/DefaultButtons1.py 2023-02-23 
16:46:07.000000000 +0100
@@ -47,11 +47,11 @@
         Opt("defaultsize"),
         Wizard(
           Opt("stepsEnabled"),
-          Id("back"),
+          Symbol("back"),
           "&Back",
-          Id("abort"),
+          Symbol("abort"),
           "Ab&ort",
-          Id("next"),
+          Symbol("next"),
           "&Next"
         )
       )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/DefaultButtons2.py 
new/yast2-python-bindings-4.5.2/examples/DefaultButtons2.py
--- old/yast2-python-bindings-4.5.1/examples/DefaultButtons2.py 2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/DefaultButtons2.py 2023-02-23 
16:46:07.000000000 +0100
@@ -46,11 +46,11 @@
         Opt("defaultsize"),
         Wizard(
           Opt("stepsEnabled"),
-          Id("back"),
+          Symbol("back"),
           "&Back",
-          Id("abort"),
+          Symbol("abort"),
           "Ab&ort",
-          Id("next"),
+          Symbol("next"),
           "&Next"
         )
       )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/DefaultButtons3.py 
new/yast2-python-bindings-4.5.2/examples/DefaultButtons3.py
--- old/yast2-python-bindings-4.5.1/examples/DefaultButtons3.py 2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/DefaultButtons3.py 2023-02-23 
16:46:07.000000000 +0100
@@ -46,11 +46,11 @@
         Opt("defaultsize"),
         Wizard(
           Opt("stepsEnabled"),
-          Id("back"),
+          Symbol("back"),
           "&Back",
-          Id("abort"),
+          Symbol("abort"),
           "Ab&ort",
-          Id("next"),
+          Symbol("next"),
           "&Next"
         )
       )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/HSquash1.py 
new/yast2-python-bindings-4.5.2/examples/HSquash1.py
--- old/yast2-python-bindings-4.5.1/examples/HSquash1.py        2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/HSquash1.py        2023-02-23 
16:46:07.000000000 +0100
@@ -0,0 +1,28 @@
+# encoding: utf-8
+
+from yast import import_module
+import_module('UI')
+from yast import *
+class HSquash1Client:
+    def main(self):
+      UI.OpenDialog(
+        Opt("defaultsize"),
+        VBox(
+          VCenter(
+            HSquash(
+              VBox(
+                Left(CheckBox("short")),
+                Left(CheckBox("longer")),
+                Left(CheckBox("even longer")),
+                Left(CheckBox("yet even longer")),
+              )
+            ) # Makes the VBox nonstretchable horizontally
+          ), # Makes the HSquash stretchable vertically
+          Left(PushButton("bottom left"))
+        )
+      )
+      UI.UserInput()
+      UI.CloseDialog()
+
+HSquash1Client().main()
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/Image1.py 
new/yast2-python-bindings-4.5.2/examples/Image1.py
--- old/yast2-python-bindings-4.5.1/examples/Image1.py  2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/Image1.py  2023-02-23 
16:46:07.000000000 +0100
@@ -11,20 +11,13 @@
         VBox(
           Image(
             Id("image"),
-            "/usr/share/YaST2/theme/current/wallpapers/welcome.jpg",
+            "/usr/share/grub2/themes/openSUSE/logo.png",
             "fallback text"
           ),
           PushButton(Opt("default"), "&OK")
         )
       )
       UI.UserInput()
-      if UI.WidgetExists(Id("image")):
-        UI.ChangeWidget(Id("image"), "Enabled", False)
-        UI.UserInput()
-        UI.ChangeWidget(Id("image"), "Enabled", True)
-        UI.UserInput()
-      else:
-        ycpbuiltins.y2error("No such widget id")
       UI.CloseDialog()
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/Label1_cs.py 
new/yast2-python-bindings-4.5.2/examples/Label1_cs.py
--- old/yast2-python-bindings-4.5.1/examples/Label1_cs.py       2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/Label1_cs.py       2023-02-23 
16:46:07.000000000 +0100
@@ -7,8 +7,8 @@
     def main(self):
       UI.OpenDialog(
         VBox(
-          Label("\u011B\u0161\u010D\u0159\u017E\u00FD\u00E1\u00ED\u02C7"),
-          PushButton("&OK\u011B\u0161")
+          Label(u"\u011B\u0161\u010D\u0159\u017E\u00FD\u00E1\u00ED\u02C7"),
+          PushButton(u"&OK\u011B\u0161")
         )
       )
       UI.UserInput()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/Label1_de.py 
new/yast2-python-bindings-4.5.2/examples/Label1_de.py
--- old/yast2-python-bindings-4.5.1/examples/Label1_de.py       2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/Label1_de.py       2023-02-23 
16:46:07.000000000 +0100
@@ -8,9 +8,9 @@
       UI.OpenDialog(
         VBox(
           Label(
-            
"\u00DF\u00F6\u00F6\u00F6\u00F6\u00F6\u00F6\u00DC\u00DC\u00DC\u00DC\u00DC\u00F6\u00DF\u00DF\u00DF\u00DF\u00E4\u00C4\u00C4\u00C4\u00C4"
+            
u"\u00DF\u00F6\u00F6\u00F6\u00F6\u00F6\u00F6\u00DC\u00DC\u00DC\u00DC\u00DC\u00F6\u00DF\u00DF\u00DF\u00DF\u00E4\u00C4\u00C4\u00C4\u00C4"
           ),
-          PushButton("\u00C4&\u00D6\u00E4")
+          PushButton(u"\u00C4&\u00D6\u00E4")
         )
       )
       UI.UserInput()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/Label1_ja.py 
new/yast2-python-bindings-4.5.2/examples/Label1_ja.py
--- old/yast2-python-bindings-4.5.1/examples/Label1_ja.py       2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/Label1_ja.py       2023-02-23 
16:46:07.000000000 +0100
@@ -5,7 +5,7 @@
 from yast import *
 class Label1JaClient:
     def main(self):
-      UI.OpenDialog(VBox(Label("\u5B8C\u6642"), PushButton("&OK\u5B8C\u6642")))
+      UI.OpenDialog(VBox(Label(u"\u5B8C\u6642"), 
PushButton(u"&OK\u5B8C\u6642")))
       UI.UserInput()
       UI.CloseDialog()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/Label2_ml.py 
new/yast2-python-bindings-4.5.2/examples/Label2_ml.py
--- old/yast2-python-bindings-4.5.1/examples/Label2_ml.py       2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/Label2_ml.py       2023-02-23 
16:46:07.000000000 +0100
@@ -8,8 +8,8 @@
       UI.OpenDialog(
         VBox(
           Label(
-            
"\u00DF\u00F6\u00F6\u00F6\u00F6\u00F6\u00F6\u00DC\u00DC\u00DC\u00DC\u00DC\u00F6\u00DF\u00DF\u00DF\u00DF\u00E4\u00C4\u00C4\u00C4\u00C4\n"
 +
-              "\u011B\u0161\u010D\u0159\u017E\u00FD\u00E1\u00ED\u02C7\n" +
+            
u"\u00DF\u00F6\u00F6\u00F6\u00F6\u00F6\u00F6\u00DC\u00DC\u00DC\u00DC\u00DC\u00F6\u00DF\u00DF\u00DF\u00DF\u00E4\u00C4\u00C4\u00C4\u00C4\n"
 +
+            u"\u011B\u0161\u010D\u0159\u017E\u00FD\u00E1\u00ED\u02C7\n" +
               "multiple lines."
           ),
           PushButton("&OK")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/MultiProgressMeter2.py 
new/yast2-python-bindings-4.5.2/examples/MultiProgressMeter2.py
--- old/yast2-python-bindings-4.5.1/examples/MultiProgressMeter2.py     
2022-07-15 15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/MultiProgressMeter2.py     
2023-02-23 16:46:07.000000000 +0100
@@ -110,10 +110,10 @@
 
         if widgetClass == "RadioButton":
           currentUnitID = UI.QueryWidget("unit", "CurrentButton")
-          print "type %s"%type(currentUnitID)
+          print ("type %s"%type(currentUnitID))
           #if Ops.is_term?(currentUnitID):
-          if isinstance (currentUnitID, YCPTerm):
-            unit = currentUnitID.value(0)
+          if isinstance (currentUnitID, tuple):
+            unit = currentUnitID[0]
 
             ycpbuiltins.y2milestone("New unit: 2^%1", unit)
             UI.ReplaceWidget(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/MultiSelectionBox3.py 
new/yast2-python-bindings-4.5.2/examples/MultiSelectionBox3.py
--- old/yast2-python-bindings-4.5.1/examples/MultiSelectionBox3.py      
2022-07-15 15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/MultiSelectionBox3.py      
2023-02-23 16:46:07.000000000 +0100
@@ -26,7 +26,7 @@
           PushButton(Opt("default"), "&OK")
         )
       )
-      UI.ChangeWidget("toppings", "SelectedItems", ["sausage", "onions"])
+      UI.ChangeWidget("toppings", "SelectedItems", [Symbol("sausage"), 
Symbol("onions")])
 
       UI.UserInput()
       selected_items = UI.QueryWidget(Id("toppings"), "SelectedItems")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/PatternSelector-wizard-with-packages.py
 
new/yast2-python-bindings-4.5.2/examples/PatternSelector-wizard-with-packages.py
--- 
old/yast2-python-bindings-4.5.1/examples/PatternSelector-wizard-with-packages.py
    2022-07-15 15:48:38.000000000 +0200
+++ 
new/yast2-python-bindings-4.5.2/examples/PatternSelector-wizard-with-packages.py
    2023-02-23 16:46:07.000000000 +0100
@@ -22,8 +22,7 @@
 
       UI.OpenDialog(
         Opt("defaultsize"),
-        #Wizard("back", "", "cancel", "&Cancel", "ok", "&OK")
-        Wizard(Opt("stepsEnabled"), Id("back"), "", Id("cancel"), "&Cancel", 
Id("ok"), "&OK")
+        Wizard(Symbol("back"), "", Symbol("cancel"), "&Cancel", Symbol("ok"), 
"&OK")
       )
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/RichText1_cs.py 
new/yast2-python-bindings-4.5.2/examples/RichText1_cs.py
--- old/yast2-python-bindings-4.5.1/examples/RichText1_cs.py    2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/RichText1_cs.py    2023-02-23 
16:46:07.000000000 +0100
@@ -12,7 +12,7 @@
           RichText(
             "<h3>RichText example</h3>" +
               "<p>This is a <i>RichText</i> widget.</p>" +
-              "<p>It's czech: 
\u011B\u0161\u010D\u0159\u017E\u00FD\u00E1\u00ED\u02C7<i>HTML</i>, or german 
\u00F6\u00F6\u00E4\u00E4\u00E4</p>" +
+              u"<p>It's czech: 
\u011B\u0161\u010D\u0159\u017E\u00FD\u00E1\u00ED\u02C7<i>HTML</i>, or german 
\u00F6\u00F6\u00E4\u00E4\u00E4</p>" +
               "<p><b>bold</b> and <i>italic</i> you can rely on.</p>" + "<p>" +
               "<font color=blue>colored\t</font>" +
               "<font color=red>\ttext \t</font>" +
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/SetLanguage.py 
new/yast2-python-bindings-4.5.2/examples/SetLanguage.py
--- old/yast2-python-bindings-4.5.1/examples/SetLanguage.py     2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/SetLanguage.py     2023-02-23 
16:46:07.000000000 +0100
@@ -52,12 +52,12 @@
               Heading("Test Dialog"),
               Label(
                 "Fonts may have changed\n" +
-                  "Gr\u00FC\u00DF Gott\n" +
-                  "Czech (\u010Desky)\n" +
-                  "Greek (\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC)\n" 
+
-                  "Russian (\u0420\u0443\u0441\u0441\u043A\u0438\u0439)\n" +
-                  "\u6F22\u5B57\u304B\u306A\u76F4\n" +
-                  "Hangul (\uD55C\uAE00)"
+                  u"Gr\u00FC\u00DF Gott\n" +
+                  u"Czech (\u010Desky)\n" +
+                  u"Greek 
(\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC)\n" +
+                  u"Russian (\u0420\u0443\u0441\u0441\u043A\u0438\u0439)\n" +
+                  u"\u6F22\u5B57\u304B\u306A\u76F4\n" +
+                  u"Hangul (\uD55C\uAE00)"
               ),
               PushButton(Opt("default"), "&OK")
             )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/ShortcutConflict5.py 
new/yast2-python-bindings-4.5.2/examples/ShortcutConflict5.py
--- old/yast2-python-bindings-4.5.1/examples/ShortcutConflict5.py       
2022-07-15 15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/ShortcutConflict5.py       
2023-02-23 16:46:07.000000000 +0100
@@ -14,7 +14,7 @@
     def main(self):
       UI.OpenDialog(
         Opt("defaultsize"),
-        Wizard("back", "&Back", "abort", "&Abort", "next", "&Next")
+        Wizard(Symbol("back"), "&Back", Symbol("abort"), "&Abort", 
Symbol("next"), "&Next")
       )
 
       fields = HBox(
@@ -40,7 +40,7 @@
 
         ycpbuiltins.y2milestone("Got event: %1", event)
 
-        if Ops.get(event, "ID") == "abort":
+        if "ID" in event and event["ID"] == "abort":
           break
 
       UI.CloseDialog()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/ShortcutConflict6.py 
new/yast2-python-bindings-4.5.2/examples/ShortcutConflict6.py
--- old/yast2-python-bindings-4.5.1/examples/ShortcutConflict6.py       
2022-07-15 15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/ShortcutConflict6.py       
2023-02-23 16:46:07.000000000 +0100
@@ -10,7 +10,7 @@
 
       UI.OpenDialog(
         HBox(
-          PushButton("&\u00A7\u00A7"),
+          PushButton(u"&\u00A7\u00A7"),
           PushButton("&???"),
           PushButton("?&??"),
           PushButton("&!!!"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/SlideShowDemo.py 
new/yast2-python-bindings-4.5.2/examples/SlideShowDemo.py
--- old/yast2-python-bindings-4.5.1/examples/SlideShowDemo.py   2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/SlideShowDemo.py   2023-02-23 
16:46:07.000000000 +0100
@@ -63,11 +63,11 @@
         Opt("defaultsize"),
         Wizard(
           Opt("stepsEnabled"),
-          Id("back"),
+          Symbol("back"),
           "&Back",
-          Id("abort"),
+          Symbol("abort"),
           "Ab&ort",
-          Id("next"),
+          Symbol("next"),
           "&Next"
         )
       )
@@ -303,8 +303,8 @@
       return ycpbuiltins.sformat("0%1", n) if (n < 10) else 
ycpbuiltins.sformat("%1", n)
 
     def formatTime(self, seconds):
-      hours = (seconds / 3600)
-      minutes = (seconds / 60)
+      hours = (seconds // 3600)
+      minutes = (seconds // 60)
       seconds = (seconds % 60)
       return ycpbuiltins.sformat(
         "%1:%2:%3",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/SlideShowDemo2.py 
new/yast2-python-bindings-4.5.2/examples/SlideShowDemo2.py
--- old/yast2-python-bindings-4.5.1/examples/SlideShowDemo2.py  2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/SlideShowDemo2.py  2023-02-23 
16:46:07.000000000 +0100
@@ -63,11 +63,11 @@
         Opt("defaultsize"),
         Wizard(
           Opt("stepsEnabled"),
-          Id("back"),
+          Symbol("back"),
           "&Back",
-          Id("abort"),
+          Symbol("abort"),
           "Ab&ort",
-          Id("next"),
+          Symbol("next"),
           "&Next"
         )
       )
@@ -290,8 +290,8 @@
       return ycpbuiltins.sformat("0%1", n) if (n < 10) else 
ycpbuiltins.sformat("%1", n)
 
     def formatTime(self, seconds):
-      hours = (seconds / 3600)
-      minutes = (seconds / 60)
+      hours = (seconds // 3600)
+      minutes = (seconds // 60)
       seconds = (seconds % 60)
       return ycpbuiltins.sformat(
         "%1:%2:%3",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/Table-icons.py 
new/yast2-python-bindings-4.5.2/examples/Table-icons.py
--- old/yast2-python-bindings-4.5.1/examples/Table-icons.py     2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/Table-icons.py     2023-02-23 
16:46:07.000000000 +0100
@@ -43,9 +43,9 @@
 
       test = Term("icon", "22x22/apps/" + "iconName")
       test = Term("cell",test)
-      print "working %s"%test.toString()
+      print ("working %s"%test.toString())
       test = Term("cell", Term("icon", "22x22/apps/" + "iconName"))
-      print "not working %s"%test.toString()
+      print ("not working %s"%test.toString())
 
 
       for iconName in ycpbuiltins.foreach(iconList):
@@ -76,7 +76,8 @@
     # Read a directory with icons.
     #
 def readIconDir(dir):
-      iconList = list(SCR.Read(Path(".target.dir"), dir))
+      iconList = SCR.Read(Path(".target.dir"), dir)
+      iconList = list(iconList) if iconList else []
       ycpbuiltins.y2debug("Dir %1: %2  entries", dir, 
ycpbuiltins.size(iconList))
 #      #TODO #FIXME add ycbbuiltins.filter()
 #      #TODO #FIXME add ycbbuiltins.sort()
@@ -90,7 +91,7 @@
       
       
       filtered.sort()
-      print "returning %d items"%len(filtered)
+      print ("returning %d items"%len(filtered))
       return copy.deepcopy(filtered)
 
 TableIconsClient().main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/Table1_utf8.py 
new/yast2-python-bindings-4.5.2/examples/Table1_utf8.py
--- old/yast2-python-bindings-4.5.1/examples/Table1_utf8.py     2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/Table1_utf8.py     2023-02-23 
16:46:07.000000000 +0100
@@ -7,28 +7,28 @@
     def main(self):
       UI.OpenDialog(
         VBox(
-          Label("\u00D6\u00DFemsflk\u00C4\u00C4"),
+          Label(u"\u00D6\u00DFemsflk\u00C4\u00C4"),
           MinSize(
             25,
             7,
             Table(
               Header(
-                "\u00C4nerhe\u00DF",
-                "\u00C4\u00DF\u00F6\u00F6\u00E4\u00E4\u00E4\u00E4\u00E4"
+                u"\u00C4nerhe\u00DF",
+                u"\u00C4\u00DF\u00F6\u00F6\u00E4\u00E4\u00E4\u00E4\u00E4"
               ),
               [
                 Item(
                   Id('1'),
-                  "\u011B\u0161\u010D\u0159\u017E\u00FD\u00E1\u00ED\u02C7",
+                  u"\u011B\u0161\u010D\u0159\u017E\u00FD\u00E1\u00ED\u02C7",
                   6
                 ),
-                Item(Id(2), "\u011B\u0161\u0159\u017E", None),
-                Item(Id(3), "\u00C4nder\u00DF\u00DF\u00DF", 8),
-                Item(Id(4), "\u5B8C\u6642", 12),
+                Item(Id(2), u"\u011B\u0161\u0159\u017E", None),
+                Item(Id(3), u"\u00C4nder\u00DF\u00DF\u00DF", 8),
+                Item(Id(4), u"\u5B8C\u6642", 12),
                 Item(Id(5), "Zoo", 25),
-                Item(Id(6), "\u017D\u010D\u0159", 6),
-                Item(Id(7), "\u00E1\u0161\u0159", 8),
-                Item(Id(8), "\u00C1lklsd", 7),
+                Item(Id(6), u"\u017D\u010D\u0159", 6),
+                Item(Id(7), u"\u00E1\u0161\u0159", 8),
+                Item(Id(8), u"\u00C1lklsd", 7),
                 Item(Id(9), "Alphaphet", 15),
                 Item(Id(10), "an", 1)
               ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/Tree-Checkbox.py 
new/yast2-python-bindings-4.5.2/examples/Tree-Checkbox.py
--- old/yast2-python-bindings-4.5.1/examples/Tree-Checkbox.py   2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/Tree-Checkbox.py   2023-02-23 
16:46:07.000000000 +0100
@@ -7,42 +7,44 @@
 class TreeCheckboxClient:
     def main(self):
       UI.OpenDialog(
-        VBox(
-          Heading("YaST2 Mini Control Center"),
-          Tree(
-            Id("mod"),
-            Opt("multiSelection"),
-            "Modules",
-            [
-              Item(
-                Id("country"),
-                Term("icon", "yast-yast-language.png"),
-                "Localization",
-                True,
-                [
-                  Item(
-                    Id("keyboard"),
-                    Term("icon", "yast-keyboard.png"),
-                    "Keyboard"
-                  ),
-                  Item(
-                    Id("timezone"),
-                    Term("icon", "yast-timezone.png"),
-                    "Time zone"
-                  )
-                ]
-              ),
-              Item(Id("mouse"), Term("icon", "yast-mouse.png"), "Mouse"),
-              Item(Id("lan"), Term("icon", "yast-lan.png"), "Network"),
-              Item(Id("xmas"), Term("icon", "yast-software.png"), "Merry 
X-Mas"),
-              Item(
-                Id("newyear"),
-                Term("icon", "yast-software.png"),
-                "Happy New Year"
-              )
-            ]
-          ),
-          PushButton(Id("ok"), Opt("default"), "&OK")
+        MinSize( 40, 15,
+          VBox(
+            Heading("YaST2 Mini Control Center"),
+            Tree(
+              Id("mod"),
+              Opt("multiSelection"),
+              "Modules",
+              [
+                Item(
+                  Id("country"),
+                  Term("icon", "yast-yast-language.png"),
+                  "Localization",
+                  True,
+                  [
+                    Item(
+                      Id("keyboard"),
+                      Term("icon", "yast-keyboard.png"),
+                      "Keyboard"
+                    ),
+                    Item(
+                      Id("timezone"),
+                      Term("icon", "yast-timezone.png"),
+                      "Time zone"
+                    )
+                  ]
+                ),
+                Item(Id("mouse"), Term("icon", "yast-mouse.png"), "Mouse"),
+                Item(Id("lan"), Term("icon", "yast-lan.png"), "Network"),
+                Item(Id("xmas"), Term("icon", "yast-software.png"), "Merry 
X-Mas"),
+                Item(
+                  Id("newyear"),
+                  Term("icon", "yast-software.png"),
+                  "Happy New Year"
+                )
+              ]
+            ),
+            PushButton(Id("ok"), Opt("default"), "&OK")
+          )
         )
       )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/Tree-Checkbox2.py 
new/yast2-python-bindings-4.5.2/examples/Tree-Checkbox2.py
--- old/yast2-python-bindings-4.5.1/examples/Tree-Checkbox2.py  2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/Tree-Checkbox2.py  2023-02-23 
16:46:07.000000000 +0100
@@ -7,44 +7,46 @@
 class TreeCheckbox2Client:
     def main(self):
       UI.OpenDialog(
-        VBox(
-          Heading("YaST2 Mini Control Center"),
-          Tree(
-            Id("mod"),
-            Opt("notify", "multiSelection", "immediate"),
-            "Modules",
-            [
-              Item(
-                Id("country"),
-                Term("icon", "yast-yast-language.png"),
-                "Localization",
-                False,
-                [
-                  Item(
-                    Id("keyboard"),
-                    Term("icon", "yast-keyboard.png"),
-                    "Keyboard"
-                  ),
-                  Item(
-                    Id("timezone"),
-                    Term("icon", "yast-timezone.png"),
-                    "Time zone"
-                  )
-                ]
-              ),
-              Item(Id("mouse"), Term("icon", "yast-mouse.png"), "Mouse"),
-              Item(Id("lan"), Term("icon", "yast-lan.png"), "Network"),
-              Item(Id("xmas"), Term("icon", "yast-software.png"), "Merry 
X-Mas"),
-              Item(
-                Id("newyear"),
-                Term("icon", "yast-software.png"),
-                "Happy New Year"
-              )
-            ]
-          ),
-          HBox(
-            PushButton(Id("ok"), Opt("default"), "&OK"),
-            PushButton(Id("deselect"), "&Log selected")
+        MinSize( 40, 15,
+          VBox(
+            Heading("YaST2 Mini Control Center"),
+            Tree(
+              Id("mod"),
+              Opt("notify", "multiSelection", "immediate"),
+              "Modules",
+              [
+                Item(
+                  Id("country"),
+                  Term("icon", "yast-yast-language.png"),
+                  "Localization",
+                  False,
+                  [
+                    Item(
+                      Id("keyboard"),
+                      Term("icon", "yast-keyboard.png"),
+                      "Keyboard"
+                    ),
+                    Item(
+                      Id("timezone"),
+                      Term("icon", "yast-timezone.png"),
+                      "Time zone"
+                    )
+                  ]
+                ),
+                Item(Id("mouse"), Term("icon", "yast-mouse.png"), "Mouse"),
+                Item(Id("lan"), Term("icon", "yast-lan.png"), "Network"),
+                Item(Id("xmas"), Term("icon", "yast-software.png"), "Merry 
X-Mas"),
+                Item(
+                  Id("newyear"),
+                  Term("icon", "yast-software.png"),
+                  "Happy New Year"
+                )
+              ]
+            ),
+            HBox(
+              PushButton(Id("ok"), Opt("default"), "&OK"),
+              PushButton(Id("deselect"), "&Log selected")
+            )
           )
         )
       )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/Tree-Checkbox4.py 
new/yast2-python-bindings-4.5.2/examples/Tree-Checkbox4.py
--- old/yast2-python-bindings-4.5.1/examples/Tree-Checkbox4.py  2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/Tree-Checkbox4.py  2023-02-23 
16:46:07.000000000 +0100
@@ -12,35 +12,37 @@
 
 
       UI.OpenDialog(
-        VBox(
-          Heading("YaST2 Mini Control Center"),
-          Tree(
-            Id("mod"),
-            Opt("multiSelection", "notify", "immediate", "recursiveSelection"),
-            "Modules",
-            [
-              Item(Id("unselected"), "Unseleted"),
-              Item(
-                Id("country"),
-                "Localization",
-                True,
-                [
-                  Item(Id("keyboard"), "Keyboard"),
-                  Item(
-                    Id("timezone"),
-                    "Time zone",
-                    True,
-                    [Item(Id("europe"), "Europe"), Item(Id("asia"), "Asia")]
-                  )
-                ]
-              ),
-              Item(Id("mouse"), "Mouse"),
-              Item(Id("lan"), "Network"),
-              Item(Id("xmas"), "Merry X-Mas"),
-              Item(Id("newyear"), "Happy New Year")
-            ]
-          ),
-          PushButton(Id("ok"), Opt("default"), "&OK")
+        MinSize( 40, 15,
+          VBox(
+            Heading("YaST2 Mini Control Center"),
+            Tree(
+              Id("mod"),
+              Opt("multiSelection", "notify", "immediate", 
"recursiveSelection"),
+              "Modules",
+              [
+                Item(Id("unselected"), "Unseleted"),
+                Item(
+                  Id("country"),
+                  "Localization",
+                  True,
+                  [
+                    Item(Id("keyboard"), "Keyboard"),
+                    Item(
+                      Id("timezone"),
+                      "Time zone",
+                      True,
+                      [Item(Id("europe"), "Europe"), Item(Id("asia"), "Asia")]
+                    )
+                  ]
+                ),
+                Item(Id("mouse"), "Mouse"),
+                Item(Id("lan"), "Network"),
+                Item(Id("xmas"), "Merry X-Mas"),
+                Item(Id("newyear"), "Happy New Year")
+              ]
+            ),
+            PushButton(Id("ok"), Opt("default"), "&OK")
+          )
         )
       )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/examples/Tree-recursive-large.py 
new/yast2-python-bindings-4.5.2/examples/Tree-recursive-large.py
--- old/yast2-python-bindings-4.5.1/examples/Tree-recursive-large.py    
2022-07-15 15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/Tree-recursive-large.py    
2023-02-23 16:46:07.000000000 +0100
@@ -50086,7 +50086,7 @@
         current = UI.QueryWidget(Id("mod"), "CurrentItem")
         ycpbuiltins.y2milestone("Current item: %1", current)
         if id == "ok":
-         break
+          break
       UI.CloseDialog()
 
 TreeRecursiveLargeClient().main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/WidgetExists.py 
new/yast2-python-bindings-4.5.2/examples/WidgetExists.py
--- old/yast2-python-bindings-4.5.1/examples/WidgetExists.py    2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/WidgetExists.py    2023-02-23 
16:46:07.000000000 +0100
@@ -59,7 +59,7 @@
         summary = summary + "\nBottom button exists" 
       else:
         summary = summary + "\nNo bottom button"
-      print "returning \n%s"%summary
+      print ("returning \n%s"%summary)
       return summary
 
     # Remove button with given id and update summary.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/examples/Wizard3.py 
new/yast2-python-bindings-4.5.2/examples/Wizard3.py
--- old/yast2-python-bindings-4.5.1/examples/Wizard3.py 2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/examples/Wizard3.py 2023-02-23 
16:46:07.000000000 +0100
@@ -34,7 +34,6 @@
       ]
 
       self.steps = ycpbuiltins.flatten([base_installation_steps, config_steps])
-
       if not UI.HasSpecialWidget("Wizard"):
         ycpbuiltins.y2error(
           "This works only with UIs that provide the wizard widget!"
@@ -78,9 +77,10 @@
         UI.WizardCommand(
           Term(
             "AddStep",
-            step["label"]),
-            step["id"])
-
+            step["label"],
+            step["id"]
+          )
+        )
       UI.WizardCommand(Term("AddStepHeading", "Configuration"))
 
       for step in ycpbuiltins.foreach(config_steps):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/package/yast2-python-bindings.changes 
new/yast2-python-bindings-4.5.2/package/yast2-python-bindings.changes
--- old/yast2-python-bindings-4.5.1/package/yast2-python-bindings.changes       
2022-07-15 15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/package/yast2-python-bindings.changes       
2023-02-23 16:46:07.000000000 +0100
@@ -1,4 +1,14 @@
 -------------------------------------------------------------------
+Wed Feb  8 15:57:19 UTC 2023 - Noel Power <[email protected]>
+
+- Misc fixes to examples; (bsc#1199343).
+- Fix python2 utf8 handling (python2 code wasn't displaying unicode
+  strings); (bsc#1199348).
+- Change conversion of Py_None to YCP_Void instead of YCP_Null;
+  (bsc#1199344).
+- 4.5.2
+
+-------------------------------------------------------------------
 Wed Jun 22 12:44:19 UTC 2022 - Noel Power <[email protected]>
 
 - Fix core with python3.10 when calling yast2 samba-client;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-python-bindings-4.5.1/package/yast2-python-bindings.spec 
new/yast2-python-bindings-4.5.2/package/yast2-python-bindings.spec
--- old/yast2-python-bindings-4.5.1/package/yast2-python-bindings.spec  
2022-07-15 15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/package/yast2-python-bindings.spec  
2023-02-23 16:46:07.000000000 +0100
@@ -23,7 +23,7 @@
 %bcond_with python2
 %endif
 Name:           yast2-python-bindings
-Version:        4.5.1
+Version:        4.5.2
 Release:        0
 Summary:        Python bindings for the YaST platform
 License:        GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-python-bindings-4.5.1/src/ytypes.i 
new/yast2-python-bindings-4.5.2/src/ytypes.i
--- old/yast2-python-bindings-4.5.1/src/ytypes.i        2022-07-15 
15:48:38.000000000 +0200
+++ new/yast2-python-bindings-4.5.2/src/ytypes.i        2023-02-23 
16:46:07.000000000 +0100
@@ -5,7 +5,7 @@
     void *arg = 0;
 
     if (input == Py_None)
-        return YCPNull();
+        return YCPVoid();
     if (PyBool_Check(input)) {
 #if PY_MAJOR_VERSION >= 3
         if (PyObject_RichCompareBool(input, Py_True, Py_EQ) == 1)
@@ -26,7 +26,7 @@
 #if PY_MAJOR_VERSION >= 3
         return YCPString(_PyUnicode_AsString(input));
 #else
-        PyObject* encoded = PyUnicode_Encode(PyUnicode_AsUnicode(input), 
PyUnicode_GetSize(input), "ascii", NULL);
+        PyObject* encoded = PyUnicode_AsEncodedString(input, "utf8", NULL);
         return YCPString(PyBytes_AsString(encoded));
 #endif
     }

Reply via email to