connect_and_authenticate() fails when run under sudo --preserve-env
Context can be read at https://github.com/mitya57/secretstorage/issues/22 and https://bugzilla.redhat.com/show_bug.cgi?id=1809631. Basically if you have a script a.py that runs another script b.py via subprocess with a sudo --preseve-env, the subsequent invocation of connect_and_authenticate() fails. Under CentOS8, this is a silent hang. I've reproduced a similar issue under Fedora 31 in which this results in a Connection reset by peer.
This can be hit just by having two script that have 'import keyring'.