Bug 1222942

Summary: gtg-0.6-bp155.1.7.noarch fails with default python3.6
Product: [openSUSE] openSUSE Distribution Reporter: Joe Nyilas <jnyilas>
Component: GNOMEAssignee: E-mail List <gnome-bugs>
Status: NEW --- QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P3 - Medium CC: jnyilas
Version: Leap 15.5   
Target Milestone: Leap 15.5   
Hardware: x86-64   
OS: openSUSE Leap 15.5   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Joe Nyilas 2024-04-17 03:05:00 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Build Identifier: 

This needs to be repackaged to use python 3.10 or newer.

The assignment operator ':=' was first introduced in python 3.8

executing /usr/bin/gtg fails each time with syntax error:
 > gtg
Traceback (most recent call last):
  File "/usr/bin/gtg", line 86, in <module>
    from GTG.gtk.application import Application
  File "/usr/lib/python3.6/site-packages/GTG/gtk/application.py", line 42, in <module>
    from GTG.gtk.browser.tag_editor import TagEditor
  File "/usr/lib/python3.6/site-packages/GTG/gtk/browser/tag_editor.py", line 184
    if color := tag.get_attribute('color'):
              ^
SyntaxError: invalid syntax

> ls -al /usr/bin/python3
lrwxrwxrwx 1 root root 9 Apr  9 05:42 /usr/bin/python3 -> python3.6
ls -al /etc/alternatives/python
lrwxrwxrwx 1 root root 16 Jul 12  2023 /etc/alternatives/python -> /usr/bin/python3




Reproducible: Always

Steps to Reproduce:
1.Prep: Use default OpenSUSE python3 -> python3.6
2.zypper in gtg
3.gtg
Actual Results:  
Traceback (most recent call last):
  File "/usr/bin/gtg", line 86, in <module>
    from GTG.gtk.application import Application
  File "/usr/lib/python3.6/site-packages/GTG/gtk/application.py", line 42, in <module>
    from GTG.gtk.browser.tag_editor import TagEditor
  File "/usr/lib/python3.6/site-packages/GTG/gtk/browser/tag_editor.py", line 184
    if color := tag.get_attribute('color'):
              ^
SyntaxError: invalid syntax

exit 1

Expected Results:  
It should not have failed in started the application

This is a python compatibility problem. GTG is using assignment within an expression.

The syntax was first made available with python 3.8. However, the default python3 version for openSUSE Leap 15.5 is 3.6.

Both 3.10 and 3.11 are available alternate versions, but the dependent libraries to support gtg will also need to be updated to the new python version.
e.g.,
python3-liblarch-3.0-bp155.2.13.noarch
python3-liblarch-gtk-3.0-bp155.2.13.noarch