Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package osc for openSUSE:Factory checked in 
at 2023-11-07 21:27:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/osc (Old)
 and      /work/SRC/openSUSE:Factory/.osc.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "osc"

Tue Nov  7 21:27:31 2023 rev:187 rq:1123909 version:1.4.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/osc/osc.changes  2023-10-30 22:10:58.568638951 
+0100
+++ /work/SRC/openSUSE:Factory/.osc.new.17445/osc.changes       2023-11-07 
21:28:21.611936267 +0100
@@ -1,0 +2,10 @@
+Thu Nov  2 14:51:36 UTC 2023 - Daniel Mach <[email protected]>
+
+- 1.4.4
+  - Command-line:
+    - Fix autocompletion for new locations
+  - Configuration:
+    - Fix apiurl_aliases handling in OscOptions.__getitem__
+    - Fix crash when there's no [general]/apiurl option in the config file
+
+-------------------------------------------------------------------

Old:
----
  osc-1.4.3.tar.gz

New:
----
  osc-1.4.4.tar.gz

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

Other differences:
------------------
++++++ osc.spec ++++++
--- /var/tmp/diff_new_pack.mL4wjd/_old  2023-11-07 21:28:24.316035843 +0100
+++ /var/tmp/diff_new_pack.mL4wjd/_new  2023-11-07 21:28:24.328036284 +0100
@@ -56,7 +56,7 @@
 %endif
 
 Name:           osc
-Version:        1.4.3
+Version:        1.4.4
 Release:        0
 Summary:        Command-line client for the Open Build Service
 License:        GPL-2.0-or-later

++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.mL4wjd/_old  2023-11-07 21:28:24.456040998 +0100
+++ /var/tmp/diff_new_pack.mL4wjd/_new  2023-11-07 21:28:24.468041440 +0100
@@ -1,5 +1,5 @@
 pkgname=osc
-pkgver=1.4.3
+pkgver=1.4.4
 pkgrel=0
 pkgdesc="Command-line client for the Open Build Service"
 arch=('x86_64')

++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.mL4wjd/_old  2023-11-07 21:28:24.520043355 +0100
+++ /var/tmp/diff_new_pack.mL4wjd/_new  2023-11-07 21:28:24.524043502 +0100
@@ -1,4 +1,4 @@
-osc (1.4.3-0) unstable; urgency=low
+osc (1.4.4-0) unstable; urgency=low
 
   * Placeholder
 

++++++ osc-1.4.3.tar.gz -> osc-1.4.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-1.4.3/NEWS new/osc-1.4.4/NEWS
--- old/osc-1.4.3/NEWS  2023-10-19 15:02:47.000000000 +0200
+++ new/osc-1.4.4/NEWS  2023-11-02 15:50:33.000000000 +0100
@@ -1,3 +1,12 @@
+- 1.4.4
+  - Command-line:
+    - Fix autocompletion for new locations
+  - Configuration:
+    - Fix apiurl_aliases handling in OscOptions.__getitem__
+    - Fix crash when there's no [general]/apiurl option in the config file
+  - Spec:
+    - Install bash completion with .bash suffix rather than .sh
+
 - 1.4.3
   - Configuration:
     - Allow undefined fields in Options and HostOptions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-1.4.3/contrib/complete.sh 
new/osc-1.4.4/contrib/complete.sh
--- old/osc-1.4.3/contrib/complete.sh   2023-10-19 15:02:47.000000000 +0200
+++ new/osc-1.4.4/contrib/complete.sh   2023-11-02 15:50:33.000000000 +0100
@@ -1,6 +1,6 @@
 test -z "$BASH_VERSION" && return
 complete -o default _nullcommand >/dev/null 2>&1 || return
 complete -r _nullcommand >/dev/null 2>&1         || return
-test -s /usr/share/osc/complete && complete -o default -C 
/usr/share/osc/complete osc
-test -s /usr/lib64/osc/complete && complete -o default -C 
/usr/lib64/osc/complete osc
+test -s /usr/share/osc/complete && complete -o default -C 
/usr/share/osc/complete osc && return
+test -s /usr/lib64/osc/complete && complete -o default -C 
/usr/lib64/osc/complete osc && return
 test -s /usr/lib/osc/complete   && complete -o default -C 
/usr/lib/osc/complete osc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-1.4.3/osc/__init__.py 
new/osc-1.4.4/osc/__init__.py
--- old/osc-1.4.3/osc/__init__.py       2023-10-19 15:02:47.000000000 +0200
+++ new/osc-1.4.4/osc/__init__.py       2023-11-02 15:50:33.000000000 +0100
@@ -13,7 +13,7 @@
 
 
 from .util import git_version
-__version__ = git_version.get_version('1.4.3')
+__version__ = git_version.get_version('1.4.4')
 
 
 # vim: sw=4 et
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-1.4.3/osc/commandline.py 
new/osc-1.4.4/osc/commandline.py
--- old/osc-1.4.3/osc/commandline.py    2023-10-19 15:02:47.000000000 +0200
+++ new/osc-1.4.4/osc/commandline.py    2023-11-02 15:50:33.000000000 +0100
@@ -3870,7 +3870,7 @@
 
         src_apiurl = conf.config['apiurl']
         if opts.to_apiurl:
-            tgt_apiurl = conf.config['apiurl_aliases'].get(opts.to_apiurl, 
opts.to_apiurl)
+            tgt_apiurl = conf.config.apiurl_aliases.get(opts.to_apiurl, 
opts.to_apiurl)
         else:
             tgt_apiurl = src_apiurl
 
@@ -4280,7 +4280,7 @@
             return
 
         apiopt = ''
