gpgme/lang/python
Justus Winter f3618bc615 python: Rework callbacks.
Simplify how the lifetime of callback arguments is managed.

* lang/python/gpgme.i (gpgme_edit_cb_t): Check arguments.
(PyObject_p_p, void_p_p): Drop rather dangerous interface.
(pygpgme_unwrap_gpgme_ctx_t): New function.
* lang/python/helpers.c (pygpgme_clear_generic_cb): Drop dangerous
function.
(pyPassphraseCb): Assert contract.
(pygpgme_set_passphrase_cb): Use Python's calling convention so that
we can raise exceptions.  Hand in 'self', get the wrapped object, and
simply store the hook data as attribute of the wrapper object.
(pyProgressCb, pygpgme_set_progress_cb): Likewise.
(pygpgme_set_status_cb): Likewise.
(pygpgme_data_new_from_cbs): Likewise.
* lang/python/helpers.h (pygpgme_clear_generic_cb): Drop prototype.
(pygpgme_set_passphrase_cb): Update prototype.
(pygpgme_set_progress_cb): Likewise.
(pygpgme_set_status_cb): Likewise.
(pygpgme_data_new_from_cbs): Likewise.
(pygpgme_unwrap_gpgme_ctx_t): New prottotype.
* lang/python/pyme/core.py (Context, Data): Update callsites.

Signed-off-by: Justus Winter <justus@g10code.com>
2016-06-16 14:19:17 +02:00
..
docs Merge branch 'justus/pyme3' 2016-05-17 15:10:28 +02:00
examples python: Drop obsolete VCS keywords. 2016-06-06 14:16:01 +02:00
pyme python: Rework callbacks. 2016-06-16 14:19:17 +02:00
tests python: Wrap objects implementing the buffer protocol. 2016-06-16 14:19:17 +02:00
gpgme-h-clean.py python: Fix stripping deprecated functionality. 2016-06-08 17:12:00 +02:00
gpgme.i python: Rework callbacks. 2016-06-16 14:19:17 +02:00
helpers.c python: Rework callbacks. 2016-06-16 14:19:17 +02:00
helpers.h python: Rework callbacks. 2016-06-16 14:19:17 +02:00
INSTALL python: Rename bindings. 2016-05-10 13:19:26 +02:00
Makefile.am python: Wrap objects implementing the buffer protocol. 2016-06-16 14:19:17 +02:00
MANIFEST.in Merge branch 'justus/pyme3' 2016-05-17 15:10:28 +02:00
README python: Improve the documentation. 2016-06-16 14:07:41 +02:00
setup.py.in python: Get version information from the build system. 2016-06-16 14:07:41 +02:00

PyME - GPGME for Python          emacs, please switch to -*- org -*- mode
=======================

PyMe is a python interface to the GPGME library:
https://www.gnupg.org/related_software/gpgme/

PyMe uses SWIG to create wrapper functions with automatic type
conversions.  This way most of the functions and types are converted
from C into Python 3 automatically by SWIG, reducing the maintenance
cost of the binginds.

* Authors

PyME has been created by John Goerzen, and maintained, developed, and
cherished by Igor Belyi, Martin Albrecht, Ben McGinnes, and everyone
who contributed to it in any way.

In 2016 we merged a port of PyME to into the GPGME repository, and
development will continue there.  Please see the VCS history for the
list of contributors, and if you do find bugs, or want to contribute,
please get in touch and help maintain PyME.

Please see the section 'History' further down this document for
references to previous versions.

* Mailing List

For general discussion and help see the gnupg-users mailing list:
https://lists.gnupg.org/mailman/listinfo/gnupg-users

For development see the gnupg-devel mailing list:
https://lists.gnupg.org/mailman/listinfo/gnupg-devel

* Bugs

Please report bugs using our bug tracker using the category 'gpgme',
and topic 'python':
https://bugs.gnupg.org/gnupg/

* History

 - The bindings have been merged into the GPGME repository in 2016.

 - The latest version of PyME for Python 3.2 and above (as of
   May, 2015) is v0.9.1.
   https://git.gnupg.org/gpgme.git/lang/py3-pyme

 - The latest version of PyME for Python 2.6 and 2.7 (as of this
   writing) is v0.9.0.  https://bitbucket.org/malb/pyme

 - A previous version of PyME v0.8.0 can be found on sourceforge:
   http://pyme.sourceforge.net/

 - A previous version of PyME v0.5.1 which works with GPGME v0.3.15
   can be found on John Goerzen's PyMe page:
   http://quux.org/devel/pyme/
   http://www.complete.org/JohnGoerzen