Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package pybugz for openSUSE:Factory checked 
in at 2026-10-05 16:18:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pybugz (Old)
 and      /work/SRC/openSUSE:Factory/.pybugz.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pybugz"

Mon Oct  5 16:18:27 2026 rev:7 rq:1382535 version:0.15

Changes:
--------
--- /work/SRC/openSUSE:Factory/pybugz/pybugz.changes    2025-06-06 
22:44:35.760631100 +0200
+++ /work/SRC/openSUSE:Factory/.pybugz.new.3698736/pybugz.changes       
2026-10-05 16:18:58.704155592 +0200
@@ -1,0 +2,18 @@
+Mon Oct  5 06:44:36 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to 0.15:
+  * Add bugz search -k/--keywords to restrict by keywords, all of
+    which must match
+  * bugz --columns 0 now prints untruncated lines instead of empty
+    ones
+  * Close file handles with "with", so descriptors are released
+    when a read or write fails
+- Add pybugz-version.patch, as the 0.15 tag left __version__ at
+  0.14 and flit takes the wheel version from it.
+- Switch from update-alternatives to libalternatives; man bugz now
+  resolves through alts instead of a packaged symlink.
+- Add a %check that imports the installed bugz module and asserts
+  its version.
+- Drop obsolete Group tags.
+
+-------------------------------------------------------------------

Old:
----
  pybugz-0.14.tar.gz

New:
----
  pybugz-0.15.tar.gz
  pybugz-version.patch

----------(New B)----------
  New:    when a read or write fails
- Add pybugz-version.patch, as the 0.15 tag left __version__ at
  0.14 and flit takes the wheel version from it.
----------(New E)----------

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

Other differences:
------------------
++++++ pybugz.spec ++++++
--- /var/tmp/diff_new_pack.2SvX7K/_old  2026-10-05 16:19:00.193217767 +0200
+++ /var/tmp/diff_new_pack.2SvX7K/_new  2026-10-05 16:19:00.198217976 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package pybugz
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,19 +16,23 @@
 #
 
 
+%bcond_without libalternatives
 Name:           pybugz
-Version:        0.14
+Version:        0.15
 Release:        0
 Summary:        Python Bugzilla Interface
 License:        GPL-2.0-only
-Group:          Productivity/Networking/Web/Utilities
 URL:            http://www.liquidx.net/pybugz
 Source0:        
https://github.com/williamh/pybugz/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+# PATCH-FIX-OPENSUSE pybugz-version.patch [email protected] -- the 0.15 tag
+# never bumped __version__, which flit takes from as the dynamic version
+Patch0:         pybugz-version.patch
 BuildRequires:  %{python_module flit-core}
 BuildRequires:  %{python_module pip}
+BuildRequires:  alts
 BuildRequires:  fdupes
-Requires(post): update-alternatives
-Requires(postun): update-alternatives
+BuildRequires:  python-rpm-macros
+Requires:       alts
 BuildArch:      noarch
 %if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3"
 Provides:       pybugz = %{version}
@@ -47,7 +51,6 @@
 
 %package -n %{name}-common
 Summary:        Common files for %{name}
-Group:          Development/Languages/Python
 Supplements:    python2-%{name}
 Supplements:    python3-%{name}
 
@@ -63,7 +66,7 @@
 This package contains common files for %{name}.
 
 %prep
-%setup -q
+%autosetup -p1
 
 %build
 %pyproject_wheel
@@ -72,15 +75,22 @@
 %pyproject_install
 %python_clone -a %{buildroot}%{_bindir}/bugz
 %python_clone -a %{buildroot}%{_mandir}/man1/bugz.1
+# binary and man page both land in libalternatives/bugz/, so they switch
+# together through that config's man= key and need no group=
 %fdupes %{buildroot}
 
 install -d -m 0755  %{buildroot}%{_sysconfdir}/pybugz.d
 
-%post
-%{python_install_alternative bugz bugz.1}
+%check
+# upstream ships no test suite; bugz.cli pulls in every module, and the
+# version is what the wheel got its name from.  -P keeps the cwd source
+# tree off sys.path, so this imports the installed module.
+%{python_expand #
+PYTHONPATH=%{buildroot}%{$python_sitelib} $python -B -P -c "import bugz.cli; 
assert bugz.__version__ == '%{version}', bugz.__version__"
+}
 
-%postun
-%{python_uninstall_alternative bugz bugz.1}
+%pre
+%python_libalternatives_reset_alternative bugz
 
 %files %{python_files}
 %license LICENSE

++++++ pybugz-0.14.tar.gz -> pybugz-0.15.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pybugz-0.14/bugz/cli.py new/pybugz-0.15/bugz/cli.py
--- old/pybugz-0.14/bugz/cli.py 2024-03-01 17:33:35.000000000 +0100
+++ new/pybugz-0.15/bugz/cli.py 2026-09-25 18:47:56.000000000 +0200
@@ -94,7 +94,7 @@
             line = '%s %-12s' % (line, severity)
         line = '%s %-20s' % (line, assignee)
         line = '%s %s' % (line, desc)
-        print(line[:settings.columns])
+        print(line[:settings.columns] if settings.columns else line)
 
     log_info("%i bug(s) found." % len(buglist))
 
@@ -122,10 +122,7 @@
 
     if not hasattr(settings, 'version'):
         line = input('Enter version (default: unspecified): ')
-        if len(line):
-            settings.version = line
-        else:
-            settings.version = 'unspecified'
+        settings.version = line or 'unspecified'
     else:
         log_info('Enter version: %s' % settings.version)
 
@@ -338,9 +335,8 @@
     params = {}
     params['ids'] = [bugid]
 
