<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/lang/python/gpgme.i, 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-12-04T07:10:06Z</updated>
<entry>
<title>python: Default whence argument for Data() to SEEK_SET.</title>
<updated>2017-12-04T07:10:06Z</updated>
<author>
<name>Tobias Mueller</name>
<email>muelli@cryptobitch.de</email>
</author>
<published>2017-08-22T15:48:25Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=3cf9aedc92b6c65d2cb34037e52b9a299637d03b'/>
<id>urn:sha1:3cf9aedc92b6c65d2cb34037e52b9a299637d03b</id>
<content type='text'>
* lang/python/gpgme.i: copied signature from gpgme.h and defaulted the
value to SEEK_SET.
* lang/python/tests/t-data.py: Added a test for no second argument
--

Having to import the os package when wanting to read a Data object is a
slight annoyance. With SWIG, we can define default parameters. This
change defaults the whence argument to SEEK_SET which is how StringIO
and BytesIO behave.

Signed-off-by: Tobias Mueller &lt;muelli@cryptobitch.de&gt;
</content>
</entry>
<entry>
<title>python: Wrap 'gpgme_op_keylist_from_data_start'.</title>
<updated>2017-03-21T11:55:33Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2017-03-21T11:32:31Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=f3e8d8a4518de2768692e0b392262d0da6d0fd84'/>
<id>urn:sha1:f3e8d8a4518de2768692e0b392262d0da6d0fd84</id>
<content type='text'>
* NEWS: Update.
* lang/python/gpg/core.py (Context.keylist): New keyword argument
'source'.  If given, list keys from 'source'.
* lang/python/gpgme.i: Wrap the argument to
'gpgme_op_keylist_from_data_start'.
* lang/python/tests/Makefile.am (py_tests): Add new test.
* lang/python/tests/support.py (EphemeralContext): Do not throw an
error if no agent has been started in the context.
* lang/python/tests/t-keylist-from-data.py: New file.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Support manipulating the TOFU policy.</title>
<updated>2017-02-17T16:08:03Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2017-02-17T16:07:05Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=15fbac9e72a4d1bff9a3b9e9822f9175b09fbcd5'/>
<id>urn:sha1:15fbac9e72a4d1bff9a3b9e9822f9175b09fbcd5</id>
<content type='text'>
* NEWS: Update.
* doc/gpgme.texi: Fix typos.
* lang/python/gpg/constants/__init__.py: Import new files.
* lang/python/gpg/constants/tofu/__init__.py: New file.
* lang/python/gpg/constants/tofu/policy.py: New file.
* lang/python/gpg/core.py (Context.key_tofu_policy): New function.
* lang/python/gpgme.i: Nice reprs for gpgme_tofu_info_t.
* lang/python/setup.py.in: Install new package.
* lang/python/tests/t-quick-key-manipulation.py: Extend test.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Fix error handling.</title>
<updated>2017-02-16T13:42:17Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2017-02-16T13:42:17Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=048c5f74b61d5e4fa7617ce7c9111c6754bd4409'/>
<id>urn:sha1:048c5f74b61d5e4fa7617ce7c9111c6754bd4409</id>
<content type='text'>
* lang/python/gpgme.i (typemap gpgme_key_t[]): Set an error if a
non-key element is discovered.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Wrap utility functions.</title>
<updated>2017-02-14T15:33:55Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2017-02-14T15:30:30Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=92adc9bbf640eb5d9177d3ba0189e0f6cee4e995'/>
<id>urn:sha1:92adc9bbf640eb5d9177d3ba0189e0f6cee4e995</id>
<content type='text'>
* NEWS: Update.
* lang/python/gpg/core.py (pubkey_algo_string): New function.
(pubkey_algo_name): Add docstring.
(hash_algo_name): Likewise.
(get_protocol_name): Likewise.
(addrspec_from_uid): New function.
* lang/python/gpgme.i (gpgme_pubkey_algo_string): Result must be
freed.
(gpgme_addrspec_from_uid): Likewise.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Use the correct function to free buffers.</title>
<updated>2017-02-14T15:33:54Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2017-02-14T15:16:05Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=9fc9533c2835ec53c4fd4f822b09e9fec14626d0'/>
<id>urn:sha1:9fc9533c2835ec53c4fd4f822b09e9fec14626d0</id>
<content type='text'>
* lang/python/gpgme.i (char *): Free using 'gpgme_free'.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Nicer repr for user ids.</title>
<updated>2017-02-14T15:33:37Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@g10code.com</email>
</author>
<published>2017-02-14T14:55:20Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=e17ab84129045512cf60c221ee43aa877507662f'/>
<id>urn:sha1:e17ab84129045512cf60c221ee43aa877507662f</id>
<content type='text'>
* lang/python/gpgme.i (_gpgme_user_id): Provide a nicer repr() for
user ids.

