Path: csiph.com!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'skip:[ 20': 0.03; 'binary': 0.05; 'from:addr:yahoo.co.uk': 0.05; 'skip:\\ 20': 0.05; 'url:bitbucket': 0.05; '(especially': 0.07; 'computed': 0.07; 'filenames': 0.07; 'keys,': 0.07; 'pypi': 0.07; 'subject:ANN': 0.07; 'unittest': 0.07; 'versions.': 0.07; 'derived': 0.09; 'dict': 0.09; 'encoding.': 0.09; 'gpg': 0.09; 'iterate': 0.09; 'key)': 0.09; 'patch.': 0.09; 'patches': 0.09; 'pgp': 0.09; 'release,': 0.09; 'subject:version': 0.09; 'tarball': 0.09; 'bug': 0.10; 'python': 0.10; 'python.': 0.11; 'subject:python': 0.14; 'encoding': 0.15; '(code': 0.16; '----- end': 0.16; '[2].': 0.16; '[3],': 0.16; 'attribute,': 0.16; 'dictionary.': 0.16; 'encryption': 0.16; 'fingerprint:': 0.16; 'fingerprints': 0.16; 'gnupg': 0.16; "key's": 0.16; 'key:': 0.16; 'nick': 0.16; 'released.': 0.16; 'status.': 0.16; 'subkey': 0.16; 'subkey.': 0.16; 'subprocess': 0.16; 'suggestion.': 0.16; 'to:name:python list': 0.16; 'url:issues': 0.16; 'v1.4.9': 0.16; 'module,': 0.18; 'skip:g 40': 0.18; 'skip:= 10': 0.18; 'steve': 0.18; '>>>': 0.20; 'versions': 0.20; 'windows': 0.20; 'to:2**1': 0.21; '2.x': 0.22; "skip:' 40": 0.22; 'appears': 0.23; 'passing': 0.23; 'import': 0.24; 'cheers': 0.24; 'header:In-Reply-To:1': 0.24; 'signed': 0.24; 'module': 0.25; 'earlier': 0.27; 'points': 0.27; 'error': 0.27; '[2]': 0.27; 'andrew': 0.27; 'change,': 0.27; 'data,': 0.27; 'gnu': 0.27; 'this.': 0.28; "skip:' 10": 0.28; 'initial': 0.28; '"no': 0.29; 'always,': 0.29; 'dictionary': 0.29; 'encouraged': 0.29; 'wraps': 0.29; 'handled': 0.29; 'allows': 0.30; 'print': 0.30; 'code': 0.30; 'window': 0.30; 'fixed': 0.31; 'included': 0.32; '[1]': 0.32; 'returned': 0.32; 'subject:) ': 0.32; 'source': 0.33; 'url:python': 0.33; 'stream': 0.33; 'username': 0.33; 'correctly': 0.34; 'file': 0.34; 'previous': 0.34; 'list': 0.34; 'text': 0.35; 'mapping': 0.35; 'newer': 0.35; 'unicode': 0.35; 'expected': 0.35; 'project': 0.36; 'instead': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'method': 0.37; 'thanks': 0.37; 'environment.': 0.37; 'missing': 0.37; 'signature': 0.37; 'release': 0.37; 'progress': 0.38; 'version': 0.38; 'brief': 0.38; 'feedback': 0.38; 'reports': 0.38; 'skip:p 20': 0.38; 'mailing': 0.38; 'files': 0.38; 'ltd.': 0.38; 'test': 0.39; 'does': 0.39; 'skip:u 10': 0.61; 'caused': 0.61; 'default': 0.61; 'documents': 0.61; 'programs': 0.62; 'digital': 0.63; 'more': 0.63; 'url:0': 0.63; 'due': 0.65; 'encrypted': 0.66; 'signing': 0.66; 'header:Reply-To:1': 0.67; 'privacy': 0.71; 'verification': 0.72; 'message- id:@mail.yahoo.com': 0.84; 'upgrade.': 0.84; 'generation.': 0.91; 'info,': 0.93; 'enhancement': 0.96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1443263164; bh=pMGi4NkTlEFs94RBPQTG1oSuzOzo9IM93ilHvWNyiB0=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=SXfWj9nVcbdJv5UmujcYfEsAgh2V94z+tnk8LGGk35BHLLE1gf5P/8PTxGFxSDq2AfYZ/a9I2blMz43mt0Jvmjevj54RWevuzkBPQkk6Ea5Eg+pW/YnGbrgW7aof9vBHloYRf+5GHZeTQNUafHmy9E31dLh4FQyNNJvcp2WGPyd8x1pqKs27q1C2fl8QrT9BIp03V85CUwZ9BY8Zx05UC2At6Pr811DieZ/4/YSWCnxIbv4i6MpRnsiYJKFiS4ZwvWlLviGAcNvjipwEidseO9BibNKFn5JFDqy8ZvYQhQoRkBRTreDa0akUDRVclPV1Vs8oX9xx+Z4WGzPNjXGldQ== X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 902121.42167.bm@omp1009.mail.ir2.yahoo.com X-YMail-OSG: 2AUSa4gVM1kSeu1S28dwThW8vMD0yd2Lo2WErob72ur5Vv3lppQIyCvpRT7AtO_ 8KiWxxl64sUl1RLr28kZTVVJNwECJXPJ_Bny9ArQKuMxSWMrnGULykrGrP3uCa124vHAU2yyf9CW H4AWBmSOL5mKWvg2xS.8d9gKeQAYlT_4Nj3JqupDAvTbs7aejvEW15ROpP3p09u60wYerhHj.9x9 dDLoRDEzEl6vXBvF0Do_qoohRYN9qb4ftm9IYvePsDDqQLS9AYD17Bmoc98BorjD7gJdMSysMYrD 0UoS.lue1L62IDAUCAmQhmXhqN5TjJPLgtnRRDuF8E6foQt3z5w6UkjeINgBZhQwGVLC_kcG3HJr 45ZQOX6JZFAyA8N2JzoiDlMwTpBsp6vjBT5m3AbqUvj3P21MszxEE0xYwsKBRuYOTj5CerR7xRZM 3XZS_zPKz.sXJyEpj8VE_ayzkIVl3s1cCDmw9lTnSH3D8JQn8K1xDDHefBkiELVVPgLaGmmVdIeL LS_XjcwzG.iduzw-- Date: Sat, 26 Sep 2015 10:25:06 +0000 (UTC) From: Vinay Sajip Reply-To: Vinay Sajip To: Python List , Python Announce In-Reply-To: <241091267.841934.1443133560070.JavaMail.yahoo@mail.yahoo.com> References: <241091267.841934.1443133560070.JavaMail.yahoo@mail.yahoo.com> Subject: ANN: A new version (0.3.8) of python-gnupg has been released. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Sat, 26 Sep 2015 12:43:50 +0200 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 132 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1443264231 news.xs4all.nl 23734 [2001:888:2000:d::a6]:53857 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:97139 A new version of the Python module which wraps GnuPG has been released.=20 What Changed?=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 This is an enhancement and bug-fix release, and all users are encouraged to= upgrade. See the project website [1] for more information. Brief summary:=20 * Fixed #22: handled PROGRESS messages during verification and signing.=20 * Fixed #26: handled PINENTRY_LAUNCHED messages during verification,=20 decryption and key generation.=20 * Fixed #28: Allowed a default Name-Email to be computed even when neither = of=20 LOGNAME and USERNAME are in the environment.=20 * Fixed #29: Included test files missing from the tarball in previous versi= ons.=20 * Fixed #39: On Python 3.x, passing a text instead of a binary stream cause= d file decryption to hang due to a UnicodeDecodeError. This has now been correctly handled: The decryption fails with a "no data" status.=20 * Fixed #41: Handled Unicode filenames correctly by encoding them on 2.x us= ing the file system encoding. * Fixed #43: handled PINENTRY_LAUNCHED messages during key export. Thanks t= o Ian Denhardt for looking into this.=20 * Hide the console window which appears on Windows when gpg is spawned. Thanks to K=C3=A9vin Bernard-Allies for the patch.=20 * Subkey fingerprints are now captured.=20 * The returned value from the list_keys method now has a new attribute, key_map, which is a dictionary mapping key and subkey fingerprints to the corresponding key's dictionary. With this change, you don't need to iterate over the (potentially large) returned list to search for a key wi= th a given fingerprint - the key_map dict will take you straight to the key info, whether the fingerprint you have is for a key or a subkey. Thanks t= o Nick Daly for the initial suggestion.=20 This release [2] has been signed with my code signing key:=20 Vinay Sajip (CODE SIGNING KEY) =20 Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86=20 However, due to some error the signature for the source distribution (.tar.= gz) didn't get uploaded. To rectify this, I have pasted it into the PyPI page f= or the release [2]. What Does It Do?=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 The gnupg module allows Python programs to make use of the=20 functionality provided by the Gnu Privacy Guard (abbreviated GPG or=20 GnuPG). Using this module, Python programs can encrypt and decrypt=20 data, digitally sign documents and verify digital signatures, manage=20 (generate, list and delete) encryption keys, using proven Public Key=20 Infrastructure (PKI) encryption technology based on OpenPGP.=20 This module is expected to be used with Python versions >=3D 2.4, as it=20 makes use of the subprocess module which appeared in that version of=20 Python. This module is a newer version derived from earlier work by=20 Andrew Kuchling, Richard Jones and Steve Traugott.=20 A test suite using unittest is included with the source distribution.=20 Simple usage:=20 >>> import gnupg=20 >>> gpg =3D gnupg.GPG(gnupghome=3D'/path/to/keyring/directory')=20 >>> gpg.list_keys()=20 [{=20 ...=20 'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',=20 'keyid': '197D5DAC68F1AAB2',=20 'length': '1024',=20 'type': 'pub',=20 'uids': ['', 'Gary Gross (A test user) ']},=20 {=20 ...=20 'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',=20 'keyid': '0C5FEFA7A921FC4A',=20 'length': '1024',=20 ...=20 'uids': ['', 'Danny Davis (A test user) ']}]=20 >>> encrypted =3D gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])=20 >>> str(encrypted)=20 '-----BEGIN PGP MESSAGE-----\nVersion: GnuPG v1.4.9 (GNU/Linux)\n=20 \nhQIOA/6NHMDTXUwcEAf=20 .=20 -----END PGP MESSAGE-----\n'=20 >>> decrypted =3D gpg.decrypt(str(encrypted), passphrase=3D'secret')=20 >>> str(decrypted)=20 'Hello, world!'=20 >>> signed =3D gpg.sign("Goodbye, world!", passphrase=3D'secret')=20 >>> verified =3D gpg.verify(str(signed))=20 >>> print "Verified" if verified else "Not verified"=20 'Verified'=20 As always, your feedback is most welcome (especially bug reports [3],=20 patches and suggestions for improvement, or any other points via the=20 mailing list/discussion group [4]).=20 Enjoy!=20 Cheers=20 Vinay Sajip=20 Red Dove Consultants Ltd.=20 [1] https://bitbucket.org/vinay.sajip/python-gnupg=20 [2] https://pypi.python.org/pypi/python-gnupg/0.3.8=20 [3] https://bitbucket.org/vinay.sajip/python-gnupg/issues=20 [4] https://groups.google.com/forum/#!forum/python-gnupg