Python binding: import gpg -> ImportError: cannot import name 'gpgme' from partially initialized module 'gpg'

Johannes Schauer Marin Rodrigues <[email protected]>
Newsgroups gmane.comp.encryption.gpg.libgcrypt.devel
Message-ID <173686737613.15909.5406636995937562954@localhost>
Hi,

steps to reproduce:

python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install gpg
python3 -c "import gpg"

This will output:

Successfully built gpg
Installing collected packages: gpg
Successfully installed gpg-1.10.0
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/.venv/lib/python3.10/site-packages/gpg/__init__.py", line 101, in <module>
    from . import core
  File "/.venv/lib/python3.10/site-packages/gpg/core.py", line 34, in <module>
    from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/.venv/lib/python3.10/site-packages/gpg/__init__.py)

This is on Ubuntu Jammy. You can reproduce this in a clean chroot environment
with just python3-venv build-essential and libgpgme-dev installed on top of the
default package set.

I hope this is the right list for this issue and I hope maybe somebody can shed
some light on this situation. :)

Thanks!

cheers, josch

_______________________________________________
Gcrypt-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gcrypt-devel
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAmeGfi8ACgkQ8sulx4+9
g+Fr7A/+O0qKN4TThH/SbmM4RCqC0WExGHDzny6yNxGod82y/AEq3hAsniWyMoV4
VTDnZTRyQpxFcBH79IJq1hzvtw6wOYc+ECX5Kcpz/+x1PCJeWkgfcrBfetaCVWVY
51UG9PTuaQfc4VnVq3Q2Uf8HR85S/4srQqK4pOhvOkF7gbCwRiGHmhUtjX3I8Uif
Od79gqPh6lbEaSE1nnp9AOw+0YmptUHaQ0enAHT43v/uZ97PI22S8GnqTUg1euxn
4B2qxf3yLMnYdCjbkr8AntIqEv9rQo5KGXWOlUpcddtisqkr+RyHHnR/BeVpoo3D
4pHmbOFUun2mX6wiUGhbrYb2Hb2RAKvQzIvunh1tIK+Mu0axD2IaktSR4pQNfxfQ
7D+X8QpePXgAxb5RR42/ocLBB8FmpqNQ7T/Cj2JNC/4wd5eSEJe8LtA6h4GPZf+N
4ImOxcxcAkFi9Lf5LH4EKywjbobaNdmYHHFJVDhs1FfZ7YXiZudY19xORoqJTZyB
mOA1aZyDs7BruZs68+uIlEqSmAUkxvQJIChUGOTlq0031KPEyKuZrQeoiSphJJG2
hODV5UbDedfotx5zKu73uFeF+6/vf6/bMTTU6ZIV4WnS8xRDodYXgBPhTtTC+fMs
D04dWcKGkX4uMhGzkZKirdB1QbhkSD/AK3A9Ucdhmlez08a6jOo=
=9IuB
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.