[Zope-Checkins] SVN: Zope/branches/2.10/ - updated deprecation warnings

Yvo Schubbe y.2006_ at wcm-solutions.de
Thu Jun 22 09:03:28 EDT 2006


Log message for revision 68788:
  - updated deprecation warnings

Changed:
  U   Zope/branches/2.10/doc/CHANGES.txt
  U   Zope/branches/2.10/lib/python/OFS/Application.py

-=-
Modified: Zope/branches/2.10/doc/CHANGES.txt
===================================================================
--- Zope/branches/2.10/doc/CHANGES.txt	2006-06-22 12:59:55 UTC (rev 68787)
+++ Zope/branches/2.10/doc/CHANGES.txt	2006-06-22 13:03:27 UTC (rev 68788)
@@ -18,6 +18,10 @@
 
     Bugs Fixed
 
+      - OFS Application: Updated deprecation warnings.
+        Support for '__ac_permissions__' and 'meta_types' will be removed in
+        Zope 2.11, 'methods' support might remain longer.
+
       - Collector #2136: Map ResourceLockedError to the correct response code.
 
       - Collector #2016: DemoStorage couldn't wrap base storages without

Modified: Zope/branches/2.10/lib/python/OFS/Application.py
===================================================================
--- Zope/branches/2.10/lib/python/OFS/Application.py	2006-06-22 12:59:55 UTC (rev 68787)
+++ Zope/branches/2.10/lib/python/OFS/Application.py	2006-06-22 13:03:27 UTC (rev 68788)
@@ -795,7 +795,7 @@
                 warn('__init__.py of %s has a long deprecated '
                      '\'__ac_permissions__\' attribute. '
                      '\'__ac_permissions__\' will be ignored by '
-                     'install_product in Zope 2.10. Please use registerClass '
+                     'install_product in Zope 2.11. Please use registerClass '
                      'instead.' % product.__name__,
                      DeprecationWarning)
             for p in pgetattr(product, '__ac_permissions__', ()):
@@ -810,7 +810,7 @@
             if pgetattr(product, 'meta_types', None) is not None:
                 warn('__init__.py of %s has a long deprecated \'meta_types\' '
                      'attribute. \'meta_types\' will be ignored by '
-                     'install_product in Zope 2.10. Please use registerClass '
+                     'install_product in Zope 2.11. Please use registerClass '
                      'instead.' % product.__name__,
                      DeprecationWarning)
             for meta_type in pgetattr(product, 'meta_types', ()):
@@ -825,10 +825,12 @@
                 meta_types.append(meta_type)
 
             if pgetattr(product, 'methods', None) is not None:
-                warn('__init__.py of %s has a long deprecated \'methods\' '
-                     'attribute. \'methods\' will be ignored by '
-                     'install_product in Zope 2.10. Please use registerClass '
-                     'instead.' % product.__name__,
+                warn("__init__.py of %s has a long deprecated 'methods' "
+                     "attribute. 'methods' support might be removed in Zope "
+                     "2.11 or a later feature release. Please use the "
+                     "'legacy' argument of registerClass instead if the "
+                     "methods are constructors. Or refactor the product "
+                     "using adapters." % product.__name__,
                      DeprecationWarning)
             for name,method in pgetattr(
                 product, 'methods', {}).items():



More information about the Zope-Checkins mailing list