<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/lang/python/helpers.c, branch gpgme-2-base</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-2-base</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-2-base'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2025-02-03T10:19:09Z</updated>
<entry>
<title>python: Remove Python bindings</title>
<updated>2025-02-03T10:19:09Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2025-02-03T09:49:45Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=932caf37d36eca2caec59bf48bc505364a5765bb'/>
<id>urn:sha1:932caf37d36eca2caec59bf48bc505364a5765bb</id>
<content type='text'>
* README: Update.
* configure.ac: Remove checks, variables and file generations related to
the Python bindings. Remove python from available_languages and
default_languages.
* lang/Makefile.am (DIST_SUBDIRS): Remove python.
* lang/python: Remove.
* m4/ax_pkg_swig.m4, m4/ax_python_devel.m4, m4/python.m4: Remove.
--

The Python bindings have been moved to a separate Git repository:
gpgmepy.

GnuPG-bug-id: 7262

</content>
</entry>
<entry>
<title>python: Fix wrong use of write.</title>
<updated>2023-05-23T13:52:25Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2023-05-23T13:52:25Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=36a68bc5308c0b4a541ca6adea5d3635217e8af2'/>
<id>urn:sha1:36a68bc5308c0b4a541ca6adea5d3635217e8af2</id>
<content type='text'>
* lang/python/helpers.c (pyPassphraseCb): Use gpgme_io_writen.
(_gpg_interact_cb): Ditto.
* lang/python/helpers.h (write) [W32]: Remove bad write macro.
--
GnuPG-bug-id: T6501

Using write(2) without checking for EINTR is a not a good idea.
Futher gpgme_io_writen is the correct way to send data from a
callback.  This also fixed the wrong use of a simple macro for
Windows.
</content>
</entry>
<entry>
<title>spelling: fix misspellings</title>
<updated>2018-11-08T05:34:27Z</updated>
<author>
<name>Daniel Kahn Gillmor</name>
<email>dkg@fifthhorseman.net</email>
</author>
<published>2018-11-08T05:34:27Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=2557d0ae6ff0336b041129b7bf5c1e3a8c20a805'/>
<id>urn:sha1:2557d0ae6ff0336b041129b7bf5c1e3a8c20a805</id>
<content type='text'>
Signed-off-by: Daniel Kahn Gillmor &lt;dkg@fifthhorseman.net&gt;
</content>
</entry>
<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>
</feed>
