While updating dependencies for Zope I noticed that tons of tests do not import when using persistent version 6.2 instead of 6.1.1. The import failures happen on all Python versions on the GHA Windows and macOS runners and I can confirm these failures locally on macOS/arm64.
GHA test output: https://github.com/zopefoundation/Zope/actions/runs/18198493940
Example traceback:
Traceback (most recent call last):
File "/Users/runner/work/Zope/Zope/src/App/tests/testImageFile.py", line 7, in <module>
from Testing.ZopeTestCase.warnhook import WarningsHook
File "/Users/runner/work/Zope/Zope/src/Testing/ZopeTestCase/__init__.py", line 22, in <module>
from Testing.ZopeTestCase import ZopeLite as Zope2
File "/Users/runner/work/Zope/Zope/src/Testing/ZopeTestCase/ZopeLite.py", line 30, in <module>
import App.ProductContext # NOQA
File "/Users/runner/work/Zope/Zope/src/App/ProductContext.py", line 20, in <module>
from AccessControl.Permission import registerPermissions
File "/Users/runner/work/Zope/Zope/.tox/py39-universal2/lib/python3.9/site-packages/AccessControl/__init__.py", line 15, in <module>
from AccessControl.Implementation import setImplementation
File "/Users/runner/work/Zope/Zope/.tox/py39-universal2/lib/python3.9/site-packages/AccessControl/Implementation.py", line 106, in <module>
setImplementation(_default_implementation)
File "/Users/runner/work/Zope/Zope/.tox/py39-universal2/lib/python3.9/site-packages/AccessControl/Implementation.py", line 58, in setImplementation
from AccessControl import ImplC as impl
File "/Users/runner/work/Zope/Zope/.tox/py39-universal2/lib/python3.9/site-packages/AccessControl/ImplC.py", line 16, in <module>
from AccessControl.cAccessControl import PermissionRole
File "/Users/runner/work/Zope/Zope/.tox/py39-universal2/lib/python3.9/site-packages/AccessControl/SimpleObjectPolicies.py", line 48, in <module>
from BTrees.IIBTree import IIBTree
File "/Users/runner/work/Zope/Zope/.tox/py39-universal2/lib/python3.9/site-packages/BTrees/__init__.py", line 62, in <module>
mod = create_module(family)
File "/Users/runner/work/Zope/Zope/.tox/py39-universal2/lib/python3.9/site-packages/BTrees/_module_builder.py", line 229, in create_module
populate_module(vars(mod), key_type, val_type, iface, mod)
File "/Users/runner/work/Zope/Zope/.tox/py39-universal2/lib/python3.9/site-packages/BTrees/_module_builder.py", line 137, in populate_module
from ._base import _fix_pickle
File "/Users/runner/work/Zope/Zope/.tox/py39-universal2/lib/python3.9/site-packages/BTrees/_base.py", line 17, in <module>
from persistent import Persistent
File "/Users/runner/work/Zope/Zope/.tox/py39-universal2/lib/python3.9/site-packages/persistent/__init__.py", line 36, in <module>
from persistent import picklecache as _picklecache
File "/Users/runner/work/Zope/Zope/.tox/py39-universal2/lib/python3.9/site-packages/persistent/picklecache.py", line 29, in <module>
from persistent.ring import Ring
File "/Users/runner/work/Zope/Zope/.tox/py39-universal2/lib/python3.9/site-packages/persistent/ring.py", line 18, in <module>
from persistent import _ring
ImportError: cannot import name '_ring' from partially initialized module 'persistent' (most likely due to a circular import) (/Users/runner/work/Zope/Zope/.tox/py39-universal2/lib/python3.9/site-packages/persistent/__init__.py)
While updating dependencies for Zope I noticed that tons of tests do not import when using persistent version 6.2 instead of 6.1.1. The import failures happen on all Python versions on the GHA Windows and macOS runners and I can confirm these failures locally on macOS/arm64.
GHA test output: https://github.com/zopefoundation/Zope/actions/runs/18198493940
Example traceback: