ANN: A new version (0.3.8) of python-gnupg has been released.
A new version of the Python module which wraps GnuPG has been
released.
What Changed?
=============
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:
* Fixed #22: handled PROGRESS messages during verification and signing.
* Fixed #26: handled PINENTRY_LAUNCHED messages during verification,
decryption and key generation.
* Fixed #28: Allowed a default Name-Email to be computed even when neither of
LOGNAME and USERNAME are in the environment.
* Fixed #29: Included test files missing from the tarball in previous versions.
* Fixed #39: On Python 3.x, passing a text instead of a binary stream caused
file decryption to hang due to a UnicodeDecodeError. This has now been
correctly handled: The decryption fails with a "no data" status.
* Fixed #41: Handled Unicode filenames correctly by encoding them on 2.x using
the file system encoding.
* Fixed #43: handled PINENTRY_LAUNCHED messages during key export. Thanks to
Ian Denhardt for looking into this.
* Hide the console window which appears on Windows when gpg is spawned.
Thanks to Kévin Bernard-Allies for the patch.
* Subkey fingerprints are now captured.
* 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 with
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 to
Nick Daly for the initial suggestion.
This release [2] has been signed with my code signing key:
Vinay Sajip (CODE SIGNING KEY)
import gnupg gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory') gpg.list_keys()
[{
...
'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
'keyid': '197D5DAC68F1AAB2',
'length': '1024',
'type': 'pub',
'uids': ['', 'Gary Gross (A test user)
encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A']) str(encrypted)
'-----BEGIN PGP MESSAGE-----\nVersion: GnuPG v1.4.9 (GNU/Linux)\n \nhQIOA/6NHMDTXUwcEAf . -----END PGP MESSAGE-----\n'
decrypted = gpg.decrypt(str(encrypted), passphrase='secret') str(decrypted)
'Hello, world!'
signed = gpg.sign("Goodbye, world!", passphrase='secret') verified = gpg.verify(str(signed)) print "Verified" if verified else "Not verified"
'Verified' As always, your feedback is most welcome (especially bug reports [3], patches and suggestions for improvement, or any other points via the mailing list/discussion group [4]). Enjoy! Cheers Vinay Sajip Red Dove Consultants Ltd. [1] https://bitbucket.org/vinay.sajip/python-gnupg [2] https://pypi.python.org/pypi/python-gnupg/0.3.8 [3] https://bitbucket.org/vinay.sajip/python-gnupg/issues [4] https://groups.google.com/forum/#!forum/python-gnupg
participants (1)
-
Vinay Sajip