[Zope-Checkins] SVN: Zope/trunk/src/Products/Five/form Use real deprecation for formlib, at some point we want to remove this code.
Hanno Schlichting
hannosch at hannosch.eu
Sat Dec 26 18:24:50 EST 2009
Log message for revision 107135:
Use real deprecation for formlib, at some point we want to remove this code.
Changed:
U Zope/trunk/src/Products/Five/form/__init__.py
U Zope/trunk/src/Products/Five/form/macros.py
U Zope/trunk/src/Products/Five/form/metaconfigure.py
U Zope/trunk/src/Products/Five/form/objectwidget.py
U Zope/trunk/src/Products/Five/formlib/formbase.py
-=-
Modified: Zope/trunk/src/Products/Five/form/__init__.py
===================================================================
--- Zope/trunk/src/Products/Five/form/__init__.py 2009-12-26 23:10:42 UTC (rev 107134)
+++ Zope/trunk/src/Products/Five/form/__init__.py 2009-12-26 23:24:49 UTC (rev 107135)
@@ -1,3 +1,6 @@
-# BBB
-from five.formlib import AddView
-from five.formlib import EditView
+from zope.deferredimport import deprecated
+
+deprecated("Please import from five.formlib",
+ AddView = 'five.formlib:AddView',
+ EditView = 'five.formlib:EditView',
+)
Modified: Zope/trunk/src/Products/Five/form/macros.py
===================================================================
--- Zope/trunk/src/Products/Five/form/macros.py 2009-12-26 23:10:42 UTC (rev 107134)
+++ Zope/trunk/src/Products/Five/form/macros.py 2009-12-26 23:24:49 UTC (rev 107135)
@@ -1,2 +1,5 @@
-# BBB
-from five.formlib.macros import FormMacros
+from zope.deferredimport import deprecated
+
+deprecated("Please import from five.formlib",
+ FormMacros = 'five.formlib.macros:FormMacros',
+)
Modified: Zope/trunk/src/Products/Five/form/metaconfigure.py
===================================================================
--- Zope/trunk/src/Products/Five/form/metaconfigure.py 2009-12-26 23:10:42 UTC (rev 107134)
+++ Zope/trunk/src/Products/Five/form/metaconfigure.py 2009-12-26 23:24:49 UTC (rev 107135)
@@ -1,6 +1,9 @@
-# BBB
-from five.formlib.metaconfigure import EditViewFactory
-from five.formlib.metaconfigure import FiveFormDirective
-from five.formlib.metaconfigure import EditFormDirective
-from five.formlib.metaconfigure import AddViewFactory
-from five.formlib.metaconfigure import AddFormDirective
+from zope.deferredimport import deprecated
+
+deprecated("Please import from five.formlib",
+ EditViewFactory = 'five.formlib.metaconfigure:EditViewFactory',
+ FiveFormDirective = 'five.formlib.metaconfigure:FiveFormDirective',
+ EditFormDirective = 'five.formlib.metaconfigure:EditFormDirective',
+ AddViewFactory = 'five.formlib.metaconfigure:AddViewFactory',
+ AddFormDirective = 'five.formlib.metaconfigure:AddFormDirective',
+)
Modified: Zope/trunk/src/Products/Five/form/objectwidget.py
===================================================================
--- Zope/trunk/src/Products/Five/form/objectwidget.py 2009-12-26 23:10:42 UTC (rev 107134)
+++ Zope/trunk/src/Products/Five/form/objectwidget.py 2009-12-26 23:24:49 UTC (rev 107135)
@@ -1,4 +1,7 @@
-# BBB
-from five.formlib.objectwidget import ObjectWidgetView
-from five.formlib.objectwidget import ObjectWidget
-from five.formlib.objectwidget import ObjectWidgetClass
+from zope.deferredimport import deprecated
+
+deprecated("Please import from five.formlib",
+ ObjectWidgetView = 'five.formlib.objectwidget:ObjectWidgetView',
+ ObjectWidget = 'five.formlib.objectwidget:ObjectWidget',
+ ObjectWidgetClass = 'five.formlib.objectwidget:ObjectWidgetClass',
+)
Modified: Zope/trunk/src/Products/Five/formlib/formbase.py
===================================================================
--- Zope/trunk/src/Products/Five/formlib/formbase.py 2009-12-26 23:10:42 UTC (rev 107134)
+++ Zope/trunk/src/Products/Five/formlib/formbase.py 2009-12-26 23:24:49 UTC (rev 107135)
@@ -1,20 +1,19 @@
-# BBB
-from five.formlib.formbase import _FORMLIB_DIR
-from five.formlib.formbase import _PAGEFORM_PATH
-from five.formlib.formbase import _SUBPAGEFORM_PATH
-from five.formlib.formbase import FiveFormlibMixin
-from five.formlib.formbase import FormBase
-from five.formlib.formbase import EditFormBase
-from five.formlib.formbase import DisplayFormBase
-from five.formlib.formbase import AddFormBase
-from five.formlib.formbase import PageForm
-from five.formlib.formbase import Form
-from five.formlib.formbase import PageEditForm
-from five.formlib.formbase import EditForm
-from five.formlib.formbase import PageDisplayForm
-from five.formlib.formbase import DisplayForm
-from five.formlib.formbase import PageAddForm
-from five.formlib.formbase import AddForm
-from five.formlib.formbase import SubPageForm
-from five.formlib.formbase import SubPageEditForm
-from five.formlib.formbase import SubPageDisplayForm
+from zope.deferredimport import deprecated
+
+deprecated("Please import from five.formlib",
+ FiveFormlibMixin = 'five.formlib.formbase:FiveFormlibMixin',
+ FormBase = 'five.formlib.formbase:FormBase',
+ EditFormBase = 'five.formlib.formbase:EditFormBase',
+ DisplayFormBase = 'five.formlib.formbase:DisplayFormBase',
+ AddFormBase = 'five.formlib.formbase:AddFormBase',
+ PageForm = 'five.formlib.formbase:PageForm',
+ PageEditForm = 'five.formlib.formbase:PageEditForm',
+ EditForm = 'five.formlib.formbase:EditForm',
+ PageDisplayForm = 'five.formlib.formbase:PageDisplayForm',
+ DisplayForm = 'five.formlib.formbase:DisplayForm',
+ PageAddForm = 'five.formlib.formbase:PageAddForm',
+ AddForm = 'five.formlib.formbase:AddForm',
+ SubPageForm = 'five.formlib.formbase:SubPageForm',
+ SubPageEditForm = 'five.formlib.formbase:SubPageEditForm',
+ SubPageDisplayForm = 'five.formlib.formbase:SubPageDisplayForm',
+)
More information about the Zope-Checkins
mailing list