[Checkins] SVN: five.grok/trunk/ Revert the CodeView stuff, CodeView is always available as an alias of View

Vincent Fretin vincent.fretin at gmail.com
Thu Sep 17 04:59:42 EDT 2009


Log message for revision 104186:
  Revert the CodeView stuff, CodeView is always available as an alias of View

Changed:
  U   five.grok/trunk/README.txt
  U   five.grok/trunk/buildout.cfg
  U   five.grok/trunk/docs/HISTORY.txt
  U   five.grok/trunk/setup.py
  U   five.grok/trunk/src/five/grok/README.txt
  U   five.grok/trunk/src/five/grok/__init__.py
  U   five.grok/trunk/src/five/grok/components.py
  U   five.grok/trunk/src/five/grok/ftests/view/argument.py
  D   five.grok/trunk/src/five/grok/ftests/view/codeview.py
  U   five.grok/trunk/src/five/grok/ftests/view/layers.py

-=-
Modified: five.grok/trunk/README.txt
===================================================================
--- five.grok/trunk/README.txt	2009-09-17 08:52:34 UTC (rev 104185)
+++ five.grok/trunk/README.txt	2009-09-17 08:59:42 UTC (rev 104186)
@@ -78,11 +78,11 @@
 
   grokcore.annotation = 1.0.1
   grokcore.component = 1.7
-  grokcore.formlib = 1.2
+  grokcore.formlib = 1.4
   grokcore.security = 1.2
   grokcore.site = 1.0.1
-  grokcore.view = 1.11
-  grokcore.viewlet = 1.1
+  grokcore.view = 1.12.1
+  grokcore.viewlet = 1.3
   five.localsitemanager = 1.1
   martian = 0.11
   zope.app.publisher = 3.5.1

Modified: five.grok/trunk/buildout.cfg
===================================================================
--- five.grok/trunk/buildout.cfg	2009-09-17 08:52:34 UTC (rev 104185)
+++ five.grok/trunk/buildout.cfg	2009-09-17 08:59:42 UTC (rev 104186)
@@ -11,11 +11,11 @@
 [versions]
 grokcore.annotation = 1.0.1
 grokcore.component = 1.7
-grokcore.formlib = 1.2
+grokcore.formlib = 1.4
 grokcore.security = 1.2
 grokcore.site = 1.0.1
-grokcore.view = 1.11
-grokcore.viewlet = 1.1
+grokcore.view = 1.12.1
+grokcore.viewlet = 1.3
 five.localsitemanager = 1.1
 martian = 0.11
 zope.app.publisher = 3.5.1

Modified: five.grok/trunk/docs/HISTORY.txt
===================================================================
--- five.grok/trunk/docs/HISTORY.txt	2009-09-17 08:52:34 UTC (rev 104185)
+++ five.grok/trunk/docs/HISTORY.txt	2009-09-17 08:59:42 UTC (rev 104186)
@@ -1,88 +1,94 @@
-Changelog for five.grok
------------------------
+Changelog
+=========
 
-five.grok - (unreleased)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1.0b3 (unreleased)
+------------------
 
-* 
+- Reverted the CodeView stuff, see grokcore.view changelog for more details.
 
-five.grok - 1.0b2 (2009-07-21)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ``CodeView`` is still available as a backwards compatibility alias
+  for ``View``. Please update all references to ``CodeView`` to
+  ``View``.
+  [vincentfretin]
 
-* Added dependency on grokcore.view 1.9, grokcore.viewlet 1.1 and
+1.0b2 (2009-07-21)
+------------------
+
+- Added dependency on grokcore.view 1.9, grokcore.viewlet 1.1 and
   grokcore.formlib 1.2, and support for the new CodeView from grokcore.View.
   [optilude]
 
-five.grok - 1.0b1 (2009-06-30)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1.0b1 (2009-06-30)
+------------------
 
-* Added support for annotations with `grokcore.annotation`_.
+- Added support for annotations with `grokcore.annotation`_.
   [thefunny42]
 
-* Added support for local site and utilities with `grokcore.site`_.
+- Added support for local site and utilities with `grokcore.site`_.
   [thefunny42]
 
-* Fix grok.EditForm when used with grokcore.formlib 1.1. The Apply
-  action was gone. [thefunny42]
+- Fix grok.EditForm when used with grokcore.formlib 1.1.
+  The Apply action was gone.
+  [thefunny42]
 
-* Let static resource directories allow access to unprotected subattributes
+- Let static resource directories allow access to unprotected subattributes
   to avoid authorisation problems when accessing them from protected code.
   [optilude]
 
-* Do not create static resource directories if the 'static' directory does
+- Do not create static resource directories if the 'static' directory does
   not actually exist.
   [optilude]
 
 
-five.grok - 1.0a2 (2008-11-23)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1.0a2 (2008-11-23)
+------------------
 
-* Added support for viewlets with `grokcore.viewlet`_.
+- Added support for viewlets with `grokcore.viewlet`_.
   [thefunny42]
 
-* Added support for the DirectoryResource component (new in
+- Added support for the DirectoryResource component (new in
   `grokcore.view`_ 1.2).
   [thefunny42]
 
-* Added support for using Zope 2 templates by default when doing ``from
+- Added support for using Zope 2 templates by default when doing ``from
   five import grok`` and using grok.PageTemplateFile (being consistent
   with grok.PageTemplate).
   [thefunny42]
 
-* Added a convenient grok.Container.
+- Added a convenient grok.Container.
   [thefunny42]
 
-* Fix AutoFields (and form grokker) not to include OFS Zope 2 defined
+- Fix AutoFields (and form grokker) not to include OFS Zope 2 defined
   fields by default. This use to add a lot of buggy and wanted
   fields.
   [thefunny42]
 
 
-five.grok - 1.0a1 (2008-10-22)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1.0a1 (2008-10-22)
+------------------
 
-* Added support for formlib forms with `grokcore.formlib`_.
+- Added support for formlib forms with `grokcore.formlib`_.
   [thefunny42]
 
-* Added support for static resource directory.
+- Added support for static resource directory.
   [thefunny42]
 
-* Added support for inline templates and made Zope 2 template semantics
+- Added support for inline templates and made Zope 2 template semantics
   the default when doing ``from five import grok`` and using
   grok.PageTemplate.
   [optilude]
 
-* Added override to make templates use Five's ViewPageTemplateFile instead
+- Added override to make templates use Five's ViewPageTemplateFile instead
   of the one from zope.app.pagetemplate.
   [optilude]
 
-* Added `grokcore.view`_ support with tests.
+- Added `grokcore.view`_ support with tests.
   [regebro, jfroche, gotcha et al.]
 
-* Added tests for grok.subscriber directive.
+- Added tests for grok.subscriber directive.
   [kamon]
 
-* Initial release (tests for adapters and utilities, initial support for
+- Initial release (tests for adapters and utilities, initial support for
   views).
   [regebro, gotcha]
 

Modified: five.grok/trunk/setup.py
===================================================================
--- five.grok/trunk/setup.py	2009-09-17 08:52:34 UTC (rev 104185)
+++ five.grok/trunk/setup.py	2009-09-17 08:59:42 UTC (rev 104186)
@@ -31,9 +31,9 @@
         'martian',
         'five.localsitemanager < 2.0dev',
         'grokcore.component',
-        'grokcore.formlib >= 1.2',
-        'grokcore.view >= 1.9',
-        'grokcore.viewlet >= 1.1',
+        'grokcore.formlib >= 1.4',
+        'grokcore.view >= 1.12.1',
+        'grokcore.viewlet >= 1.3',
         'grokcore.security',
         'grokcore.site',
         'grokcore.annotation',

Modified: five.grok/trunk/src/five/grok/README.txt
===================================================================
--- five.grok/trunk/src/five/grok/README.txt	2009-09-17 08:52:34 UTC (rev 104185)
+++ five.grok/trunk/src/five/grok/README.txt	2009-09-17 08:59:42 UTC (rev 104186)
@@ -85,7 +85,7 @@
     ...     def numberOfCaveWomen(self):
     ...         return len(self.objectIds())
 
-    <<< class CaveView(grok.CodeView):
+    <<< class CaveView(grok.View):
     ...     grok.context(Cave)
     ...
     ...     def render(self):
@@ -97,7 +97,7 @@
 provide some actual code in the ``update()`` method which is called
 before ``render()``::
 
-    <<< class AddCaveWoman(grok.CodeView):
+    <<< class AddCaveWoman(grok.View):
     ...     grok.context(Cave)
     ...     grok.name(u'cave-woman-add')
     ...

Modified: five.grok/trunk/src/five/grok/__init__.py
===================================================================
--- five.grok/trunk/src/five/grok/__init__.py	2009-09-17 08:52:34 UTC (rev 104185)
+++ five.grok/trunk/src/five/grok/__init__.py	2009-09-17 08:59:42 UTC (rev 104186)
@@ -21,11 +21,15 @@
 from grokcore.formlib import *
 
 from five.grok.components import Model, Container, Site, LocalUtility
-from five.grok.components import View, CodeView, Form, AddForm
+from five.grok.components import View, Form, AddForm
 from five.grok.components import EditForm, DisplayForm
 from five.grok.components import ViewletManager, Viewlet
 from five.grok.formlib import AutoFields
 
+# backwards compatibility. Probably not needed by many, but just in case.
+# please start using grokcore.view.View again.
+CodeView = View
+
 # Temporary import explicitly path from grokcore.view (it was missing
 # in its API interface)
 from grokcore.view import path

Modified: five.grok/trunk/src/five/grok/components.py
===================================================================
--- five.grok/trunk/src/five/grok/components.py	2009-09-17 08:52:34 UTC (rev 104185)
+++ five.grok/trunk/src/five/grok/components.py	2009-09-17 08:59:42 UTC (rev 104186)
@@ -82,12 +82,6 @@
     # in Products/Five/browser/absoluteurl.py
     absolute_url = Acquisition.Acquired
 
-class CodeView(grokcore.view.CodeView, Acquisition.Explicit):
-
-    # We let getPhysicalPath to be acquired. This make static URL's
-    # work, and prevent us to inherit from Acquisition.Implicit
-    getPhysicalPath = Acquisition.Acquired
-
 # TODO: This should probably move to Products.Five.browser
 
 class ViewAwareZopePageTemplate(ZopePageTemplate):

Modified: five.grok/trunk/src/five/grok/ftests/view/argument.py
===================================================================
--- five.grok/trunk/src/five/grok/ftests/view/argument.py	2009-09-17 08:52:34 UTC (rev 104185)
+++ five.grok/trunk/src/five/grok/ftests/view/argument.py	2009-09-17 08:59:42 UTC (rev 104186)
@@ -54,7 +54,7 @@
 class Mammoth(grok.Model):
     pass
 
-class RenderWithArguments(grok.CodeView):
+class RenderWithArguments(grok.View):
     grok.name('render')
 
     def render(self, message, another):

Deleted: five.grok/trunk/src/five/grok/ftests/view/codeview.py
===================================================================
--- five.grok/trunk/src/five/grok/ftests/view/codeview.py	2009-09-17 08:52:34 UTC (rev 104185)
+++ five.grok/trunk/src/five/grok/ftests/view/codeview.py	2009-09-17 08:59:42 UTC (rev 104186)
@@ -1,24 +0,0 @@
-"""
-  >>> from five.grok.ftests.view.codeview import *
-  >>> id = getRootFolder()._setObject("manfred", CodeMammoth(id='manfred'))
-
-  >>> from Products.Five.testbrowser import Browser
-  >>> browser = Browser()
-  >>> browser.handleErrors = False
-  >>> browser.open("http://localhost/manfred/@@codepainting")
-  >>> print browser.contents
-  Mona Lisa
-
-"""
-from five import grok
-
-class CodeMammoth(grok.Model):
-
-    def __init__(self, id):
-        super(CodeMammoth, self).__init__(id=id)
-        self.id = id
-
-class CodePainting(grok.CodeView):
-    
-    def render(self):
-        return "Mona Lisa"

Modified: five.grok/trunk/src/five/grok/ftests/view/layers.py
===================================================================
--- five.grok/trunk/src/five/grok/ftests/view/layers.py	2009-09-17 08:52:34 UTC (rev 104185)
+++ five.grok/trunk/src/five/grok/ftests/view/layers.py	2009-09-17 08:59:42 UTC (rev 104186)
@@ -45,14 +45,14 @@
 </html>
 """)
 
-class MoreDrawings(grok.CodeView):
+class MoreDrawings(grok.View):
     grok.layer(rotterdam)
 
     def render(self):
         return "Pretty"
 
 
-class EvenMoreDrawings(grok.CodeView):
+class EvenMoreDrawings(grok.View):
     grok.layer(MySkinLayer)
 
     def render(self):



More information about the checkins mailing list