-    fd = open(filename, 'rb')
-    params['data'] = xmlrpc.client.Binary(fd.read())
-    fd.close()
+    with open(filename, 'rb') as fd:
+        params['data'] = xmlrpc.client.Binary(fd.read())
 
     params['file_name'] = os.path.basename(filename)
     params['summary'] = summary
@@ -380,9 +376,8 @@
         if os.path.exists(result['file_name']):
             raise RuntimeError('Filename already exists')
 
-        fd = open(safe_filename, 'wb')
-        fd.write(result['data'].data)
-        fd.close()
+        with open(safe_filename, 'wb') as fd:
+            fd.write(result['data'].data)
 
 
 def get(settings):
@@ -404,7 +399,8 @@
             if settings.comment_from == '-':
                 settings.comment = sys.stdin.read()
             else:
-                settings.comment = open(settings.comment_from, 'r').read()
+                with open(settings.comment_from, 'r') as fd:
+                    settings.comment = fd.read()
         except IOError as error:
             raise BugzError('unable to read file: %s: %s' %
                             (settings.comment_from, error))
@@ -539,8 +535,8 @@
             if settings.description_from == '-':
                 settings.description = sys.stdin.read()
             else:
-                settings.description = \
-                    open(settings.description_from, 'r').read()
+                with open(settings.description_from, 'r') as fd:
+                    settings.description = fd.read()
         except IOError as error:
             raise BugzError('Unable to read from file: %s: %s' %
                             (settings.description_from, error))
@@ -640,7 +636,7 @@
 the keywords given on the title (or the body if specified).
     """
     valid_keys = ['alias', 'assigned_to', 'component', 'creator',
-                  'limit', 'offset', 'op_sys', 'platform',
+                  'keywords', 'limit', 'offset', 'op_sys', 'platform',
                   'priority', 'product', 'resolution', 'severity',
                   'version', 'whiteboard', 'cc']
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pybugz-0.14/bugz/cli_argparser.py 
new/pybugz-0.15/bugz/cli_argparser.py
--- old/pybugz-0.14/bugz/cli_argparser.py       2024-03-01 17:33:35.000000000 
+0100
+++ new/pybugz-0.15/bugz/cli_argparser.py       2026-09-25 18:47:56.000000000 
+0200
@@ -287,6 +287,10 @@
                                help='restrict by component (1 or more)')
     search_parser.add_argument('-r', '--creator',
                                help='email of the person who created the bug')
+    search_parser.add_argument('-k', '--keywords',
+                               action='append',
+                               help='restrict by keywords '
+                               '(one or more, all must match)')
     search_parser.add_argument('-l', '--limit',
                                type=int,
                                help='Limit the number of records '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pybugz-0.14/bugz/settings.py 
new/pybugz-0.15/bugz/settings.py
--- old/pybugz-0.14/bugz/settings.py    2024-03-01 17:33:35.000000000 +0100
+++ new/pybugz-0.15/bugz/settings.py    2026-09-25 18:47:56.000000000 +0200
@@ -126,10 +126,7 @@
         if getattr(self, 'encoding', None) is not None:
             log_info('The encoding option is deprecated.')
 
-        if self.insecure:
-            context=ssl._create_unverified_context()
-        else:
-            context = None
+        context=ssl._create_unverified_context() if self.insecure else None
 
         self.bz = xmlrpc.client.ServerProxy(self.base, context=context)
         self.connections = config.sections()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pybugz-0.14/bugz/utils.py 
new/pybugz-0.15/bugz/utils.py
--- old/pybugz-0.14/bugz/utils.py       2024-03-01 17:33:35.000000000 +0100
+++ new/pybugz-0.15/bugz/utils.py       2026-09-25 18:47:56.000000000 +0200
@@ -68,10 +68,9 @@
     @rtype: string
     """
     (fd, name) = tempfile.mkstemp("bugz")
-    f = os.fdopen(fd, "w")
-    f.write(comment_from)
-    f.write(initial_text)
-    f.close()
+    with os.fdopen(fd, "w") as f:
+        f.write(comment_from)
+        f.write(initial_text)
 
     editor = (os.environ.get("BUGZ_EDITOR") or os.environ.get("EDITOR"))
     if editor:
@@ -79,7 +78,8 @@
         if result != 0:
             raise RuntimeError('Unable to launch editor: %s' % editor)
 
-        new_text = open(name).read()
+        with open(name) as f:
+            new_text = f.read()
         new_text = re.sub('(?m)^%s.*\n' % comment_prefix, '', new_text)
         os.unlink(name)
         return new_text
@@ -100,7 +100,4 @@
     new_text = launch_editor(BUGZ_COMMENT_TEMPLATE % initial_text,
                              comment_from)
 
-    if new_text.strip():
-        return new_text
-    else:
-        return ''
+    return new_text if new_text.strip() else ''

++++++ pybugz-version.patch ++++++
Fix the version string, which upstream left at 0.14 in the 0.15 tag.

pyproject.toml declares the version as dynamic, so flit takes it from
bugz.__version__.  Without this the 0.15 tree builds a pybugz-0.14 wheel
and the dist-info directory does not match the package version.

Upstream tags the releases by hand; this should be reported there so the
next bump needs no patch.

---
pybugz-0.15/bugz/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: pybugz-0.15/bugz/__init__.py
===================================================================
--- pybugz-0.15.orig/bugz/__init__.py
+++ pybugz-0.15/bugz/__init__.py
@@ -1,3 +1,3 @@
-__version__ = '0.14'
+__version__ = '0.15'
 __license__ = """Copyright (c) 2006, Alastair Tse, All rights reserved.
 This following source code is licensed under the GPL v2 License."""

Reply via email to