Removed DocFieldProperty class
authorThierry Florac <thierry.florac@onf.fr>
Thu, 12 Apr 2018 11:23:17 +0200
changeset 52 d078dab8ecd0
parent 51 3881fc92a30a
child 53 9b87ac9dff97
Removed DocFieldProperty class
src/pyams_alchemy/engine.py
--- a/src/pyams_alchemy/engine.py	Thu Apr 12 10:06:08 2018 +0200
+++ b/src/pyams_alchemy/engine.py	Thu Apr 12 11:23:17 2018 +0200
@@ -34,7 +34,6 @@
 # import packages
 from persistent import Persistent
 from persistent.dict import PersistentDict
-from pyams_utils.property import DocFieldProperty
 from pyams_utils.registry import query_utility
 from pyams_utils.request import check_request, get_request_data, set_request_data
 from pyams_utils.vocabulary import vocabulary_config
@@ -42,6 +41,7 @@
 from zope.componentvocabulary.vocabulary import UtilityVocabulary
 from zope.container.contained import Contained
 from zope.interface import implementer
+from zope.schema.fieldproperty import FieldProperty
 from zope.sqlalchemy.datamanager import _SESSION_STATE, STATUS_READONLY, STATUS_ACTIVE, \
     ZopeTransactionExtension, join_transaction
 
@@ -106,15 +106,15 @@
 class AlchemyEngineUtility(object):
     """SQLAlchemy engine utility"""
 
-    name = DocFieldProperty(IAlchemyEngineUtility['name'])
-    dsn = DocFieldProperty(IAlchemyEngineUtility['dsn'])
-    echo = DocFieldProperty(IAlchemyEngineUtility['echo'])
-    use_pool = DocFieldProperty(IAlchemyEngineUtility['use_pool'])
-    pool_size = DocFieldProperty(IAlchemyEngineUtility['pool_size'])
-    pool_recycle = DocFieldProperty(IAlchemyEngineUtility['pool_recycle'])
-    echo_pool = DocFieldProperty(IAlchemyEngineUtility['echo_pool'])
-    encoding = DocFieldProperty(IAlchemyEngineUtility['encoding'])
-    convert_unicode = DocFieldProperty(IAlchemyEngineUtility['convert_unicode'])
+    name = FieldProperty(IAlchemyEngineUtility['name'])
+    dsn = FieldProperty(IAlchemyEngineUtility['dsn'])
+    echo = FieldProperty(IAlchemyEngineUtility['echo'])
+    use_pool = FieldProperty(IAlchemyEngineUtility['use_pool'])
+    pool_size = FieldProperty(IAlchemyEngineUtility['pool_size'])
+    pool_recycle = FieldProperty(IAlchemyEngineUtility['pool_recycle'])
+    echo_pool = FieldProperty(IAlchemyEngineUtility['echo_pool'])
+    encoding = FieldProperty(IAlchemyEngineUtility['encoding'])
+    convert_unicode = FieldProperty(IAlchemyEngineUtility['convert_unicode'])
 
     def __init__(self, name='', dsn='', echo=False, use_pool=True, pool_size=25, pool_recycle=-1, echo_pool=False,
                  encoding='utf-8', convert_unicode=False, **kwargs):