-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
When we look up for adapters:
zope.interface/src/zope/interface/adapter.py
Line 818 in 405017f
byorder = registry._adapters |
We might have:
- a closed connection
- and a persistent adapter registry
See:
(Pdb++) self._registry.ro[0]
<zope.component.persistentregistry.PersistentAdapterRegistry object at 0x7fcbd097b3f0 oid 0x969d3f9388a51b2 in <Connection at 7fcbd22f1010>>
(Pdb++) self._registry.ro[0]._subscribers.__class__
<class 'persistent.list.PersistentList'>
This causes the _uncached_subscriptions
to raise a ConnectionStateError
.
The issue happens since zope.component
5, before the persistent adapter registry was storing a list
, see:
What would be the best way to handle this issue?
Adding a:
try:
...
except ConnectionStateError:
continue
might be an idea?
Originally discovered while debugging:
What version of Python and Zope/Addons I am using:
Tested on Plone 6 with:
- Python 3.8 and Python 3.11
- zope.interface 6.0
- zope.component 5.1.0
Metadata
Metadata
Assignees
Labels
No labels