-        if conf.get_configParser().get('general', 'apiurl') != apiurl:
+        if conf.get_configParser().get("general", "apiurl", fallback=None) != 
apiurl:
             apiopt = '-A %s ' % apiurl
         print('A working copy of the maintenance branch can be checked out 
with:\n\n'
               'osc %sco %s'
@@ -4451,7 +4451,7 @@
             _private.print_msg('Note: You can use "osc delete" or "osc 
submitpac" when done.\n', print_to="verbose")
         else:
             apiopt = ''
-            if conf.get_configParser().get('general', 'apiurl') != apiurl:
+            if conf.get_configParser().get("general", "apiurl", fallback=None) 
!= apiurl:
                 apiopt = '-A %s ' % apiurl
             print('A working copy of the branched package can be checked out 
with:\n\n'
                   'osc %sco %s/%s'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-1.4.3/osc/conf.py new/osc-1.4.4/osc/conf.py
--- old/osc-1.4.3/osc/conf.py   2023-10-19 15:02:47.000000000 +0200
+++ new/osc-1.4.4/osc/conf.py   2023-11-02 15:50:33.000000000 +0100
@@ -144,9 +144,10 @@
     def __getitem__(self, name):
         field_name = self._get_field_name(name)
 
-        if field_name is None:
+        if field_name is None and not hasattr(self, name):
             return self.extra_fields[name]
 
+        field_name = field_name or name
         try:
             return getattr(self, field_name)
         except AttributeError:
@@ -156,10 +157,11 @@
     def __setitem__(self, name, value):
         field_name = self._get_field_name(name)
 
-        if field_name is None:
+        if field_name is None and not hasattr(self, name):
             self.extra_fields[name] = value
             return
 
+        field_name = field_name or name
         setattr(self, field_name, value)
 
     # compat function with the config dict
@@ -1617,7 +1619,7 @@
     cp = get_configParser(config['conffile'])
 
     if section != 'general':
-        section = config['apiurl_aliases'].get(section, section)
+        section = config.apiurl_aliases.get(section, section)
         scheme, host, path = \
             parse_apisrv_url(config.get('scheme', 'https'), section)
         section = urljoin(scheme, host, path)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-1.4.3/osc/util/git_version.py 
new/osc-1.4.4/osc/util/git_version.py
--- old/osc-1.4.3/osc/util/git_version.py       2023-10-19 15:02:47.000000000 
+0200
+++ new/osc-1.4.4/osc/util/git_version.py       2023-11-02 15:50:33.000000000 
+0100
@@ -9,7 +9,7 @@
     """
     # the `version` variable contents get substituted during `git archive`
     # it requires adding this to .gitattributes: <path to this file> 
export-subst
-    version = "1.4.3"
+    version = "1.4.4"
     if version.startswith(("$", "%")):
         # "$": version hasn't been substituted during `git archive`
         # "%": "Format:" and "$" characters get removed from the version 
string (a GitHub bug?)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-1.4.3/tests/test_conf.py 
new/osc-1.4.4/tests/test_conf.py
--- old/osc-1.4.3/tests/test_conf.py    2023-10-19 15:02:47.000000000 +0200
+++ new/osc-1.4.4/tests/test_conf.py    2023-11-02 15:50:33.000000000 +0100
@@ -1,3 +1,4 @@
+import importlib
 import os
 import shutil
 import tempfile
@@ -104,6 +105,7 @@
 
 class TestExampleConfig(unittest.TestCase):
     def setUp(self):
+        importlib.reload(osc.conf)
         self.tmpdir = tempfile.mkdtemp(prefix="osc_test_")
         self.oscrc = os.path.join(self.tmpdir, "oscrc")
         with open(self.oscrc, "w", encoding="utf-8") as f:
@@ -407,6 +409,13 @@
         self.assertEqual(self.config["plugin-option"], "plugin-general-option")
         self.assertEqual(self.config.extra_fields, {"plugin-option": 
"plugin-general-option"})
 
+        # write to an existing attribute instead of extra_fields
+        self.config.attrib = 123
+        self.assertEqual(self.config["attrib"], 123)
+        self.config["attrib"] = 456
+        self.assertEqual(self.config["attrib"], 456)
+        self.assertEqual(self.config.extra_fields, {"plugin-option": 
"plugin-general-option"})
+
         self.config["new-option"] = "value"
         self.assertEqual(self.config["new-option"], "value")
         self.assertEqual(self.config.extra_fields, {"plugin-option": 
"plugin-general-option", "new-option": "value"})
@@ -419,6 +428,11 @@
         self.assertEqual(host_options["new-option"], "value")
         self.assertEqual(host_options.extra_fields, {"plugin-option": 
"plugin-host-option", "new-option": "value"})
 
+    def test_apiurl_aliases(self):
+        expected = {"https://api.opensuse.org": "https://api.opensuse.org";, 
"osc": "https://api.opensuse.org"}
+        self.assertEqual(self.config.apiurl_aliases, expected)
+        self.assertEqual(self.config["apiurl_aliases"], expected)
+
 
 class TestFromParent(unittest.TestCase):
     def setUp(self):

++++++ osc.dsc ++++++
--- /var/tmp/diff_new_pack.mL4wjd/_old  2023-11-07 21:28:24.912057791 +0100
+++ /var/tmp/diff_new_pack.mL4wjd/_new  2023-11-07 21:28:24.928058379 +0100
@@ -1,6 +1,6 @@
 Format: 1.0
 Source: osc
-Version: 1.4.3-0
+Version: 1.4.4-0
 Binary: osc
 Maintainer: Adrian Schroeter <[email protected]>
 Architecture: any

Reply via email to