<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/lang/python, branch justus/idiomatic-py-0</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=justus%2Fidiomatic-py-0</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=justus%2Fidiomatic-py-0'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2016-07-08T16:05:12Z</updated>
<entry>
<title>python: idiomatic interface prototype</title>
<updated>2016-07-08T16:05:12Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-06-08T16:58:57Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=d6408ce471c294c3e6f901d183b87d521b9bcc56'/>
<id>urn:sha1:d6408ce471c294c3e6f901d183b87d521b9bcc56</id>
<content type='text'>
Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Port more tests.</title>
<updated>2016-07-08T16:03:36Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-06-06T10:49:11Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=004026a94fea9c4f87068c1c17e519df5cbb8d8e'/>
<id>urn:sha1:004026a94fea9c4f87068c1c17e519df5cbb8d8e</id>
<content type='text'>
* lang/python/tests/Makefile.am (pytests): Add new file.
* lang/python/tests/t-import.py: New file.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Fix raising stashed exceptions.</title>
<updated>2016-07-08T09:45:08Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-07-08T09:45:08Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8a93f345b701332270c9829a4d0a93537f98a8d8'/>
<id>urn:sha1:8a93f345b701332270c9829a4d0a93537f98a8d8</id>
<content type='text'>
Fixes an issue with newer versions of Python.

* lang/python/helpers.c (pygpgme_raise_callback_exception): Be more
careful when restoring the exception.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Fix distcheck.</title>
<updated>2016-07-07T12:10:36Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-07-06T08:59:18Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=52efcf1ee9fc8ba4c6bd23d8fe4f5f7993ba9fb1'/>
<id>urn:sha1:52efcf1ee9fc8ba4c6bd23d8fe4f5f7993ba9fb1</id>
<content type='text'>
* lang/python/INSTALL: Drop obsolete file.
* lang/python/Makefile.am (EXTRA_DIST): Add missing files.
(CLEANFILES): Remove generated files.
(clean-local): Fix permissions of copied files.
* lang/python/tests/Makefile.am (TESTS): Use our own setup and
teardown scripts.
(EXTRA_DIST): Add missing files.
* lang/python/tests/final.py: New file.
* lang/python/tests/initial.py: Likewise.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Improve autmatically generated docstrings.</title>
<updated>2016-06-16T12:19:17Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-06-14T11:28:37Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8997d88bf97d1784706becbf8e9dc74e4656e311'/>
<id>urn:sha1:8997d88bf97d1784706becbf8e9dc74e4656e311</id>
<content type='text'>
* lang/python/gpgme.i: Add comment.
* lang/python/pyme/core.py (__getattr__): Rewrite automatically
generated doctrings for the wrapper methods.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Make result objects more robust.</title>
<updated>2016-06-16T12:19:17Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-06-14T15:33:12Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=a324d0cffe93cab955698c2c065b2f2227e379e4'/>
<id>urn:sha1:a324d0cffe93cab955698c2c065b2f2227e379e4</id>
<content type='text'>
Results returned by the GPGME are fragile, i.e. they are only valid
until the next operation is performed in the context.

We cannot arbitrarily constrain the lifetime of Python objects, we
therefore create deep copies of the results.

* lang/python/gpgme.i (gpgme_tofu_info_t): Turn these into a list.
(gpgme_*_result_t): Create deep copies of these objects.
* lang/python/helpers.c (pygpgme_wrap_fragile_result): New function.
* lang/python/helpers.h (pygpgme_wrap_fragile_result): New prototype.
* lang/python/pyme/results.py: New file.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Avoid creating SWIG proxy classes.</title>
<updated>2016-06-16T12:19:17Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-06-14T11:48:33Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=856bcfe2934237011984fab0bc69800a7c25c34b'/>
<id>urn:sha1:856bcfe2934237011984fab0bc69800a7c25c34b</id>
<content type='text'>
* lang/python/Makefile.am (gpgme_wrap.c): Use '-builtin' to make SWIG
generate builtin types for c types.
* lang/python/gpgme.i (pygpgme_wrap_gpgme_data_t): Adapt slightly.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Simplify wrapping glue.</title>
<updated>2016-06-16T12:19:17Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-06-14T10:37:26Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=6641c7814b30e3e8f18105b2636545cc1bd07552'/>
<id>urn:sha1:6641c7814b30e3e8f18105b2636545cc1bd07552</id>
<content type='text'>
* lang/python/pyme/core.py: Rename '_getctype' to '_ctype' and turn it
  into a string.  Likewise rename '_getnameprepend' to '_cprefix'.
* lang/python/helpers.c: Adapt accordingly.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Rework callbacks.</title>
<updated>2016-06-16T12:19:17Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-06-13T17:16:30Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=f3618bc615e3eff1f52fb5849cbf0f0b95515a61'/>
<id>urn:sha1:f3618bc615e3eff1f52fb5849cbf0f0b95515a61</id>
<content type='text'>
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 &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Wrap objects implementing the buffer protocol.</title>
<updated>2016-06-16T12:19:17Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-06-08T15:56:33Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=616929b6edf00b4a774b727385d39b785a112b90'/>
<id>urn:sha1:616929b6edf00b4a774b727385d39b785a112b90</id>
<content type='text'>
* lang/python/Makefile.am: Add the toplevel source directory to CFLAGS
when compiling the bindings so that we can use private header files.
* lang/python/gpgme.i (gpgme_data_t): Rework the object wrapping.  Do
not create a Python wrapper object, merely a gpgme_data_t object, and
keep references to buffer objects, if any.  If necessary, update the
buffer after the function call.
(pygpgme_wrap_gpgme_data_t): New function.
* lang/python/helpers.c (object_to_gpgme_data_t): Rework object
wrapping.  Also wrap objects implementing the buffer protocol.
* lang/python/helpers.h (object_to_gpgme_data_t): Update prototype.
(pygpgme_wrap_gpgme_data_t): New prototype.
* lang/python/tests/t-idiomatic.py: Demonstrate this.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
</feed>
