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

Yvo Schubbe y.2006_ at wcm-solutions.de
Thu Jun 22 08:59:56 EDT 2006


Log message for revision 68787:
  - updated deprecation warnings

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

-=-
Modified: Zope/branches/2.9/doc/CHANGES.txt
===================================================================
--- Zope/branches/2.9/doc/CHANGES.txt	2006-06-22 11:22:33 UTC (rev 68786)
+++ Zope/branches/2.9/doc/CHANGES.txt	2006-06-22 12:59:55 UTC (rev 68787)
@@ -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 #2109: XML-RPC did not handle DateTime.DateTime objects.

Modified: Zope/branches/2.9/lib/python/OFS/Application.py
===================================================================
--- Zope/branches/2.9/lib/python/OFS/Application.py	2006-06-22 11:22:33 UTC (rev 68786)
+++ Zope/branches/2.9/lib/python/OFS/Application.py	2006-06-22 12:59:55 UTC (rev 68787)
@@ -798,7 +798,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__', ()):
@@ -813,7 +813,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', ()):
@@ -828,10 +828,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