diff -r b4b587dd45ca -r a08e9a1c5b07 src/ztfy/utils/zodb.py --- a/src/ztfy/utils/zodb.py Thu Sep 20 17:06:22 2012 +0200 +++ b/src/ztfy/utils/zodb.py Thu Sep 20 19:13:01 2012 +0200 @@ -17,11 +17,12 @@ # import standard packages from persistent import Persistent +from persistent.interfaces import IPersistent +from transaction.interfaces import ITransactionManager # import Zope3 interfaces -from persistent.interfaces import IPersistent -from transaction.interfaces import ITransactionManager from ZODB.interfaces import IConnection +from zope.schema.interfaces import IVocabularyFactory # import local interfaces from ztfy.utils.interfaces import IZEOConnection @@ -30,8 +31,9 @@ from ZEO import ClientStorage from ZODB import DB from zope.component import adapter +from zope.componentvocabulary.vocabulary import UtilityVocabulary from zope.container.contained import Contained -from zope.interface import implementer, implements +from zope.interface import implementer, implements, classProvides from zope.schema.fieldproperty import FieldProperty # import local packages @@ -65,6 +67,14 @@ """Persistent ZEO connection settings utility""" +class ZEOConnectionVocabulary(UtilityVocabulary): + """ZEO connections vocabulary""" + + classProvides(IVocabularyFactory) + + interface = IZEOConnection + nameOnly = True + # IPersistent adapters copied from zc.twist package # also register this for adapting from IConnection