Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Vinay Sajip Newsgroups: comp.lang.python.announce Subject: ANN: A new version (0.4.2) of python-gnupg has been released. Date: Wed, 28 Mar 2018 15:53:50 +0000 (UTC) Lines: 64 Approved: python-announce-list@python.org Message-ID: References: <2130456259.634711.1522252430224.ref@mail.yahoo.com> <2130456259.634711.1522252430224@mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de lJ7GQrik2082O+wwEVNpqgmpHF3kIxWEdjdy5Hop3Zfw== Return-Path: X-Original-To: python-announce-list@python.org Delivered-To: python-announce-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; '(especially': 0.05; 'from:addr:yahoo.co.uk': 0.05; 'skip:[ 20': 0.05; 'skip:\\ 20': 0.05; 'url-ip:104.192/16': 0.05; 'executable': 0.07; 'keys,': 0.07; 'reason,': 0.07; 'release,': 0.07; 'unittest': 0.07; 'url-ip:104.192.143.1/32': 0.07; 'url- ip:104.192.143.2/32': 0.07; 'url-ip:104.192.143.3/32': 0.07; 'url- ip:104.192.143/24': 0.07; 'url-ip:162.242.198.235/32': 0.07; 'url- ip:162.242.198/24': 0.07; 'url-ip:162.242/16': 0.07; 'url:bitbucket': 0.07; 'gpg': 0.09; 'key)': 0.09; 'keyed': 0.09; 'patches': 0.09; 'pgp': 0.09; 'subject:ANN': 0.09; 'subject:version': 0.09; 'url:issues': 0.09; 'python.': 0.13; 'python': 0.15; 'steve': 0.15; '(code': 0.16; '-----end': 0.16; '[3],': 0.16; '[5]': 0.16; 'bug-fix': 0.16; 'dove': 0.16; 'encryption': 0.16; 'fingerprint:': 0.16; 'gnupg': 0.16; 'key:': 0.16; 'keys.': 0.16; 'released.': 0.16; 'skip:g 50': 0.16; 'subkey': 0.16; 'subprocess': 0.16; 'suggestion.': 0.16; 'v1.4.9': 0.16; 'argument': 0.17; 'exception': 0.17; "skip:' 30": 0.17; 'bug': 0.17; 'subject:python': 0.20; '>>>': 0.20; 'dictionary': 0.20; 'versions': 0.21; '>>>': 0.23; "skip:' 10": 0.23; 'to:2**1': 0.23; '8bit%:4': 0.24; 'suggested': 0.24; 'url:io': 0.24; 'import': 0.24; 'error': 0.24; 'url- ip:151.101.0.223/32': 0.26; 'url-ip:151.101.128.223/32': 0.26; 'url-ip:151.101.192.223/32': 0.26; 'url-ip:151.101.64.223/32': 0.26; 'url-ip:151.101.0/24': 0.26; 'url-ip:151.101.128/24': 0.26; 'url-ip:151.101.192/24': 0.26; 'url-ip:151.101.64/24': 0.26; 'module': 0.26; 'cheers': 0.28; 'expected': 0.29; 'signed': 0.30; 'earlier': 0.31; 'points': 0.31; 'skip:= 10': 0.31; '2.1': 0.31; 'module,': 0.31; 'passing': 0.31; 'skip:g 40': 0.31; 'print': 0.31; 'always,': 0.32; 'derived': 0.32; 'detected': 0.32; 'url:readthedocs': 0.32; 'wraps': 0.32; "skip:' 20": 0.33; 'available.': 0.33; 'included': 0.34; 'test': 0.34; 'code': 0.34; 'url-ip:151.101/16': 0.34; 'url-ip:151/8': 0.34; '8bit%:13': 0.34; 'source': 0.35; 'list': 0.35; 'skip:[ 10': 0.36; 'method': 0.36; 'url:en': 0.36; 'correctly': 0.37; 'allows': 0.37; 'foster': 0.37; 'gnu': 0.37; 'gross': 0.37; "skip:' 40": 0.37; '8bit%:10': 0.38; 'subject: (': 0.38; 'path': 0.38; 'url-ip:108.177/16': 0.38; '8bit%:8': 0.39; '8bit%:15': 0.39; 'url:python': 0.39; 'skip:& 10': 0.39; 'url:org': 0.39; 'subject:-': 0.40; '[2]': 0.40; 'skip:( 40': 0.40; 'your': 0.60; '[4]': 0.61; 'appeared': 0.61; 'more': 0.62; 'jones': 0.62; 'sfxlen:3': 0.62; 'url- ip:108.177.119.100/32': 0.62; 'url-ip:108.177.119.101/32': 0.62; 'url-ip:108.177.119.102/32': 0.62; 'url-ip:108.177.119.113/32': 0.62; 'url-ip:108.177.119.138/32': 0.62; 'url- ip:108.177.119.139/32': 0.62; 'information': 0.62; 'enhancement': 0.62; 'website': 0.62; 'received:77.238': 0.63; 'refer': 0.63; 'url:0': 0.63; 'programs': 0.64; 'digital': 0.65; 'privacy': 0.67; '[3]': 0.70; '8bit%:19': 0.71; 'encrypted': 0.75; 'url:4': 0.76; 'william': 0.79; 'enjoy!': 0.84; 'kostis': 0.84; 'upgrade.': 0.84; 'url:nbsp': 0.84; 'received:consmr.mail.ir2.yahoo.com': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1522253054; bh=GkI9GmU8tX8TYjC2hn7JaSYv0rNfMsKTxUCEDYWaDGM=; h=Date:From:To:Subject:References:From:Subject; b=WXVG4Y3+KfBftUST0QZssWherPPC+601U8OT3ltryfUi+MvHgG9M5lRzER4sjBtExGgAyzLQpC74ibNlryQzUfKGNm5LLUu7wqW4McJdw053a3w3Y9VHma9rRCbGVZwrG7byVQ9sVTuOqLEckxIka/toZzRseDyyDeGEcbjk463KjJUJbvwGuvlHBwRMqj+HC3Vka3zWU6/hFxhn1HAIYqF8H9PCRfbRDg7dShz08uK/6/h0Oe+Q9fzCuJS/NP0FWTk6zQD2yR+ELhbIP3eXKw9BiiR0+jArl6p2wfWBOFWL8vnBKUhDiMtw/DvtG5O8vEa3wrzpWGEaJYqim565NQ== X-YMail-OSG: mcBxQ_EVM1kbbvKbzL4zysr6Ez_VR2pMjP4B5zXLfIzBeSq3c87KlPSO6Op0zBG 7wMP1Ce5jgniQ0bEZi2LQRMSXJLv8jhHscKroP7lBDpGp8v5PI.y8damRg4gfZ4suzAVaEvqTtG_ wixbpL7Px9sQMi96xfK4Bu0VS.u6QYrhlbLRNCyyI.ZT9utkTvkJB5ytWqXqi7vClvU43ywwCHWN jG7HHhZlP0_BbsqVi_8LCUUIN4AlLOvSaWUSvvgVDimsyDV6BF4NrVM4pP9trM9PC3YTlz..2cS0 ReuJHhhc2j5uQ.6Uw5KiszO9jJ07ZtIN.1G.8RBY2cbBTV9trywwx3Dv0TPZz9wlDaxwgn5k8rFV EeExHVxfPHlr5YMzOeUYNqj_iTbBojP3Zi.i4DU13pmjMYG9MKanxRFMu9V8qRpEVxrZE8FItlug IWxQjgE5aViJukzgPHunhSiiZAlOlA9X3DXT29VKbia90YkW5h8rymTVhvkfoTSn91bwl X-Mailer: WebService/1.1.11643 YMailNorrin Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/64.0.3282.167 Chrome/64.0.3282.167 Safari/537.36 X-Mailman-Approved-At: Wed, 28 Mar 2018 12:19:05 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: python-announce-list@python.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Announcement-only list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <2130456259.634711.1522252430224@mail.yahoo.com> X-Mailman-Original-References: <2130456259.634711.1522252430224.ref@mail.yahoo.com> Xref: csiph.com comp.lang.python.announce:2800 A new version of the Python module which wraps GnuPG has been released.=C2= =A0 What Changed?=C2=A0=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=C2=A0This is an = enhancement and bug-fix release, and all users are encouraged to upgrade.= =C2=A0See the project website [1] for more information.=C2=A0 Brief summary:=C2=A0 * Subkey information is now collected and returned in a subkey_info=C2=A0 d= ictionary keyed by the subkey's ID. * GPG2 version is now correctly detected on OS X. * Added expect_passphrase keyword argument for use on GnuPG >=3D 2.1 when= =C2=A0 passing passphrase to gpg via pinentry. * Provided a trust_keys method to allow setting the trust level=C2=A0 for k= eys. Thanks to William Foster for a suggested implementation. * Made the exception message when the gpg executable is not found contain t= he=C2=A0 path of the executable that was tried. Thanks to Kostis Anagnostop= oulos for=C2=A0 the suggestion. * Made the error message less categorical in the case of a failure with an= =C2=A0 unspecified reason, adding some information from gpg error codes whe= n=C2=A0 available. This release [2] has been signed with my code signing key:=C2=A0 Vinay Sajip (CODE SIGNING KEY) =C2=A0Fingerprint: C= A74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86=C2=A0 What Does It Do?=C2=A0=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=C2= =A0The gnupg module allows Python programs to make use of the=C2=A0function= ality provided by the Gnu Privacy Guard (abbreviated GPG or=C2=A0GnuPG). Us= ing this module, Python programs can encrypt and decrypt=C2=A0data, digital= ly sign documents and verify digital signatures, manage=C2=A0(generate, lis= t and delete) encryption keys, using proven Public Key=C2=A0Infrastructure = (PKI) encryption technology based on OpenPGP.=C2=A0 This module is expected to be used with Python versions >=3D 2.4, as it=C2= =A0makes use of the subprocess module which appeared in that version of=C2= =A0Python. This module is a newer version derived from earlier work by=C2= =A0Andrew Kuchling, Richard Jones and Steve Traugott.=C2=A0 A test suite using unittest is included with the source distribution.=C2=A0 Simple usage:=C2=A0 >>> import gnupg=C2=A0>>> gpg =3D gnupg.GPG(gnupghome=3D'/path/to/keyring/d= irectory')=C2=A0>>> gpg.list_keys()=C2=A0 [{=C2=A0...=C2=A0'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',= =C2=A0'keyid': '197D5DAC68F1AAB2',=C2=A0'length': '1024',=C2=A0'type': 'pub= ',=C2=A0'uids': ['', 'Gary Gross (A test user) ']}= ,=C2=A0{=C2=A0...=C2=A0'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921= FC4A',=C2=A0'keyid': '0C5FEFA7A921FC4A',=C2=A0'length': '1024',=C2=A0...=C2= =A0'uids': ['', 'Danny Davis (A test user) ']}]= =C2=A0>>> encrypted =3D gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])= =C2=A0>>> str(encrypted)=C2=A0 '-----BEGIN PGP MESSAGE-----\nVersion: GnuPG v1.4.9 (GNU/Linux)\n=C2=A0\nhQ= IOA/6NHMDTXUwcEAf=C2=A0.=C2=A0-----END PGP MESSAGE-----\n'=C2=A0>>> decrypt= ed =3D gpg.decrypt(str(encrypted), passphrase=3D'secret')=C2=A0>>> str(decr= ypted)=C2=A0 'Hello, world!'=C2=A0>>> signed =3D gpg.sign("Goodbye, world!", passphrase= =3D'secret')=C2=A0>>> verified =3D gpg.verify(str(signed))=C2=A0>>> print "= Verified" if verified else "Not verified"=C2=A0 'Verified'=C2=A0 As always, your feedback is most welcome (especially bug reports [3],=C2=A0= patches and suggestions for improvement, or any other points via the=C2=A0m= ailing list/discussion group [4]).=C2=A0 Please refer to the documentation [5] for more information.=C2=A0 Enjoy!=C2=A0 Cheers=C2=A0 Vinay Sajip=C2=A0Red Dove Consultants Ltd.=C2=A0 [1] https://bitbucket.org/vinay.sajip/python-gnupg=C2=A0[2] https://pypi.py= thon.org/pypi/python-gnupg/0.4.2=C2=A0[3] https://bitbucket.org/vinay.sajip= /python-gnupg/issues=C2=A0[4] https://groups.google.com/forum/#!forum/pytho= n-gnupg=C2=A0[5] https://gnupg.readthedocs.io/en/latest/=C2=A0