Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-python-gnupg for openSUSE:Leap:16.0 checked in at 2025-04-07 13:58:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:16.0/python-python-gnupg (Old) and /work/SRC/openSUSE:Leap:16.0/.python-python-gnupg.new.1907 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-gnupg" Mon Apr 7 13:58:32 2025 rev:2 rq:1267571 version:0.5.4 Changes: -------- --- /work/SRC/openSUSE:Leap:16.0/python-python-gnupg/python-python-gnupg.changes 2025-03-19 11:55:44.636424857 +0100 +++ /work/SRC/openSUSE:Leap:16.0/.python-python-gnupg.new.1907/python-python-gnupg.changes 2025-04-07 13:58:54.118335446 +0200 @@ -1,0 +2,12 @@ +Mon Feb 17 03:29:13 UTC 2025 - Steve Kowalik <steven.kowa...@suse.com> + +- Switch to pyproject macros. +- No more greedy globs in %files. + +------------------------------------------------------------------- +Thu Feb 13 10:37:11 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- Update to 0.5.4 + * Fix #242: Handle exceptions in the on_data callable. + +------------------------------------------------------------------- Old: ---- python-gnupg-0.5.3.tar.gz New: ---- python-gnupg-0.5.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-python-gnupg.spec ++++++ --- /var/tmp/diff_new_pack.9bO9JX/_old 2025-04-07 13:58:54.386346674 +0200 +++ /var/tmp/diff_new_pack.9bO9JX/_new 2025-04-07 13:58:54.390346841 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-python-gnupg # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,13 +18,13 @@ %{?sle15_python_module_pythons} Name: python-python-gnupg -Version: 0.5.3 +Version: 0.5.4 Release: 0 Summary: A wrapper for the GNU Privacy Guard (GPG or GnuPG) License: BSD-3-Clause -Group: Development/Languages/Python URL: https://pythonhosted.org/python-gnupg/index.html Source: https://files.pythonhosted.org/packages/source/p/python-gnupg/python-gnupg-%{version}.tar.gz +BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -42,13 +42,12 @@ %prep %setup -q -n python-gnupg-%{version} -echo "import setuptools; setuptools.setup()" > setup.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -58,5 +57,7 @@ %files %{python_files} %license LICENSE.txt %doc README.rst -%{python_sitelib}/* +%{python_sitelib}/gnupg.py +%pycache_only %{python_sitelib}/__pycache__/gnupg.*.pyc +%{python_sitelib}/python_gnupg-%{version}.dist-info ++++++ python-gnupg-0.5.3.tar.gz -> python-gnupg-0.5.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-gnupg-0.5.3/PKG-INFO new/python-gnupg-0.5.4/PKG-INFO --- old/python-gnupg-0.5.3/PKG-INFO 2024-09-20 18:40:43.000000000 +0200 +++ new/python-gnupg-0.5.4/PKG-INFO 2025-01-07 12:57:56.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: python-gnupg -Version: 0.5.3 +Version: 0.5.4 Summary: A wrapper for the Gnu Privacy Guard (GPG or GnuPG) Home-page: https://github.com/vsajip/python-gnupg Author: Vinay Sajip @@ -26,6 +26,8 @@ Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 Classifier: Operating System :: OS Independent Classifier: Topic :: Software Development :: Libraries :: Python Modules License-File: LICENSE.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-gnupg-0.5.3/README.rst new/python-gnupg-0.5.4/README.rst --- old/python-gnupg-0.5.3/README.rst 2024-09-20 18:19:42.000000000 +0200 +++ new/python-gnupg-0.5.4/README.rst 2024-10-25 15:49:15.000000000 +0200 @@ -77,6 +77,7 @@ Released: Not yet +* Fix #242: Handle exceptions in ``on_data`` callable. 0.5.3 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-gnupg-0.5.3/gnupg.py new/python-gnupg-0.5.4/gnupg.py --- old/python-gnupg-0.5.3/gnupg.py 2024-09-20 18:22:27.000000000 +0200 +++ new/python-gnupg-0.5.4/gnupg.py 2025-01-07 11:13:17.000000000 +0100 @@ -45,9 +45,9 @@ import sys import threading -__version__ = '0.5.3' +__version__ = '0.5.4' __author__ = 'Vinay Sajip' -__date__ = '$20-Sep-2024 17:22:27$' +__date__ = '$07-Jan-2025 10:13:17$' STARTUPINFO = None if os.name == 'nt': # pragma: no cover @@ -217,6 +217,8 @@ The base class for handling status messages from `gpg`. """ + on_data_failure = None # set at instance level when failures occur + def __init__(self, gpg): """ Initialize an instance. @@ -1249,17 +1251,27 @@ # Read the contents of the file from GPG's stdout assert buffer_size > 0 chunks = [] + on_data_failure = None while True: data = stream.read(buffer_size) if len(data) == 0: if on_data: - on_data(data) + try: + on_data(data) + except Exception as e: + if on_data_failure is None: + on_data_failure = e break if log_everything: logger.debug('chunk: %r' % data[:256]) append = True if on_data: - append = on_data(data) is not False + try: + on_data_result = on_data(data) + append = on_data_result is not False + except Exception as e: + if on_data_failure is None: + on_data_failure = e if append: chunks.append(data) if _py3k: @@ -1267,6 +1279,8 @@ result.data = type(data)().join(chunks) else: result.data = ''.join(chunks) + if on_data_failure: + result.on_data_failure = on_data_failure def _collect_output(self, process, result, writer=None, stdin=None): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-gnupg-0.5.3/python_gnupg.egg-info/PKG-INFO new/python-gnupg-0.5.4/python_gnupg.egg-info/PKG-INFO --- old/python-gnupg-0.5.3/python_gnupg.egg-info/PKG-INFO 2024-09-20 18:40:43.000000000 +0200 +++ new/python-gnupg-0.5.4/python_gnupg.egg-info/PKG-INFO 2025-01-07 12:57:56.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: python-gnupg -Version: 0.5.3 +Version: 0.5.4 Summary: A wrapper for the Gnu Privacy Guard (GPG or GnuPG) Home-page: https://github.com/vsajip/python-gnupg Author: Vinay Sajip @@ -26,6 +26,8 @@ Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 Classifier: Operating System :: OS Independent Classifier: Topic :: Software Development :: Libraries :: Python Modules License-File: LICENSE.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-gnupg-0.5.3/setup.cfg new/python-gnupg-0.5.4/setup.cfg --- old/python-gnupg-0.5.3/setup.cfg 2024-09-20 18:40:43.000000000 +0200 +++ new/python-gnupg-0.5.4/setup.cfg 2025-01-07 12:57:56.000000000 +0100 @@ -40,6 +40,8 @@ Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 Operating System :: OS Independent Topic :: Software Development :: Libraries :: Python Modules project_urls = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-gnupg-0.5.3/test_gnupg.py new/python-gnupg-0.5.4/test_gnupg.py --- old/python-gnupg-0.5.3/test_gnupg.py 2024-09-20 18:23:25.000000000 +0200 +++ new/python-gnupg-0.5.4/test_gnupg.py 2025-01-07 11:12:41.000000000 +0100 @@ -35,7 +35,7 @@ import gnupg __author__ = 'Vinay Sajip' -__date__ = '$20-Sep-2024 17:23:25$' +__date__ = '$07-Jan-2025 10:12:41$' ALL_TESTS = True @@ -832,6 +832,7 @@ gpg.on_data = collector result = gpg.encrypt(data, barbara) self.assertEqual(0, result.returncode, 'Non-zero return code') + self.assertIsNone(result.on_data_failure) edata = str(result) self.assertTrue(chunks) expected = type(chunks[0])().join(chunks) @@ -840,9 +841,21 @@ ddata = gpg.decrypt(edata, passphrase='bbrown') self.assertEqual(0, ddata.returncode, 'Non-zero return code') self.assertEqual(data.encode('ascii'), ddata.data, 'Round-trip must work') + self.assertIsNone(result.on_data_failure) expected = type(chunks[0])().join(chunks) self.assertEqual(expected.decode('ascii'), data) + # test with on-data generating an exception + + def exceptor(data): + raise ValueError('exception in on_data') + + chunks = [] + gpg.on_data = exceptor + ddata = gpg.decrypt(edata, passphrase='bbrown') + self.assertIs(type(ddata.on_data_failure), ValueError) + self.assertEqual(str(ddata.on_data_failure), 'exception in on_data') + # test signing with encryption and verification during decryption logger.debug('encrypting with signature') gpg.on_data = None