After update from gnupg 2.1.12 to 2.1.13 pygpgme/gpgme/components which uses
those started failing with "General error" and "Bad file descriptor" on
gpgme_op_edit(). Looks like this is not problem of gpgme as I tried 1.4.3 and 1.6.0.
Attaching log which I got by setting GPGME_DEBUG=9