Fails with "module object for 'cryptography.utils' substituted in sys.modules during a lazy load"
I installed mercurial using pipx install and inject.
$ pipx runpip mercurial freeze
cffi==1.14.5
cryptography==3.4.5
jeepney==0.6.0
keyring==22.0.1
mercurial==5.7
mercurial-extension-utils==1.5.1
mercurial-keyring==1.3.1
pycparser==2.20
SecretStorage==3.3.1
Keyring works fine when tested directly with $ [...env...]/python -m keyring set/get/del
but hg fails with
keyring: keyring backend doesn't seem to work, password can not be restored. Falling back to prompts. Error details: module object for 'cryptography.utils' substituted in sys.modules during a lazy load