[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/ Added
missing backward compatibility for things that weren't
Jim Fulton
jim at zope.com
Tue Apr 25 17:06:07 EDT 2006
Log message for revision 67610:
Added missing backward compatibility for things that weren't
completely deprecated before.
Changed:
U Zope3/branches/jim-adapter/src/zope/app/component/metaconfigure.py
A Zope3/branches/jim-adapter/src/zope/app/utility/
A Zope3/branches/jim-adapter/src/zope/app/utility/__init__.py
A Zope3/branches/jim-adapter/src/zope/app/utility/interfaces.py
A Zope3/branches/jim-adapter/src/zope/app/utility/utility.py
A Zope3/branches/jim-adapter/src/zope/app/utility/vocabulary.py
U Zope3/branches/jim-adapter/src/zope/component/__init__.py
A Zope3/branches/jim-adapter/src/zope/component/back35.py
U Zope3/branches/jim-adapter/src/zope/component/tests.py
-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/component/metaconfigure.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/metaconfigure.py 2006-04-25 19:45:55 UTC (rev 67609)
+++ Zope3/branches/jim-adapter/src/zope/app/component/metaconfigure.py 2006-04-25 21:06:04 UTC (rev 67610)
@@ -27,9 +27,19 @@
from zope.configuration.exceptions import ConfigurationError
from zope.security.checker import CheckerPublic
from zope.security.checker import Checker, NamesChecker
+import zope.deferredimport
PublicPermission = 'zope.Public'
+zope.deferredimport.deprecatedFrom(
+ "Moved to zope.component.zcml. Importing from here will stop working "
+ "in Zope 3.5",
+ "zope.component.zcml",
+ "handler", "adapter", "subscriber", "utility", "interface",
+ )
+
+
+
# BBB 2006/02/24, to be removed after 12 months
def factory(_context, component, id, title=None, description=None):
try:
Added: Zope3/branches/jim-adapter/src/zope/app/utility/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/utility/__init__.py 2006-04-25 19:45:55 UTC (rev 67609)
+++ Zope3/branches/jim-adapter/src/zope/app/utility/__init__.py 2006-04-25 21:06:04 UTC (rev 67610)
@@ -0,0 +1,31 @@
+##############################################################################
+#
+# Copyright (c) 2005 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Deprecared utility package
+
+$Id$
+"""
+
+import sys
+import warnings
+
+warnings.warn("This module is deprecated and will go away in Zope 3.5. ",
+ DeprecationWarning, 2)
+
+
+import zope.deferredimport
+
+zope.deferredimport.deprecated(
+ "This object is deprecated and will go away in Zope 3.5",
+ UtilityRegistration = "zope.app.component.back35:UtilityRegistration",
+ )
Property changes on: Zope3/branches/jim-adapter/src/zope/app/utility/__init__.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: Zope3/branches/jim-adapter/src/zope/app/utility/interfaces.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/utility/interfaces.py 2006-04-25 19:45:55 UTC (rev 67609)
+++ Zope3/branches/jim-adapter/src/zope/app/utility/interfaces.py 2006-04-25 21:06:04 UTC (rev 67610)
@@ -0,0 +1,3 @@
+import warnings
+warnings.warn("This module is deprecated and will go away in Zope 3.5. ",
+ DeprecationWarning, 2)
Property changes on: Zope3/branches/jim-adapter/src/zope/app/utility/interfaces.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: Zope3/branches/jim-adapter/src/zope/app/utility/utility.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/utility/utility.py 2006-04-25 19:45:55 UTC (rev 67609)
+++ Zope3/branches/jim-adapter/src/zope/app/utility/utility.py 2006-04-25 21:06:04 UTC (rev 67610)
@@ -0,0 +1,3 @@
+import warnings
+warnings.warn("This module is deprecated and will go away in Zope 3.5. ",
+ DeprecationWarning, 2)
Property changes on: Zope3/branches/jim-adapter/src/zope/app/utility/utility.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: Zope3/branches/jim-adapter/src/zope/app/utility/vocabulary.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/utility/vocabulary.py 2006-04-25 19:45:55 UTC (rev 67609)
+++ Zope3/branches/jim-adapter/src/zope/app/utility/vocabulary.py 2006-04-25 21:06:04 UTC (rev 67610)
@@ -0,0 +1,7 @@
+# This module has moved to zope.size
+# and will go away in Zope 3.5
+import zope.deprecation
+zope.deprecation.moved(
+ 'zope.app.component.vocabulary',
+ "Zope 3.5",
+ )
Property changes on: Zope3/branches/jim-adapter/src/zope/app/utility/vocabulary.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Modified: Zope3/branches/jim-adapter/src/zope/component/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/component/__init__.py 2006-04-25 19:45:55 UTC (rev 67609)
+++ Zope3/branches/jim-adapter/src/zope/component/__init__.py 2006-04-25 21:06:04 UTC (rev 67610)
@@ -57,3 +57,22 @@
moduleProvides(IComponentArchitecture, IComponentRegistrationConvenience)
__all__ = tuple(IComponentArchitecture)
+
+zope.deferredimport.deprecated(
+ "This object was deprecated long ago. Only import is allowed now "
+ "and will be disallows in Zope 3.5.",
+ getGlobalServices = "zope.component.back35:deprecated",
+ getGlobalService = "zope.component.back35:deprecated",
+ getService = "zope.component.back35:deprecated",
+ getServiceDefinitions = "zope.component.back35:deprecated",
+ getView = "zope.component.back35:deprecated",
+ queryView = "zope.component.back35:deprecated",
+ getMultiView = "zope.component.back35:deprecated",
+ queryMultiView = "zope.component.back35:deprecated",
+ getViewProviding = "zope.component.back35:deprecated",
+ queryViewProviding = "zope.component.back35:deprecated",
+ getDefaultViewName = "zope.component.back35:deprecated",
+ queryDefaultViewName = "zope.component.back35:deprecated",
+ getResource = "zope.component.back35:deprecated",
+ queryResource = "zope.component.back35:deprecated",
+ )
Added: Zope3/branches/jim-adapter/src/zope/component/back35.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/component/back35.py 2006-04-25 19:45:55 UTC (rev 67609)
+++ Zope3/branches/jim-adapter/src/zope/component/back35.py 2006-04-25 21:06:04 UTC (rev 67610)
@@ -0,0 +1,20 @@
+##############################################################################
+#
+# Copyright (c) 2005 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Things to be deprecated.
+
+$Id$
+"""
+
+def deprecated(*args, **kw):
+ raise NotImplementedError("This function is no-longer implemented")
Property changes on: Zope3/branches/jim-adapter/src/zope/component/back35.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Modified: Zope3/branches/jim-adapter/src/zope/component/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/component/tests.py 2006-04-25 19:45:55 UTC (rev 67609)
+++ Zope3/branches/jim-adapter/src/zope/component/tests.py 2006-04-25 21:06:04 UTC (rev 67610)
@@ -27,6 +27,12 @@
from zope.component.interfaces import IComponentLookup
from zope.component.testing import setUp, tearDown
+import zope.deferredimport
+zope.deferredimport.deprecated(
+ "Use zope.component.testing.placelesssetup",
+ placelesssetup = "zope.component.testing",
+ )
+
class I1(interface.Interface):
pass
class I2(interface.Interface):
More information about the Zope3-Checkins
mailing list