[Checkins] SVN: zope.app.publisher/trunk/ Remove deprecated code. Update imports.

Dan Korostelev nadako at gmail.com
Tue Mar 3 14:57:54 EST 2009


Log message for revision 97455:
  Remove deprecated code. Update imports.

Changed:
  U   zope.app.publisher/trunk/CHANGES.txt
  U   zope.app.publisher/trunk/setup.py
  U   zope.app.publisher/trunk/src/zope/app/publisher/browser/__init__.py
  U   zope.app.publisher/trunk/src/zope/app/publisher/browser/configure.zcml
  U   zope.app.publisher/trunk/src/zope/app/publisher/browser/menumeta.py
  U   zope.app.publisher/trunk/src/zope/app/publisher/browser/meta.zcml
  U   zope.app.publisher/trunk/src/zope/app/publisher/browser/metadirectives.py
  U   zope.app.publisher/trunk/src/zope/app/publisher/browser/resource.py
  U   zope.app.publisher/trunk/src/zope/app/publisher/browser/tests/support.py
  U   zope.app.publisher/trunk/src/zope/app/publisher/browser/tests/test_directives.py
  U   zope.app.publisher/trunk/src/zope/app/publisher/interfaces/browser.py
  U   zope.app.publisher/trunk/src/zope/app/publisher/xmlrpc/README.txt

-=-
Modified: zope.app.publisher/trunk/CHANGES.txt
===================================================================
--- zope.app.publisher/trunk/CHANGES.txt	2009-03-03 19:56:55 UTC (rev 97454)
+++ zope.app.publisher/trunk/CHANGES.txt	2009-03-03 19:57:53 UTC (rev 97455)
@@ -5,7 +5,7 @@
 3.6.1 (unreleased)
 ==================
 
-- ...
+- Remove deprecated code.
 
 3.6.0 (2009-01-31)
 ==================

Modified: zope.app.publisher/trunk/setup.py
===================================================================
--- zope.app.publisher/trunk/setup.py	2009-03-03 19:56:55 UTC (rev 97454)
+++ zope.app.publisher/trunk/setup.py	2009-03-03 19:57:53 UTC (rev 97455)
@@ -50,15 +50,13 @@
                         'zope.container',
                         'zope.contenttype',
                         'zope.datetime',
-                        'zope.deferredimport',
-                        'zope.deprecation',
                         'zope.i18n',
                         'zope.interface',
                         'zope.location',
                         'zope.pagetemplate',
                         'zope.publisher',
                         'zope.schema',
-			'zope.site',
+                        'zope.site',
                         'zope.security',
                         'zope.traversing',
                         ],

Modified: zope.app.publisher/trunk/src/zope/app/publisher/browser/__init__.py
===================================================================
--- zope.app.publisher/trunk/src/zope/app/publisher/browser/__init__.py	2009-03-03 19:56:55 UTC (rev 97454)
+++ zope.app.publisher/trunk/src/zope/app/publisher/browser/__init__.py	2009-03-03 19:57:53 UTC (rev 97455)
@@ -24,20 +24,7 @@
 from zope.i18n.interfaces import IUserPreferredLanguages
 from zope.i18n.interfaces import IModifiableUserPreferredLanguages
 
-##############################################################################
-# BBB 2006/04/03 - to be removed after 12 months
 
-import zope.deferredimport
-zope.deferredimport.deprecated(
-    "It has been moved to zope.publisher.browser. This reference will "
-    "be removed in Zope 3.5.",
-    BrowserView = 'zope.publisher.browser:BrowserView',
-    applySkin = 'zope.publisher.browser:applySkin',
-    )
-
-#
-##############################################################################
-
 class IDefaultViewNameAPI(zope.interface.Interface):
 
     def getDefaultViewName(object, request, context=None):

Modified: zope.app.publisher/trunk/src/zope/app/publisher/browser/configure.zcml
===================================================================
--- zope.app.publisher/trunk/src/zope/app/publisher/browser/configure.zcml	2009-03-03 19:56:55 UTC (rev 97454)
+++ zope.app.publisher/trunk/src/zope/app/publisher/browser/configure.zcml	2009-03-03 19:57:53 UTC (rev 97455)
@@ -11,14 +11,6 @@
     component=".vocabulary.BrowserSkinsVocabulary"
     />
 
-<!-- BBB 2006/02/18, to be removed after 12 months -->
-<browser:layer
-    zcml:condition="have deprecatedlayers"
-    name="default"
-    interface="zope.publisher.interfaces.browser.IDefaultBrowserLayer"
-    bbb_aware="true"
-    />
-
 <class class="zope.publisher.browser.BrowserRequest">
   <allow
     interface="zope.publisher.interfaces.browser.IBrowserApplicationRequest"

