<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/lang/python/helpers.c, branch gpgme-1.11.0</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.11.0</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.11.0'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2017-02-16T13:49:27Z</updated>
<entry>
<title>python: Fix passphrase callback wrapping.</title>
<updated>2017-02-16T13:49:27Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2017-02-16T13:49:27Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=3bdce4aa3ddd4a3f55b24678faf978d61daa8909'/>
<id>urn:sha1:3bdce4aa3ddd4a3f55b24678faf978d61daa8909</id>
<content type='text'>
* lang/python/helpers.c (pyPassphraseCb): Cope with 'passphrase_info'
being NULL.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Try to be more helpful when given a string to encrypt().</title>
<updated>2016-12-05T11:44:20Z</updated>
<author>
<name>Tobias Mueller</name>
<email>muelli@cryptobitch.de</email>
</author>
<published>2016-12-02T22:37:27Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=05896c210f7fa9ce7b97784a75e49dc4489e9252'/>
<id>urn:sha1:05896c210f7fa9ce7b97784a75e49dc4489e9252</id>
<content type='text'>
* lang/python/helpers.c (_gpg_obj2gpgme_data_t): Extended error
message.
* lang/python/tests/t-encrypt.py: Test for "encode" in error message.
--
The motivation is to help the user when encrypting fails. I claim that
it is not obvious to not being able to encrypt a string directly.  To
nudge the user into encoding it to bytes, the error message is a bit
extended.

Signed-off-by: Tobias Mueller &lt;muelli@cryptobitch.de&gt;
</content>
</entry>
<entry>
<title>python: Rename Python module from PyME to gpg.</title>
<updated>2016-10-31T14:42:27Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2016-10-28T20:45:49Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=2fac017618a76882605125b05ff1f7393fe99860'/>
<id>urn:sha1:2fac017618a76882605125b05ff1f7393fe99860</id>
<content type='text'>
This follows weeks of discussion on the gnupg-devel mailing list.
Hopefully it will make it easier for people using Python to use GnuPG
in the future.

Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<entry>
<title>python: Include 'config.h'.</title>
<updated>2016-09-26T14:54:57Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-09-26T09:35:40Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=3703a4723899d7563937b4b99f5bbe4dd8d3dfed'/>
<id>urn:sha1:3703a4723899d7563937b4b99f5bbe4dd8d3dfed</id>
<content type='text'>
* lang/python/Makefile.am: Pass 'top_builddir' to 'setup.py'.
* lang/python/gpgme.i: Include 'config.h'.
* lang/python/helpers.c: Likewise.
* lang/python/helpers.h: Likewise.
* lang/python/setup.py.in: Make sure that 'config.h' can be found.
--
Fixes build on 32 bit platforms with large file support.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Release the GIL during calls into GPGME.</title>
<updated>2016-09-16T13:56:47Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-09-16T10:32:24Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=6af7bee076bacbc0cdfe7de342bce43ca5671b3b'/>
<id>urn:sha1:6af7bee076bacbc0cdfe7de342bce43ca5671b3b</id>
<content type='text'>
* lang/python/helpers.c (pyme_raise_callback_exception): Re-acquire
the Global Interpreter Lock.
(pyPassphraseCb, pyme_set_passphrase_cb, pyProgressCb,
pyme_set_progress_cb, pyStatusCb, pyme_set_status_cb,
_pyme_interact_cb, pyDataReadCb, pyDataWriteCb, pyDataSeekCb,
pyDataReleaseCb, pyme_data_new_from_cbs, _pyme_assuan_data_cb,
_pyme_assuan_inquire_cb, _pyme_assuan_status_cb): Likewise.
* lang/python/setup.py.in: Make 'gpgme-config' emit the correct
cflags, and SWIG generate code to release the GIL before calling us.

Co-authored-by: Kai Michaelis &lt;kai@gnupg.org&gt;
Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Adapt to 'gpgme_op_interact'.</title>
<updated>2016-09-16T12:56:29Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-09-16T12:56:29Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=a458e7fe2006d92bd5a838e2747fb66bbac4b1b8'/>
<id>urn:sha1:a458e7fe2006d92bd5a838e2747fb66bbac4b1b8</id>
<content type='text'>
* lang/python/examples/inter-edit.py: Update example.
* lang/python/gpgme.i (gpgme_edit_cb_t): Turn into
'gpgme_interact_cb_t'.
* lang/python/helpers.c (_pyme_edit_cb): Turn into
'_pyme_interact_cb_t'.
* lang/python/private.h (_pyme_edit_cb): Likewise.
* lang/python/pyme/constants/__init__.py: Replace numeric status codes
with the keywords.
* lang/python/pyme/constants/status.py: Likewise.
* lang/python/pyme/core.py (Context.interact): New method.
(Context.op_edit): Deprecate, update docstring, implement using
Context.interact.
* lang/python/tests/t-edit.py: Test both interfaces.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Handle slight differences between Python 2 and 3.</title>
<updated>2016-09-13T11:29:43Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-09-13T08:44:14Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=70a3be27a509a1b5ea7372bee93d83c5019427ff'/>
<id>urn:sha1:70a3be27a509a1b5ea7372bee93d83c5019427ff</id>
<content type='text'>
* lang/python/helpers.c (pyDataWriteCb): Handle Python integers being
returned on Python 2.
(pyDataSeekCb): Likewise.
* lang/python/pyme/core.py (Data.__init__): Fix testing for string
argument.
(Data.new_from_filepart): Likewise.
* lang/python/pyme/util.py (is_a_string): New function.
* lang/python/tests/t-encrypt-large.py (read_cb): Force evaluation of
generator.
* lang/python/tests/t-idiomatic.py: Partly skip test on Python 2.
* lang/python/tests/t-verify.py (check_result): Here, the difference
between 2 and 3 really matters.  We cannot change the char *
conversion in Python 2 without breaking all existing applications, and
using bytestrings in Python 3 would be very inconvenient.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Fix types and error handling.</title>
<updated>2016-09-13T11:29:43Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-09-13T11:25:15Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=4abff7d750a1abf5b388a4c87ec321fc3e4aed10'/>
<id>urn:sha1:4abff7d750a1abf5b388a4c87ec321fc3e4aed10</id>
<content type='text'>
* lang/python/helpers.c (_pyme_edit_cb): Drop the const.
(_pyme_assuan_{data,inquire,status}_cb): Fix error handling.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Make type translation compatible with Python 2.7.</title>
<updated>2016-09-12T15:11:19Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-09-12T15:11:19Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=1d5bbbf1185a0d1f82750f10b69dad3999f7ef4c'/>
<id>urn:sha1:1d5bbbf1185a0d1f82750f10b69dad3999f7ef4c</id>
<content type='text'>
* lang/python/gpgme.i: Avoid functions not available in Python 2.7.
* lang/python/helpers.c: Likewise.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Add a flag identifying in-tree builds.</title>
<updated>2016-08-02T16:45:10Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2016-08-02T16:45:10Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=4c8265d32ddff5960a464b8d4e8d7d2258495b2e'/>
<id>urn:sha1:4c8265d32ddff5960a464b8d4e8d7d2258495b2e</id>
<content type='text'>
* lang/python/helpers.c (pyme_in_tree_build): New variable.
* lang/python/helpers.h (pyme_in_tree_build): New declaration.
* lang/python/pyme/version.py.in (in_tree_build): New variable.
* lang/python/setup.py.in: Rework macro handling, set 'IN_TREE_BUILD'
as appropriate.

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