Works with 2.7, but fails on 3.6 with "gpg: no valid OpenPGP data found". It appears to come down to how _write_passphrase sends the passphrase into gpg. Looking at strace output comparisons between 2.7 and 3.6 shows that the passphrase is written with extra characters in 3.6 (assuming this is a result of being encoded).
2.7 strace snippet (7917 is PID of python calling gpg as PID 7921):
Yes,
this is similar to #102 , but that has languished for 2 years.
Using the following sample program:
Works with 2.7, but fails on 3.6 with "gpg: no valid OpenPGP data found". It appears to come down to how _write_passphrase sends the passphrase into gpg. Looking at strace output comparisons between 2.7 and 3.6 shows that the passphrase is written with extra characters in 3.6 (assuming this is a result of being encoded).
2.7 strace snippet (7917 is PID of python calling gpg as PID 7921):
3.6 strace snippet (7908 is PID of python calling gpg as PID):