python GPGME bindings and key signatures

brent s. bts at
Mon Nov 5 06:20:55 CET 2018

i frequently do work with the GPGME bindings for python (is this still
referred to as "pyME" after the merge into mainline?), and i really must
start by saying thank you to whomever maintains it!

i do have a quick question as i'm not sure it's something expected or not.

it seems the signatures interface is obsolete[0].

it seems that the non-obsolete way of accessing this is in
gpgme_user_id_t's `signatures` member[1] (or
<key>.uids[<idx>].signatures per the bindings).

however, this is empty in python's bindings:

>>> import os
>>> os.environ['GNUPGHOME']
>>> import gpg
>>> ctx = gpg.Context()
>>> k = ctx.get_key('C548200C7F6AA9541F6EDFF65A6D013706B6BE26')
>>> k.uids[0].signatures

whereas signatures most definitely do exist:

[bts at cylon gpg]$ echo $GNUPGHOME
[bts at cylon gpg]$ gpg --list-keys --with-sig-check
pub   rsa4096 2012-10-30 [SC]
uid           [  full  ] A Test Key for Expiring, delete when done
(1351649839.474725) <test2 at>
sig!3        5A6D013706B6BE26 2012-10-30  A Test Key for Expiring,
delete when done (1351649839.474725) <test2 at>
sig!         33F7494F9AF6E3D1 2018-11-04  A Test Key (a comment)
<test at>
sig!       2 33F7494F9AF6E3D1 2018-11-05  A Test Key (a comment)
<test at>
sub   rsa4096 2012-10-30 [S]
sig!         5A6D013706B6BE26 2012-10-30  A Test Key for Expiring,
delete when done (1351649839.474725) <test2 at>

gpg: 4 good signatures

is this intentional/known behaviour? did i do a goof?

if the former, is there an expected ETA on support for this?
if the latter, is there a certain constant that needs to be set for the
context first or something; how can i implement key signature listing?



brent saner
GPG info:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Gnupg-devel mailing list