Hello community,

here is the log from the commit of package python-python-gnupg for 
openSUSE:Factory checked in at 2019-09-11 10:36:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-gnupg (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-gnupg.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-gnupg"

Wed Sep 11 10:36:08 2019 rev:8 rq:729817 version:0.4.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-python-gnupg/python-python-gnupg.changes  
2019-04-18 09:56:17.549336306 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-python-gnupg.new.7948/python-python-gnupg.changes
        2019-09-11 10:36:15.411281183 +0200
@@ -1,0 +2,6 @@
+Tue Sep 10 11:08:04 UTC 2019 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 0.4.5:
+  * various bugfixes
+
+-------------------------------------------------------------------

Old:
----
  python-gnupg-0.4.4.tar.gz

New:
----
  python-gnupg-0.4.5.tar.gz

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

Other differences:
------------------
++++++ python-python-gnupg.spec ++++++
--- /var/tmp/diff_new_pack.ZTmTNT/_old  2019-09-11 10:36:16.627280830 +0200
+++ /var/tmp/diff_new_pack.ZTmTNT/_new  2019-09-11 10:36:16.631280828 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define         oldpython python
 Name:           python-python-gnupg
-Version:        0.4.4
+Version:        0.4.5
 Release:        0
 Summary:        A wrapper for the GNU Privacy Guard (GPG or GnuPG)
 License:        BSD-3-Clause

++++++ python-gnupg-0.4.4.tar.gz -> python-gnupg-0.4.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-gnupg-0.4.4/PKG-INFO 
new/python-gnupg-0.4.5/PKG-INFO
--- old/python-gnupg-0.4.4/PKG-INFO     2019-01-24 09:48:36.000000000 +0100
+++ new/python-gnupg-0.4.5/PKG-INFO     2019-08-12 18:50:07.000000000 +0200
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: python-gnupg
-Version: 0.4.4
+Version: 0.4.5
 Summary: A wrapper for the Gnu Privacy Guard (GPG or GnuPG)
-Home-page: http://gnupg.readthedocs.io/en/latest/
+Home-page: https://docs.red-dove.com/python-gnupg/
 Author: Vinay Sajip
 Author-email: vinay_sa...@red-dove.com
 License: Copyright (C) 2008-2019 by Vinay Sajip. All Rights Reserved. See 
LICENSE.txt for license.
-Download-URL: 
https://pypi.io/packages/source/p/python-gnupg/python-gnupg-0.4.4.tar.gz
+Download-URL: 
https://pypi.io/packages/source/p/python-gnupg/python-gnupg-0.4.5.tar.gz
 Description: This module allows easy access to GnuPG's key management, 
encryption and signature functionality from Python programs. It is intended for 
use with Python 2.4 or greater.
 Platform: No particular restrictions
 Classifier: Development Status :: 5 - Production/Stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-gnupg-0.4.4/README.rst 
new/python-gnupg-0.4.5/README.rst
--- old/python-gnupg-0.4.4/README.rst   2019-01-23 20:36:19.000000000 +0100
+++ new/python-gnupg-0.4.5/README.rst   2019-08-12 18:47:20.000000000 +0200
@@ -63,12 +63,38 @@
 
 .. note:: GCnn refers to an issue nn on Google Code.
 
-0.4.5 (future)
+
+0.4.6 (future)
 --------------
 
 Released: Not yet.
 
 
+0.4.5
+-----
+
+Released: 2019-08-12
+
+* Fixed #107: Improved documentation.
+
+* Fixed #112: Raised a ValueError if a gnupghome is specified which is not an
+  existing directory.
+
+* Fixed #113: Corrected stale link in the documentation.
+
+* Fixed #116: Updated documentation to clarify when spurious key-expired/
+  signature-expired messages might be seen.
+
+* Fixed #119: Added --yes to avoid pinentry when deleting secret keys with
+  GnuPG >= 2.1.
+
+* A warning is logged if gpg returns a non-zero return code.
+
+* Added ``extra_args`` to ``import_keys``.
+
+* Added support for CI using AppVeyor.
+
+
 0.4.4
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-gnupg-0.4.4/gnupg.py 
new/python-gnupg-0.4.5/gnupg.py
--- old/python-gnupg-0.4.4/gnupg.py     2019-01-24 09:43:25.000000000 +0100
+++ new/python-gnupg-0.4.5/gnupg.py     2019-08-12 18:47:20.000000000 +0200
@@ -32,9 +32,9 @@
 A unittest harness (test_gnupg.py) has also been added.
 """
 
-__version__ = "0.4.4"
+__version__ = "0.4.5"
 __author__ = "Vinay Sajip"
-__date__  = "$24-Jan-2019 08:43:25$"
+__date__  = "$12-Aug-2019 15:58:03$"
 
 try:
     from io import StringIO
@@ -813,6 +813,9 @@
         """
         self.gpgbinary = gpgbinary
         self.gnupghome = gnupghome
+        # issue 112: fail if the specified value isn't a directory
+        if gnupghome and not os.path.isdir(gnupghome):
+            raise ValueError('gnupghome should be a directory (it isn\'t): %s' 
% gnupghome)
         if keyring:
             # Allow passing a string or another iterable. Make it uniformly
             # a list of keyring filenames
@@ -997,6 +1000,8 @@
         if writer is not None:
             writer.join()
         process.wait()
+        if process.returncode != 0:
+            logger.warning('gpg returned a non-zero error code: %d', 
process.returncode)
         if stdin is not None:
             try:
                 stdin.close()
@@ -1088,7 +1093,8 @@
         """Verify the signature on the contents of the string 'data'
 
         >>> GPGBINARY = os.environ.get('GPGBINARY', 'gpg')
-        >>> gpg = GPG(gpgbinary=GPGBINARY, gnupghome="keys")
+        >>> if not os.path.isdir('keys'): os.mkdir('keys')
+        >>> gpg = GPG(gpgbinary=GPGBINARY, gnupghome='keys')
         >>> input = gpg.gen_key_input(passphrase='foo')
         >>> key = gpg.gen_key(input)
         >>> assert key
@@ -1149,14 +1155,17 @@
     # KEY MANAGEMENT
     #
 
-    def import_keys(self, key_data):
+    def import_keys(self, key_data, extra_args=None):
         """
         Import the key_data into our keyring.
         """
         result = self.result_map['import'](self)
         logger.debug('import_keys: %r', key_data[:256])
         data = _make_binary_stream(key_data, self.encoding)
-        self._handle_io(['--import'], data, result, binary=True)
+        args = ['--import']
+        if extra_args:
+            args.extend(extra_args)
+        self._handle_io(args, data, result, binary=True)
         logger.debug('import_keys result: %r', result.__dict__)
         data.close()
         return result
@@ -1167,7 +1176,8 @@
         >>> import shutil
         >>> shutil.rmtree("keys", ignore_errors=True)
         >>> GPGBINARY = os.environ.get('GPGBINARY', 'gpg')
-        >>> gpg = GPG(gpgbinary=GPGBINARY, gnupghome="keys")
+        >>> if not os.path.isdir('keys'): os.mkdir('keys')
+        >>> gpg = GPG(gpgbinary=GPGBINARY, gnupghome='keys')
         >>> os.chmod('keys', 0x1C0)
         >>> result = gpg.recv_keys('pgp.mit.edu', '92905378')
         >>> if 'NO_EXTERNAL_TESTS' not in os.environ: assert result
@@ -1225,6 +1235,8 @@
         else:
             fingerprints = [no_quote(fingerprints)]
         args = ['--delete-%s' % which]
+        if secret and self.version >= (2, 1):
+            args.insert(0, '--yes')
         args.extend(fingerprints)
         result = self.result_map['delete'](self)
         if not secret or self.version < (2, 1):
@@ -1318,7 +1330,8 @@
         >>> import shutil
         >>> shutil.rmtree("keys", ignore_errors=True)
         >>> GPGBINARY = os.environ.get('GPGBINARY', 'gpg')
-        >>> gpg = GPG(gpgbinary=GPGBINARY, gnupghome="keys")
+        >>> if not os.path.isdir('keys'): os.mkdir('keys')
+        >>> gpg = GPG(gpgbinary=GPGBINARY, gnupghome='keys')
         >>> input = gpg.gen_key_input(passphrase='foo')
         >>> result = gpg.gen_key(input)
         >>> fp1 = result.fingerprint
@@ -1374,6 +1387,7 @@
         >>> import shutil
         >>> shutil.rmtree('keys', ignore_errors=True)
         >>> GPGBINARY = os.environ.get('GPGBINARY', 'gpg')
+        >>> if not os.path.isdir('keys'): os.mkdir('keys')
         >>> gpg = GPG(gpgbinary=GPGBINARY, gnupghome='keys')
         >>> os.chmod('keys', 0x1C0)
         >>> result = gpg.search_keys('<vinay_sa...@hotmail.com>')
@@ -1416,7 +1430,8 @@
         control input.
 
         >>> GPGBINARY = os.environ.get('GPGBINARY', 'gpg')
-        >>> gpg = GPG(gpgbinary=GPGBINARY, gnupghome="keys")
+        >>> if not os.path.isdir('keys'): os.mkdir('keys')
+        >>> gpg = GPG(gpgbinary=GPGBINARY, gnupghome='keys')
         >>> input = gpg.gen_key_input(passphrase='foo')
         >>> result = gpg.gen_key(input)
         >>> assert result
@@ -1525,7 +1540,8 @@
         >>> if os.path.exists("keys"):
         ...     shutil.rmtree("keys", ignore_errors=True)
         >>> GPGBINARY = os.environ.get('GPGBINARY', 'gpg')
-        >>> gpg = GPG(gpgbinary=GPGBINARY, gnupghome="keys")
+        >>> if not os.path.isdir('keys'): os.mkdir('keys')
+        >>> gpg = GPG(gpgbinary=GPGBINARY, gnupghome='keys')
         >>> input = gpg.gen_key_input(name_email='user1@test', 
passphrase='pp1')
         >>> result = gpg.gen_key(input)
         >>> fp1 = result.fingerprint
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-gnupg-0.4.4/setup.py 
new/python-gnupg-0.4.5/setup.py
--- old/python-gnupg-0.4.4/setup.py     2019-01-24 09:25:30.000000000 +0100
+++ new/python-gnupg-0.4.5/setup.py     2019-07-16 09:21:35.000000000 +0200
@@ -13,7 +13,7 @@
     author_email="vinay_sa...@red-dove.com",
     maintainer="Vinay Sajip",
     maintainer_email="vinay_sa...@red-dove.com",
-    url="http://gnupg.readthedocs.io/en/latest/";,
+    url="https://docs.red-dove.com/python-gnupg/";,
     py_modules=["gnupg"],
     platforms="No particular restrictions",
     
download_url="https://pypi.io/packages/source/p/python-gnupg/python-gnupg-%s.tar.gz";
 % version,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-gnupg-0.4.4/test_gnupg.py 
new/python-gnupg-0.4.5/test_gnupg.py
--- old/python-gnupg-0.4.4/test_gnupg.py        2019-01-24 09:43:59.000000000 
+0100
+++ new/python-gnupg-0.4.5/test_gnupg.py        2019-08-12 18:47:20.000000000 
+0200
@@ -28,7 +28,7 @@
 import gnupg
 
 __author__ = "Vinay Sajip"
-__date__  = "$24-Jan-2019 08:43:59$"
+__date__  = "$12-Aug-2019 15:58:32$"
 
 ALL_TESTS = True
 
@@ -551,6 +551,19 @@
         expected = type(chunks[0])().join(chunks)
         self.assertEqual(expected.decode('ascii'), data)
 
+        # test signing with encryption and verification during decryption
+        logger.debug('encrypting with signature')
+        gpg.on_data = None
+        edata = str(gpg.encrypt(data, barbara, sign=andrew, passphrase='andy'))
+        logger.debug('decrypting with verification')
+        ddata = gpg.decrypt(edata, passphrase='bbrown')
+        self.assertEqual(data.encode('ascii'), ddata.data, 'Round-trip must 
work')
+        sig_values = list(ddata.sig_info.values())
+        self.assertTrue(sig_values)
+        sig_info = sig_values[0]
+        self.assertEqual(sig_info['fingerprint'], andrew)
+        logger.debug('decrypting with verification succeeded')
+
     def test_import_and_export(self):
         "Test that key import and export works"
         logger.debug("test_import_and_export begins")
@@ -744,6 +757,14 @@
             gnupg.GPG(gnupghome=self.homedir, gpgbinary='frob')
         self.assertIn('frob', str(ar.exception))
 
+    def test_invalid_home(self):
+        "Test that any specified gnupghome directory actually is one"
+        hd = tempfile.mkdtemp(prefix='keys-')
+        shutil.rmtree(hd)  # make sure it isn't there anymore
+        with self.assertRaises(ValueError) as ar:
+            gnupg.GPG(gnupghome=hd)
+        self.assertTrue('gnupghome should be a directory' in str(ar.exception))
+
     def test_make_args(self):
         "Test argument line construction"
         self.gpg.options = ['--foo', '--bar']
@@ -819,7 +840,7 @@
         self.do_file_encryption_and_decryption(encfname, decfname)
         logger.debug("test_file_encryption_and_decryption ends")
 
-    #@skipIf(os.name == 'nt', 'Test not suitable for Windows')
+    @skipIf(os.name == 'nt', 'Test not suitable for Windows')
     def test_invalid_outputs(self):
         "Test encrypting to invalid output files"
         encfno, encfname = tempfile.mkstemp()
@@ -1009,7 +1030,7 @@
     'basic' : set(['test_environment', 'test_list_keys_initial',
                    'test_nogpg', 'test_make_args',
                    'test_quote_with_shell']),
-    'test': set(['test_signature_verification']),
+    'test': set(['test_encryption_and_decryption']),
 }
 
 def suite(args=None):
@@ -1039,6 +1060,7 @@
 
 def main():
     init_logging()
+    logger.debug('Python version: %s', sys.version.replace('\n', ' '))
     tests = suite()
     results = unittest.TextTestRunner(verbosity=1).run(tests)
     return not results.wasSuccessful()


Reply via email to