I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
install .whl file in </install/prefix>
run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
Here is pytest output:
```console
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-persistent-4.9.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-persistent-4.9.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
==================================================================== test session starts =====================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/persistent-4.9.0
collected 0 items / 9 errors
=========================================================================== ERRORS ===========================================================================
___________________________________________________ ERROR collecting src/persistent/tests/test__compat.py ____________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/tests/test__compat.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
src/persistent/__init__.py:36: in
from persistent import picklecache as _picklecache
src/persistent/picklecache.py:30: in
from persistent.ring import Ring
src/persistent/ring.py:22: in
from persistent import _ring
E ImportError: cannot import name '_ring' from partially initialized module 'persistent' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/__init__.py)
_____________________________________________________ ERROR collecting src/persistent/tests/test_docs.py _____________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/tests/test_docs.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
src/persistent/__init__.py:36: in
from persistent import picklecache as _picklecache
src/persistent/picklecache.py:30: in
from persistent.ring import Ring
src/persistent/ring.py:22: in
from persistent import _ring
E ImportError: cannot import name '_ring' from partially initialized module 'persistent' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/__init__.py)
_____________________________________________________ ERROR collecting src/persistent/tests/test_list.py _____________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/tests/test_list.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
src/persistent/__init__.py:36: in
from persistent import picklecache as _picklecache
src/persistent/picklecache.py:30: in
from persistent.ring import Ring
src/persistent/ring.py:22: in
from persistent import _ring
E ImportError: cannot import name '_ring' from partially initialized module 'persistent' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/__init__.py)
___________________________________________________ ERROR collecting src/persistent/tests/test_mapping.py ____________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/tests/test_mapping.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
src/persistent/__init__.py:36: in
from persistent import picklecache as _picklecache
src/persistent/picklecache.py:30: in
from persistent.ring import Ring
src/persistent/ring.py:22: in
from persistent import _ring
E ImportError: cannot import name '_ring' from partially initialized module 'persistent' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/__init__.py)
_________________________________________________ ERROR collecting src/persistent/tests/test_persistence.py __________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/tests/test_persistence.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
src/persistent/__init__.py:36: in
from persistent import picklecache as _picklecache
src/persistent/picklecache.py:30: in
from persistent.ring import Ring
src/persistent/ring.py:22: in
from persistent import _ring
E ImportError: cannot import name '_ring' from partially initialized module 'persistent' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/__init__.py)
_________________________________________________ ERROR collecting src/persistent/tests/test_picklecache.py __________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/tests/test_picklecache.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
src/persistent/__init__.py:36: in
from persistent import picklecache as _picklecache
src/persistent/picklecache.py:30: in
from persistent.ring import Ring
src/persistent/ring.py:22: in
from persistent import _ring
E ImportError: cannot import name '_ring' from partially initialized module 'persistent' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/__init__.py)
_____________________________________________________ ERROR collecting src/persistent/tests/test_ring.py _____________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/tests/test_ring.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
src/persistent/__init__.py:36: in
from persistent import picklecache as _picklecache
src/persistent/picklecache.py:30: in
from persistent.ring import Ring
src/persistent/ring.py:22: in
from persistent import _ring
E ImportError: cannot import name '_ring' from partially initialized module 'persistent' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/__init__.py)
__________________________________________________ ERROR collecting src/persistent/tests/test_timestamp.py ___________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/tests/test_timestamp.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
src/persistent/__init__.py:36: in
from persistent import picklecache as _picklecache
src/persistent/picklecache.py:30: in
from persistent.ring import Ring
src/persistent/ring.py:22: in
from persistent import _ring
E ImportError: cannot import name '_ring' from partially initialized module 'persistent' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/__init__.py)
_____________________________________________________ ERROR collecting src/persistent/tests/test_wref.py _____________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/tests/test_wref.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
src/persistent/__init__.py:36: in
from persistent import picklecache as _picklecache
src/persistent/picklecache.py:30: in
from persistent.ring import Ring
src/persistent/ring.py:22: in
from persistent import _ring
E ImportError: cannot import name '_ring' from partially initialized module 'persistent' (most likely due to a circular import) (/home/tkloczko/rpmbuild/BUILD/persistent-4.9.0/src/persistent/__init__.py)
================================================================== short test summary info ===================================================================
ERROR src/persistent/tests/test__compat.py
ERROR src/persistent/tests/test_docs.py
ERROR src/persistent/tests/test_list.py
ERROR src/persistent/tests/test_mapping.py
ERROR src/persistent/tests/test_persistence.py
ERROR src/persistent/tests/test_picklecache.py
ERROR src/persistent/tests/test_ring.py
ERROR src/persistent/tests/test_timestamp.py
ERROR src/persistent/tests/test_wref.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 9 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================== 9 errors in 0.21s ======================================================================
```
I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesHere is pytest output: