[Checkins] SVN: grok/branches/jw-simpler-skin-registration/src/grok/ Rip out old skin support.

Philipp von Weitershausen philikon at philikon.de
Sat Aug 2 07:20:56 EDT 2008


Log message for revision 89191:
  Rip out old skin support.
  

Changed:
  U   grok/branches/jw-simpler-skin-registration/src/grok/__init__.py
  U   grok/branches/jw-simpler-skin-registration/src/grok/components.py
  D   grok/branches/jw-simpler-skin-registration/src/grok/ftests/view/skinclass.py
  U   grok/branches/jw-simpler-skin-registration/src/grok/ftests/viewlet/viewlet_security.py
  U   grok/branches/jw-simpler-skin-registration/src/grok/meta.py
  D   grok/branches/jw-simpler-skin-registration/src/grok/tests/skin/skinclass_conflict.py

-=-
Modified: grok/branches/jw-simpler-skin-registration/src/grok/__init__.py
===================================================================
--- grok/branches/jw-simpler-skin-registration/src/grok/__init__.py	2008-08-02 10:37:41 UTC (rev 89190)
+++ grok/branches/jw-simpler-skin-registration/src/grok/__init__.py	2008-08-02 11:20:56 UTC (rev 89191)
@@ -46,9 +46,6 @@
 from grok.interfaces import IRESTSkinType
 from grok.components import ViewletManager, Viewlet
 
-# BBB These are deprecated.
-from grok.components import Skin, IGrokLayer
-
 from martian import baseclass
 from grokcore.component.directive import (
     context, name, title, description, provides, global_utility, direct)

Modified: grok/branches/jw-simpler-skin-registration/src/grok/components.py
===================================================================
--- grok/branches/jw-simpler-skin-registration/src/grok/components.py	2008-08-02 10:37:41 UTC (rev 89190)
+++ grok/branches/jw-simpler-skin-registration/src/grok/components.py	2008-08-02 11:20:56 UTC (rev 89191)
@@ -654,14 +654,6 @@
 class IRESTLayer(interface.Interface):
     pass
 
-# BBB This interface is deprecated
-class IGrokLayer(interface.Interface):
-    pass
-
-# BBB This interface is deprecated
-class Skin(object):
-    pass
-
 class RESTProtocol(object):
     pass
 

Deleted: grok/branches/jw-simpler-skin-registration/src/grok/ftests/view/skinclass.py
===================================================================
--- grok/branches/jw-simpler-skin-registration/src/grok/ftests/view/skinclass.py	2008-08-02 10:37:41 UTC (rev 89190)
+++ grok/branches/jw-simpler-skin-registration/src/grok/ftests/view/skinclass.py	2008-08-02 11:20:56 UTC (rev 89191)
@@ -1,61 +0,0 @@
-"""
-  >>> getRootFolder()["manfred"] = Mammoth()
-
-  >>> from zope.testbrowser.testing import Browser
-  >>> browser = Browser()
-  >>> browser.handleErrors = False
-  >>> browser.open("http://localhost/++skin++Basic/manfred/@@cavedrawings")
-  >>> print browser.contents
-  <html>
-  <body>
-  <h1>Hello, world!</h1>
-  </body>
-  </html>
-
-  >>> browser.open("http://localhost/++skin++Rotterdam/manfred/@@moredrawings")
-  >>> print browser.contents
-  Pretty
-
-  >>> browser.open("http://localhost/++skin++skinfromclass/manfred/@@evenmoredrawings")
-  >>> print browser.contents
-  Awesome
-
-"""
-import grok
-from zope.app.basicskin import IBasicSkin
-from zope.app.rotterdam import rotterdam
-
-grok.layer(IBasicSkin)
-
-class MySkinLayer(grok.IBrowserRequest):
-    pass
-
-class SkinFromClass(grok.Skin):
-    grok.layer(MySkinLayer)
-
-class Mammoth(grok.Model):
-    pass
-
-class CaveDrawings(grok.View):
-    pass
-
-cavedrawings = grok.PageTemplate("""\
-<html>
-<body>
-<h1>Hello, world!</h1>
-</body>
-</html>
-""")
-
-class MoreDrawings(grok.View):
-    grok.layer(rotterdam)
-
-    def render(self):
-        return "Pretty"
-
-
-class EvenMoreDrawings(grok.View):
-    grok.layer(MySkinLayer)
-
-    def render(self):
-        return "Awesome"

Modified: grok/branches/jw-simpler-skin-registration/src/grok/ftests/viewlet/viewlet_security.py
===================================================================
--- grok/branches/jw-simpler-skin-registration/src/grok/ftests/viewlet/viewlet_security.py	2008-08-02 10:37:41 UTC (rev 89190)
+++ grok/branches/jw-simpler-skin-registration/src/grok/ftests/viewlet/viewlet_security.py	2008-08-02 11:20:56 UTC (rev 89191)
@@ -155,7 +155,7 @@
         return 'Gold Bone'
 
 class IBoneLayer(IDefaultBrowserLayer):
-    pass
+    grok.skin('boneskin')
 
 class LayeredBone(grok.Viewlet):
     grok.context(Interface)
@@ -180,9 +180,6 @@
     def render(self):
         return 'Lady Viewlet'
 
-class BoneSkin(grok.Skin):
-    grok.layer(IBoneLayer)
-
 class NamedViewletManager(grok.ViewletManager):
     grok.context(Interface)
     grok.name('managerwithname')

Modified: grok/branches/jw-simpler-skin-registration/src/grok/meta.py
===================================================================
--- grok/branches/jw-simpler-skin-registration/src/grok/meta.py	2008-08-02 10:37:41 UTC (rev 89190)
+++ grok/branches/jw-simpler-skin-registration/src/grok/meta.py	2008-08-02 11:20:56 UTC (rev 89191)
@@ -664,20 +664,6 @@
         return True
 
 
-# BBB Support for grok.Skin is deprecated
-class SkinGrokker(martian.ClassGrokker):
-    martian.component(grok.Skin)
-    martian.directive(grok.layer, default=IBrowserRequest)
-    martian.directive(grok.name, get_default=default_view_name)
-
-    def execute(self, factory, config, name, layer, **kw):
-        config.action(
-            discriminator=('utility', IBrowserSkinType, name),
-            callable=zope.component.interface.provideInterface,
-            args=(name, layer, IBrowserSkinType)
-            )
-        return True
-
 class RESTProtocolGrokker(martian.ClassGrokker):
     martian.component(grok.RESTProtocol)
     martian.directive(grok.layer, default=IBrowserRequest)

Deleted: grok/branches/jw-simpler-skin-registration/src/grok/tests/skin/skinclass_conflict.py
===================================================================
--- grok/branches/jw-simpler-skin-registration/src/grok/tests/skin/skinclass_conflict.py	2008-08-02 10:37:41 UTC (rev 89190)
+++ grok/branches/jw-simpler-skin-registration/src/grok/tests/skin/skinclass_conflict.py	2008-08-02 11:20:56 UTC (rev 89191)
@@ -1,17 +0,0 @@
-"""
-We cannot register two skins under the same name::
-
-  >>> grok.testing.grok(__name__)
-  Traceback (most recent call last):
-    ...
-  ConfigurationConflictError: Conflicting configuration actions
-    For: ('utility', <InterfaceClass zope.publisher.interfaces.browser.IBrowserSkinType>, 'foo')
-"""
-
-import grok
-
-class Skin1(grok.Skin):
-    grok.name('foo')
-
-class Skin2(grok.Skin):
-    grok.name('foo')



More information about the Checkins mailing list