Modified: zope.app.publisher/trunk/src/zope/app/publisher/browser/menumeta.py
===================================================================
--- zope.app.publisher/trunk/src/zope/app/publisher/browser/menumeta.py	2009-03-03 19:56:55 UTC (rev 97454)
+++ zope.app.publisher/trunk/src/zope/app/publisher/browser/menumeta.py	2009-03-03 19:57:53 UTC (rev 97455)
@@ -21,10 +21,10 @@
 from zope.interface import Interface
 from zope.publisher.interfaces.browser import IDefaultBrowserLayer
 from zope.security.checker import InterfaceChecker, CheckerPublic
+from zope.security.metaconfigure import ClassDirective
 from zope.component.interface import provideInterface
 from zope.component.zcml import adapter, proxify, utility
 
-from zope.app.component.contentdirective import ClassDirective
 from zope.app.pagetemplate.engine import Engine
 from zope.app.container.interfaces import IAdding
 from zope.app.publisher.browser.menu import BrowserMenu

Modified: zope.app.publisher/trunk/src/zope/app/publisher/browser/meta.zcml
===================================================================
--- zope.app.publisher/trunk/src/zope/app/publisher/browser/meta.zcml	2009-03-03 19:56:55 UTC (rev 97454)
+++ zope.app.publisher/trunk/src/zope/app/publisher/browser/meta.zcml	2009-03-03 19:57:53 UTC (rev 97455)
@@ -126,25 +126,10 @@
 
     </meta:complexDirective>
 
+
     <!-- misc. directives -->
 
-    <!-- BBB 2006/02/18, to be removed after 12 months -->
     <meta:directive
-        zcml:condition="have deprecatedlayers"
-        name="layer"
-        schema=".metadirectives.ILayerDirective"
-        handler=".metaconfigure.layer"
-        />
-
-    <!-- BBB 2006/02/18, to be removed after 12 months -->
-    <meta:directive
-        zcml:condition="have deprecatedlayers"
-        name="skin"
-        schema=".metadirectives.ISkinDirective"
-        handler=".metaconfigure.skin"
-        />
-
-    <meta:directive
         name="defaultSkin"
         schema=".metadirectives.IDefaultSkinDirective"
         handler=".metaconfigure.defaultSkin"

Modified: zope.app.publisher/trunk/src/zope/app/publisher/browser/metadirectives.py
===================================================================
--- zope.app.publisher/trunk/src/zope/app/publisher/browser/metadirectives.py	2009-03-03 19:56:55 UTC (rev 97454)
+++ zope.app.publisher/trunk/src/zope/app/publisher/browser/metadirectives.py	2009-03-03 19:57:53 UTC (rev 97455)
@@ -584,100 +584,6 @@
 # misc. directives
 #
 
-# BBB 2006/02/18, to be removed after 12 months
-class ILayerDirective(Interface):
-    """ *BBB: DEPRECATED*
-
-    Creating layers via ZCML has been deprecated.  The
-    'browser:layer' directive will be removed in Zope 3.5.  Layers
-    are now interfaces extending
-    'zope.publisher.interfaces.browser.IBrowserRequest'.
-    They do not need further registration.
-
-    **Previous documentation**
-
-    Defines a browser layer
-
-    You must either specify a `name` or an `interface`. If you specify the
-    name, then a layer interface will be created for you based on the name and
-    the `base` interface.
-
-    If you specify the `name` and the `interface`, then the layer will be
-    registered twice for the name. This way we can be backward compatible. 
-    The layer is still available via its dotted name.
-
-    If you do not specify a `base`, then `IBrowserRequest` is used by default.
-
-    You cannot specify both, the `interface` and the `base` attribute.
-    """
-
-    name = TextLine(
-        title=u"Name",
-        description=u"The name of the layer.",
-        required=False
-        )
-
-    interface = GlobalInterface(
-        title=u"The layer's interface.",
-        required=False
-        )
-
-    base = GlobalObject(
-        title=u"Name",
-        description=u"The name of the skin",
-        required=False
-        )
-
-    bbb_aware = Bool(
-        title=u"BBB-aware",
-        description=u"Backward-compatability aware?",
-        required=False
-        )
-
-# BBB 2006/02/18, to be removed after 12 months
-class ISkinDirective(Interface):
-    """ *BBB: DEPRECATED*
-
-    Creating skins via ZCML has been deprecated.  The 'browser:skin'
-    directive will be removed in Zope 3.5.  Skins are now interfaces
-    extending 'zope.publisher.interfaces.browser.IBrowserRequest'.
-    They are registered using the 'interface' directive.
-
-    **Previous documentation**
-
-    Defines a browser skin
-
-    If you do not specify an `interface`, then one will be automatically
-    created for you based on the name using the layers as base interfaces.
-
-    In case you specify an `interface` and a `name`, the skin will be
-    available via its dotted name of the interface and the name you specified.
-
-    You cannot specify both, the `interface` and the `layers` attribute.    
-    """
-
-    name = TextLine(
-        title=u"Name",
-        description=u"The name of the skin",
-        required=False
-        )
-
-    interface = GlobalInterface(
-        title=u"The skin's interface.",
-        required=False
-        )
-
-    layers = Tokens(
-        title=u"A list of layers",
-        description=u"""
-        This should be in order of lookup. Usually one of the layers
-        has the same name as the skin, and the last layer should be
-        'default', unless you want to completely override all views.
-        """,
-        required=False,
-        value_type=GlobalInterface()
-        )
-
 class IDefaultSkinDirective(Interface):
     """Sets the default browser skin
     """

