[BUG] gpgme's python bindings no longer install after #4539
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
setuptools version
setuptools==73.0.1
Python version
python 3.12
OS
Gentoo Linux
Additional environment information
No response
Description
Recently, the https://packages.gentoo.org/packages/app-crypt/gpgme package in Gentoo started failing to run tests weirdly, and also fails at runtime.
Reported at https://forums.gentoo.org/viewtopic-t-1170670.html and verified locally, the error looks like this:
File "/usr/lib/python3.12/site-packages/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/usr/lib/python3.12/site-packages/gpg/__init__.py)
- the package should install gpg/gpgme.py, but does not
- gpgme.py is generated via SWIG
I performed a git bisect of setuptools:
0ab156c3e12054503a0dac0ce172e241262881f4 is the first bad commit
commit 0ab156c3e12054503a0dac0ce172e241262881f4
Merge: 54936c73b b7ee725f3
Author: Jason R. Coombs <jaraco@jaraco.com>
Date: Fri Aug 2 15:13:01 2024 -0400
Merge https://github.com/pypa/distutils
Expected behavior
gpgme should install all files.
How to Reproduce
In a gentoo container:
emerge --oneshot =setuptools-73.0.1USE=python FEATURES=test emerge --oneshot app-crypt/gpgme
Output
* python3_12: running distutils-r1_run_phase distutils-r1_python_compile
python3.12 setup.py build -j 8
Using gpgme.h from ../../src/gpgme.h
warning: build_py: byte-compiling is disabled, skipping.
>>> Source compiled.
>>> Test phase: app-crypt/gpgme-1.23.2
* base: running gpgme_src_test
[...]
* python3_12: running distutils-r1_run_phase python_test
make -j8 -O -C lang/python/tests check PYTHON=python3.12 PYTHONS=python3.12 TESTFLAGS=--python-libdir=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib
make: Entering directory '/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests'
echo no-force-v3-sigs > ./gpg.conf
echo default-key A0FF4590BB6122EDEF6E3C542D727CC768697734 >> ./gpg.conf
make: Leaving directory '/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests'
make: Entering directory '/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests'
echo pinentry-program /var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/tests/gpg/pinentry >gpg-agent.conf
echo disable-scdaemon >> gpg-agent.conf
make: Leaving directory '/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests'
make: Entering directory '/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests'
GNUPGHOME=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests LC_ALL=C GPG_AGENT_INFO= top_srcdir=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b srcdir=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests LD_LIBRARY_PATH="../../../src/.libs:" gpgconf --kill all
/usr/bin/mkdir -p ./private-keys-v1.d
for k in /var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/tests/gpg/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD /var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/tests/gpg/76F7E2B35832976B50A27A282D9B87E44577EB66 /var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/tests/gpg/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD /var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/tests/gpg/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F /var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/tests/gpg/7A030357C0F253A5BBCD282FFC4E521B37558F5C; do \
cp $k private-keys-v1.d/${k#/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/tests/gpg/}.key; \
done
echo x > ./gpg-sample.stamp
make: Leaving directory '/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests'
make: Entering directory '/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests'
GNUPGHOME=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests LC_ALL=C GPG_AGENT_INFO= top_srcdir=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b srcdir=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests LD_LIBRARY_PATH="../../../src/.libs:" gpg --batch --no-permission-warning \
--import /var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/tests/gpg/pubdemo.asc
gpg: Warning: using insecure memory!
gpg: keybox '/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests/pubring.kbx' created
gpg: /var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests/trustdb.gpg: trustdb created
gpg: key 2D727CC768697734: public key "Alfa Test (demo key) <alfa@example.net>" imported
gpg: key FE180B1DA9E3B0B2: public key "Bob (demo key)" imported
gpg: key 413F4AF31AFDAB6C: public key "Charlie Test (demo key) <charlie@example.net>" imported
gpg: key EBA9F240EB9DC9E6: public key "Delta Test (demo key) <delta@example.net>" imported
gpg: key 318C1FAEFAEF6D1B: public key "Echelon (demo key)" imported
gpg: key D4BF57F37372E243: public key "Foxtrot Test (demo key) <foxtrot@example.net>" imported
gpg: key 168410A48FC282E6: public key "Golf Test (demo key) <golf@example.net>" imported
gpg: key 13DB965534C6E3F1: public key "Hotel Test (demo key) <hotel@example.net>" imported
gpg: key 1FE8FC6F04259677: public key "India Test (demo key) <india@example.net>" imported
gpg: key 0C820C71D2699313: public key "Juliet Test (demo key) <juliet@example.net>" imported
gpg: key AD1B0FAD43C2D0C7: public key "Kilo Test (demo key) <kilo@example.net>" imported
gpg: key 37CAB51FB79103F8: public key "Lima Test (demo key) <lima@example.net>" imported
gpg: key BE794852BE5CF886: public key "Mallory (demo key)" imported
gpg: key 25B00FD430CEC684: public key "November Test (demo key) <november@example.net>" imported
gpg: key 5F6356BA6D9732AC: public key "Oscar Test (demo key) <oscar@example.net>" imported
gpg: key 5D15E01D3FF13206: public key "Papa test (demo key) <papa@example.net>" imported
gpg: key 1C67EC133C661C84: public key "Quebec Test (demo key) <quebec@example.net>" imported
gpg: key 3BDBEDB1777FBED3: public key "Romeo Test (demo key) <romeo@example.net>" imported
gpg: key A5E67F7FA3AE3EA1: public key "Sierra Test (demo key) <sierra@example.net>" imported
gpg: key 58CB9A4C85A81F38: public key "Tango Test (demo key) <tango@example.net>" imported
gpg: key A94C0F75653244D6: public key "Uniform Test (demo key) <uniform@example.net>" imported
gpg: key 47AF4B6961F04784: public key "Victor Test (demo key) <victor@example.org>" imported
gpg: key DEF0F7B8EC67DBDE: public key "Whisky Test (demo key) <whisky@example.net>" imported
gpg: key 8979A6C5567FB34A: public key "XRay Test (demo key) <xray@example.net>" imported
gpg: key 9EEF34CD4B11B25F: public key "Yankee Test (demo key) <yankee@example.net>" imported
gpg: key 6BC4778054ACD246: public key "Zulu Test (demo key) <zulu@example.net>" imported
gpg: Total number processed: 26
gpg: imported: 26
GNUPGHOME=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests LC_ALL=C GPG_AGENT_INFO= top_srcdir=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b srcdir=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests LD_LIBRARY_PATH="../../../src/.libs:" gpg --batch --no-permission-warning \
--import /var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/tests/gpg/secdemo.asc
gpg: Warning: using insecure memory!
gpg: key 2D727CC768697734: "Alfa Test (demo key) <alfa@example.net>" 1 new signature
gpg: key 2D727CC768697734: secret key imported
gpg: key 6BC4778054ACD246: "Zulu Test (demo key) <zulu@example.net>" 1 new signature
gpg: key 6BC4778054ACD246: secret key imported
gpg: Total number processed: 2
gpg: new signatures: 2
gpg: secret keys read: 2
gpg: secret keys unchanged: 2
GNUPGHOME=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests LC_ALL=C GPG_AGENT_INFO= top_srcdir=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b srcdir=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests LD_LIBRARY_PATH="../../../src/.libs:" gpgconf --kill all
echo x > ./pubring-stamp
make: Leaving directory '/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests'
make all-am
make[1]: Nothing to be done for 'all-am'.
make: Entering directory '/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests'
GNUPGHOME=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests LC_ALL=C GPG_AGENT_INFO= top_srcdir=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b srcdir=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests LD_LIBRARY_PATH="../../../src/.libs:" python3.12 /var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/run-tests.py \
--interpreters="python3.12" --srcdir=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests --python-libdir=/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib \
initial.py t-wrapper.py t-callbacks.py t-data.py t-encrypt.py t-encrypt-sym.py t-encrypt-sign.py t-sign.py t-signers.py t-decrypt.py t-verify.py t-decrypt-verify.py t-sig-notation.py t-export.py t-import.py t-edit.py t-keylist.py t-keylist-from-data.py t-wait.py t-encrypt-large.py t-file-name.py t-idiomatic.py t-protocol-assuan.py t-quick-key-creation.py t-quick-subkey-creation.py t-quick-key-manipulation.py t-quick-key-signing.py final.py
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/initial.py", line 24, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-wrapper.py", line 20, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-callbacks.py", line 24, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-data.py", line 25, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-encrypt.py", line 22, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-encrypt-sym.py", line 23, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-encrypt-sign.py", line 23, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-sign.py", line 23, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-signers.py", line 22, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-decrypt.py", line 22, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-verify.py", line 24, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-decrypt-verify.py", line 22, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-sig-notation.py", line 23, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-export.py", line 22, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-import.py", line 22, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-edit.py", line 25, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-keylist.py", line 22, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-keylist-from-data.py", line 22, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-wait.py", line 23, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-encrypt-large.py", line 24, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-file-name.py", line 23, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-idiomatic.py", line 26, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-protocol-assuan.py", line 22, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-quick-key-creation.py", line 22, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-quick-subkey-creation.py", line 22, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-quick-key-manipulation.py", line 23, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/t-quick-key-signing.py", line 22, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Traceback (most recent call last):
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b/lang/python/tests/final.py", line 24, in <module>
import support
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/gpgme-1.23.2/lang/python/tests/support.py", line 27, in <module>
import gpg
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py", line 123, in <module>
from . import core
File "/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/core.py", line 10, in <module>
from . import gpgme
ImportError: cannot import name 'gpgme' from partially initialized module 'gpg' (most likely due to a circular import) (/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base-python3_12/lib/gpg/__init__.py)
Running tests using python3.12 (3.12)...
FAIL: initial.py
FAIL: t-wrapper.py
FAIL: t-callbacks.py
FAIL: t-data.py
FAIL: t-encrypt.py
FAIL: t-encrypt-sym.py
FAIL: t-encrypt-sign.py
FAIL: t-sign.py
FAIL: t-signers.py
FAIL: t-decrypt.py
FAIL: t-verify.py
FAIL: t-decrypt-verify.py
FAIL: t-sig-notation.py
FAIL: t-export.py
FAIL: t-import.py
FAIL: t-edit.py
FAIL: t-keylist.py
FAIL: t-keylist-from-data.py
FAIL: t-wait.py
FAIL: t-encrypt-large.py
FAIL: t-file-name.py
FAIL: t-idiomatic.py
FAIL: t-protocol-assuan.py
FAIL: t-quick-key-creation.py
FAIL: t-quick-subkey-creation.py
FAIL: t-quick-key-manipulation.py
FAIL: t-quick-key-signing.py
FAIL: final.py
28 tests run, 0 succeeded, 28 failed, 0 skipped.
make: *** [Makefile:628: xcheck] Error 28
make: Leaving directory '/var/tmp/portage/app-crypt/gpgme-1.23.2/work/b-base/lang/python/tests'
* ERROR: app-crypt/gpgme-1.23.2::gentoo failed (test phase):
[...]
Full build log: build.log
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with setup.py and the SWIG-generated gpgme.py installation path, then inspect lang/python/tests and run-tests.py. Reproduce with the Gentoo commands using setuptools 73.0.1 and Python 3.12. Done means gpg/gpgme.py is installed and the Python test suite no longer fails on import.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100