Signed-off-by: Justus Winter &lt;justus@g10code.com&gt;
</content>
</entry>
<entry>
<title>python: Extend SWIG gpgme_{sub,}key with a __repr__ method.</title>
<updated>2017-02-14T10:19:50Z</updated>
<author>
<name>Tobias Mueller</name>
<email>muelli@cryptobitch.de</email>
</author>
<published>2016-12-20T17:02:36Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=01d5c17587578c729bbbb60f8a65635975e35592'/>
<id>urn:sha1:01d5c17587578c729bbbb60f8a65635975e35592</id>
<content type='text'>
* lang/python/gpgme.i: Added a genericrepr macro and use it for
gpgme_key, gpgme_subkey, and gpgme_key_sig.
--

To look nicer in Python's REPL.

We define a generic __repr__ as a SWIG macro and use that to extend some
defined SWIG objects.

The alternative would have been to write a custom __repr__ function for
each class but that would need to be changed everytime the object's
structure changes. The bindings should be easy to maintain, I guess.
This comes at the expense that the reprs are now relatively long and
contain, for example, both keyid and fingerprint.

Signed-off-by: Tobias Mueller &lt;muelli@cryptobitch.de&gt;
</content>
</entry>
<entry>
<title>python: Call SWIG_NewPointerObj rather than SWIG_Python_NewPointerObj.</title>
<updated>2017-02-14T10:19:17Z</updated>
<author>
<name>Tobias Mueller</name>
<email>muelli@cryptobitch.de</email>
</author>
<published>2016-12-20T17:01:27Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=d35651917097ae2eee7d52396d53d010bc34df19'/>
<id>urn:sha1:d35651917097ae2eee7d52396d53d010bc34df19</id>
<content type='text'>
* lang/python/gpgme.i (pygpgme_wrap_gpgme_data_t): Provide a "self"
variable for SWIG_NewPointerObj and call SWIG_NewPointerObj rather than
SWIG_Python_NewPointerObj.
--

SWIG_Python_NewPointerObj seems to be an implementation detail, because
SWIG's documentation does not mention that function at all.  In fact,
SWIG_NewPointerObj is a call to SWIG_Python_NewPointerObj with the first
parameter being either NULL or the "self" variable, depending on whether
SWIG is called with the -builtin flag.  So far, the first parameter was
hard-coded to NULL.  This change also hard-codes it to NULL but makes
it more explicit.  The benefit is that the documented function is being
used and that compilation works regardless of the -builtin flag.

Partially reverts: 856bcfe2934237011984fab0bc69800a7c25c34b

Signed-off-by: Tobias Mueller &lt;muelli@cryptobitch.de&gt;
</content>
</entry>
<entry>
<title>python: default op_keylist_start parameters.</title>
<updated>2017-01-25T16:47:35Z</updated>
<author>
<name>Tobias Mueller</name>
<email>muelli@cryptobitch.de</email>
</author>
<published>2016-12-03T22:12:37Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=9291ebaa4151a1f6c8c0601095ec45809b963383'/>
<id>urn:sha1:9291ebaa4151a1f6c8c0601095ec45809b963383</id>
<content type='text'>
* lang/python/gpgme.i: Added gpgme_op_keylist_start with defaults
* lang/python/tests/t-keylist.py: Added tests for default parameters
--

To increase the ease of use, op_keylist_start
parameters default to sensible values.
The empty string matches all keys.
We assume that the user wants to retrieve public keys most of the time,
so we default to public keys rather than secret keys.

Signed-off-by: Tobias Mueller &lt;muelli@cryptobitch.de&gt;
</content>
</entry>
</feed>