Modified: zope.app.publisher/trunk/src/zope/app/publisher/browser/resource.py
===================================================================
--- zope.app.publisher/trunk/src/zope/app/publisher/browser/resource.py	2009-03-03 19:56:55 UTC (rev 97454)
+++ zope.app.publisher/trunk/src/zope/app/publisher/browser/resource.py	2009-03-03 19:57:53 UTC (rev 97455)
@@ -22,7 +22,7 @@
 from zope.traversing.browser.interfaces import IAbsoluteURL
 from zope.location import Location
 
-from zope.app.component.hooks import getSite
+from zope.site.hooks import getSite
 
 class Resource(Location):
     implements(IResource)

Modified: zope.app.publisher/trunk/src/zope/app/publisher/browser/tests/support.py
===================================================================
--- zope.app.publisher/trunk/src/zope/app/publisher/browser/tests/support.py	2009-03-03 19:56:55 UTC (rev 97454)
+++ zope.app.publisher/trunk/src/zope/app/publisher/browser/tests/support.py	2009-03-03 19:57:53 UTC (rev 97455)
@@ -21,7 +21,7 @@
 from zope.interface import implements
 from zope.traversing.interfaces import IContainmentRoot
 
-from zope.app.component.hooks import setSite
+from zope.site.hooks import setSite
 
 from zope.app.publisher.browser.menu import BrowserMenu
 

Modified: zope.app.publisher/trunk/src/zope/app/publisher/browser/tests/test_directives.py
===================================================================
--- zope.app.publisher/trunk/src/zope/app/publisher/browser/tests/test_directives.py	2009-03-03 19:56:55 UTC (rev 97454)
+++ zope.app.publisher/trunk/src/zope/app/publisher/browser/tests/test_directives.py	2009-03-03 19:57:53 UTC (rev 97455)
@@ -401,7 +401,7 @@
             component.queryMultiAdapter((ob, request), name='test'),
             None)
 
-        XMLConfig('meta.zcml', zope.app.component)()
+        XMLConfig('meta.zcml', zope.component)()
         xmlconfig(StringIO(template % (
             '''
             <interface

Modified: zope.app.publisher/trunk/src/zope/app/publisher/interfaces/browser.py
===================================================================
--- zope.app.publisher/trunk/src/zope/app/publisher/interfaces/browser.py	2009-03-03 19:56:55 UTC (rev 97454)
+++ zope.app.publisher/trunk/src/zope/app/publisher/interfaces/browser.py	2009-03-03 19:57:53 UTC (rev 97455)
@@ -20,19 +20,7 @@
 from zope.interface.interfaces import IInterface
 from zope.schema import TextLine, Text, URI, Int
 
-##############################################################################
-# BBB 2006/04/03 - to be removed after 12 months
 
-import zope.deferredimport
-zope.deferredimport.deprecated(
-    "IBrowserView has been moved to zope.publisher.interfaces.browser. "
-    "This reference will be removed in Zope 3.5.",
-    IBrowserView = 'zope.publisher.interfaces.browser:IBrowserView',
-    )
-
-#
-##############################################################################
-
 class IMenuItemType(IInterface):
     """Menu item type
 

Modified: zope.app.publisher/trunk/src/zope/app/publisher/xmlrpc/README.txt
===================================================================
--- zope.app.publisher/trunk/src/zope/app/publisher/xmlrpc/README.txt	2009-03-03 19:56:55 UTC (rev 97454)
+++ zope.app.publisher/trunk/src/zope/app/publisher/xmlrpc/README.txt	2009-03-03 19:57:53 UTC (rev 97455)
@@ -300,7 +300,7 @@
   ...   <!-- We only need to do this include in this example,
   ...        Normally the include has already been done for us. -->
   ...   <include package="zope.app.publisher.xmlrpc" file="meta.zcml" />
-  ...   <include package="zope.app.component" file="meta.zcml" />
+  ...   <include package="zope.security" file="meta.zcml" />
   ...
   ...   <class class="zope.app.publisher.xmlrpc.README.ProtectedView">
   ...       <require permission="zope.ManageContent"



More information about the Checkins mailing list