[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/ Switch to Zope 3.3 branch and ZODB 3.7 branch.

2006-05-20 Thread Philipp von Weitershausen
Log message for revision 68198:
  Switch to Zope 3.3 branch and ZODB 3.7 branch.
  Zope 3.3 branch contains a bugfix for TALES that we need.
  

Changed:
  _U  Zope/branches/ajung-zpt-end-game/lib/python/
  _U  Zope/branches/ajung-zpt-end-game/lib/python/zope/

-=-

Property changes on: Zope/branches/ajung-zpt-end-game/lib/python
___
Name: svn:externals
   - ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
BTrees -r 41153 
svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/BTrees
persistent -r 41153 
svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/persistent
ThreadedAsync  -r 41153 
svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ThreadedAsync
transaction-r 41153 
svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/transaction
ZEO-r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZEO
ZODB   -r 41153 svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZODB
ZopeUndo   -r 41153 
svn://svn.zope.org/repos/main/ZODB/branches/3.6/src/ZopeUndo
zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
pytz   -r 67819 svn://svn.zope.org/repos/main/Zope3/trunk/src/pytz
zodbcode   -r 67819 svn://svn.zope.org/repos/main/Zope3/trunk/src/zodbcode
ClientCookie   -r 67819 
svn://svn.zope.org/repos/main/Zope3/trunk/src/ClientCookie
mechanize  -r 67819 svn://svn.zope.org/repos/main/Zope3/trunk/src/mechanize
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0


   + ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
BTrees -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/BTrees
persistent -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/persistent
ThreadedAsync  -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ThreadedAsync
transaction-r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/transaction
ZEO-r 68012 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZEO
ZODB   -r 68012 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZODB
ZopeUndo   -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZopeUndo
zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
pytz   -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/pytz
zodbcode   -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zodbcode
ClientCookie   -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/ClientCookie
mechanize  -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/mechanize
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0




Property changes on: Zope/branches/ajung-zpt-end-game/lib/python/zope
___
Name: svn:externals
   - app  -r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/app
cachedescriptors -r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/cachedescriptors
component-r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/component
configuration-r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/configuration
documenttemplate -r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/documenttemplate
event-r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/event
exceptions   -r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/exceptions
hookable -r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/hookable
i18n -r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18n
i18nmessageid-r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/i18nmessageid
interface-r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/interface
modulealias  -r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/modulealias
pagetemplate -r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/pagetemplate
proxy-r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/proxy
publisher-r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/publisher
schema   -r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/schema
security -r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/security
server   -r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/server
structuredtext   -r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/structuredtext
tal  -r 67855 svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tal
tales-r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/tales
testing  -r 67760 
svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing
thread   -r 67855 
svn://svn.zope.org/repos/main/Zope3/trunk/src/zope/thread
deprecation  -r 67855 

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/ Switch to newest Zope 3.3 revision

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68202:
  Switch to newest Zope 3.3 revision
  

Changed:
  _U  Zope/branches/ajung-zpt-end-game/lib/python/
  _U  Zope/branches/ajung-zpt-end-game/lib/python/zope/

-=-

Property changes on: Zope/branches/ajung-zpt-end-game/lib/python
___
Name: svn:externals
   - ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
BTrees -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/BTrees
persistent -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/persistent
ThreadedAsync  -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ThreadedAsync
transaction-r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/transaction
ZEO-r 68012 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZEO
ZODB   -r 68012 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZODB
ZopeUndo   -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZopeUndo
zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
pytz   -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/pytz
zodbcode   -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zodbcode
ClientCookie   -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/ClientCookie
mechanize  -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/mechanize
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0


   + ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
BTrees -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/BTrees
persistent -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/persistent
ThreadedAsync  -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ThreadedAsync
transaction-r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/transaction
ZEO-r 68012 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZEO
ZODB   -r 68012 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZODB
ZopeUndo   -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZopeUndo
zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
pytz   -r 68201 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/pytz
zodbcode   -r 68201 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zodbcode
ClientCookie   -r 68201 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/ClientCookie
mechanize  -r 68201 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/mechanize
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0




Property changes on: Zope/branches/ajung-zpt-end-game/lib/python/zope
___
Name: svn:externals
   - app  -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/app
cachedescriptors -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/cachedescriptors
component-r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/component
configuration-r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/configuration
documenttemplate -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/documenttemplate
event-r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/event
exceptions   -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/exceptions
hookable -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/hookable
i18n -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/i18n
i18nmessageid-r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/i18nmessageid
interface-r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/interface
modulealias  -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/modulealias
pagetemplate -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/pagetemplate
proxy-r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/proxy
publisher-r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/publisher
schema   -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/schema
security -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/security
server   -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/server
structuredtext   -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/structuredtext
tal  -r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/tal
tales-r 68194 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/tales
testing  -r 67760 
svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing
thread   -r 68194 

[Zope-Checkins] SVN: Products.Five/branches/ajung-zpt-end-game/formlib/formbase.py zope.formlib now uses the 'zope' domain.

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68204:
  zope.formlib now uses the 'zope' domain.
  

Changed:
  U   Products.Five/branches/ajung-zpt-end-game/formlib/formbase.py

-=-
Modified: Products.Five/branches/ajung-zpt-end-game/formlib/formbase.py
===
--- Products.Five/branches/ajung-zpt-end-game/formlib/formbase.py   
2006-05-21 11:41:29 UTC (rev 68203)
+++ Products.Five/branches/ajung-zpt-end-game/formlib/formbase.py   
2006-05-21 11:47:49 UTC (rev 68204)
@@ -22,7 +22,8 @@
 import zope.lifecycleevent
 from zope import interface
 from zope.formlib import interfaces, form, namedtemplate
-from zope.formlib.i18n import _
+from zope.i18nmessageid import MessageFactory
+_ = MessageFactory(zope)
 
 from Products.Five.browser.pagetemplatefile import ZopeTwoPageTemplateFile
 from Products.Five.browser.decode import processInputs, setPageEncoding

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/ set svn:keywords = Id

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68211:
  set svn:keywords = Id
  

Changed:
  _U  
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplate.py
  _U  
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testZRPythonExpr.py

-=-

Property changes on: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplate.py
___
Name: svn:keywords
   + Id


Property changes on: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testZRPythonExpr.py
___
Name: svn:keywords
   + Id

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py Proper test clean up

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68212:
  Proper test clean up
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
2006-05-21 13:45:23 UTC (rev 68211)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
2006-05-21 13:48:14 UTC (rev 68212)
@@ -87,8 +87,12 @@
 This is in the slot
   /p
 /div
-   
+
 
+def tearDown(self):
+transaction.abort()
+self.app._p_jar.close()
+
 def testMacroExpansion(self):
 request = self.app.REQUEST
 self._addPT('pt1', text=self.text, REQUEST=request)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplateFile.py pt_getEngine is now handled by Products.PageTemplates.PageTemplate.PageTemplate (used

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68213:
  pt_getEngine is now handled by 
Products.PageTemplates.PageTemplate.PageTemplate (used
  as a base class)
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplateFile.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplateFile.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplateFile.py
  2006-05-21 13:48:14 UTC (rev 68212)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplateFile.py
  2006-05-21 14:12:29 UTC (rev 68213)
@@ -23,7 +23,6 @@
 from OFS.Traversable import Traversable
 from Shared.DC.Scripts.Script import Script
 from Shared.DC.Scripts.Signature import FuncCode
-from Products.PageTemplates.Expressions import getEngine
 from Products.PageTemplates.Expressions import SecureModuleImporter
 from Products.PageTemplates.PageTemplate import PageTemplate
 from Products.PageTemplates.ZopePageTemplate import guess_type
@@ -80,10 +79,6 @@
 content = open(filename).read()
 self.pt_edit( content, guess_type(filename, content))
 
-
-def pt_getEngine(self):
-return getEngine()
-
 def pt_getContext(self):
 root = self.getPhysicalRoot()
 context = self._getContext()

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/ Do some heavy clean up in ZopePageTemplate which gets rid of a lot of temporary

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68217:
  Do some heavy clean up in ZopePageTemplate which gets rid of a lot of 
temporary
  hacks that were in there before.  Tried to reduce the diff to the Zope 2.9 
code
  a little and moved some content type guessing code to PageTemplateFile where 
it
  really belongs (that also avoids a circular import problem).
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplateFile.py
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/ZopePageTemplate.py
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplateFile.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplateFile.py
  2006-05-21 15:28:31 UTC (rev 68216)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplateFile.py
  2006-05-21 15:45:14 UTC (rev 68217)
@@ -25,12 +25,18 @@
 from Shared.DC.Scripts.Signature import FuncCode
 from Products.PageTemplates.Expressions import SecureModuleImporter
 from Products.PageTemplates.PageTemplate import PageTemplate
-from Products.PageTemplates.ZopePageTemplate import guess_type
 
 from zope.contenttype import guess_content_type
+from zope.pagetemplate.pagetemplatefile import sniff_type
 
 LOG = getLogger('PageTemplateFile')
 
+def guess_type(filename, text):
+content_type, dummy = guess_content_type(filename, text)
+if content_type in ('text/html', 'text/xml'):
+return content_type
+return sniff_type(text) or 'text/html'
+
 class PageTemplateFile(SimpleItem, Script, PageTemplate, Traversable):
 Zope 2 implementation of a PageTemplate loaded from a file.
 

Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/ZopePageTemplate.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/ZopePageTemplate.py
  2006-05-21 15:28:31 UTC (rev 68216)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/ZopePageTemplate.py
  2006-05-21 15:45:14 UTC (rev 68217)
@@ -34,26 +34,32 @@
 
 from webdav.Lockable import ResourceLockedError
 from webdav.WriteLockInterface import WriteLockInterface
-from zope.contenttype import guess_content_type
-from zope.pagetemplate.pagetemplatefile import sniff_type
 
 from Products.PageTemplates.PageTemplate import PageTemplate
-from Products.PageTemplates.Expressions import getEngine
+from Products.PageTemplates.PageTemplateFile import PageTemplateFile
+from Products.PageTemplates.PageTemplateFile import guess_type
 from Products.PageTemplates.Expressions import SecureModuleImporter
 
-
 # regular expression to extract the encoding from the XML preamble
-encoding_reg= re.compile('\?xml.*?encoding=(.*?).*?\?', re.M)
+encoding_reg = re.compile('\?xml.*?encoding=(.*?).*?\?', re.M)
 
 preferred_encodings = ['utf-8', 'iso-8859-15']
 if os.environ.has_key('ZPT_PREFERRED_ENCODING'):
 preferred_encodings.insert(0, os.environ['ZPT_PREFERRED_ENCODING'])
 
+def sniffEncoding(text, default_encoding='utf-8'):
+Try to determine the encoding from html or xml
+if text.startswith('?xml'):
+mo = encoding_reg.search(text)
+if mo:
+return mo.group(1)
+return default_encoding
+
 class Src(Acquisition.Explicit):
  I am scary code 
 
-index_html = None
 PUT = document_src = Acquisition.Acquired
+index_html = None
 
 def __before_publishing_traverse__(self, ob, request):
 if getattr(request, '_hacked_path', 0):
@@ -63,29 +69,9 @@
  
 return self.document_src(REQUEST)
 
-
-def sniffEncoding(text, default_encoding='utf-8'):
- try to determine the encoding from html or xml 
-if text.startswith('?xml'):
-mo = encoding_reg.search(text)
-if mo:
-return mo.group(1)
-return default_encoding
-
-
-def guess_type(filename, text):
-content_type, dummy = guess_content_type(filename, text)
-if content_type in ('text/html', 'text/xml'):
-return content_type
-
-return sniff_type(text) or 'text/html'
-
-_default_content_fn = os.path.join(package_home(globals()), 'pt', 
'default.html')
-  
-
 class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
Traversable, PropertyManager):
- Z2 wrapper class for Zope 3 page templates 
+Zope wrapper for Page Template using TAL, TALES, and METAL
 
 __implements__ = (WriteLockInterface,)
 
@@ -95,7 +81,8 @@
 func_code = FuncCode((), 0)
 
 _default_bindings = {'name_subpath': 'traverse_subpath'}
-_default_content_fn = os.path.join(package_home(globals()), 'www', 
'default.html')
+_default_content_fn = os.path.join(package_home(globals()),
+   

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplate.py More API BBB: Add a stupid html() method that supports an is_html property

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68218:
  More API BBB: Add a stupid html() method that supports an is_html property
  hook. Stupid, stupid, stupid.
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplate.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplate.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplate.py
  2006-05-21 15:45:14 UTC (rev 68217)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/PageTemplate.py
  2006-05-21 19:29:37 UTC (rev 68218)
@@ -102,3 +102,12 @@
 if not kwargs.has_key('args'):
 kwargs['args'] = args
 return self.pt_render(extra_context={'options': kwargs})
+
+# convenience method for the ZMI which allows to explicitly
+# specify the HTMLness of a template.  The old Zope 2
+# implementation had this as well, but arguably on the wrong class
+# (this should be a ZopePageTemplate thing if at all)
+def html(self):
+if not hasattr(getattr(self, 'aq_base', self), 'is_html'):
+return self.content_type == 'text/html'
+return self.is_html

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/ZopePageTemplate.py use original resources again

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68220:
  use original resources again
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/ZopePageTemplate.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/ZopePageTemplate.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/ZopePageTemplate.py
  2006-05-21 19:43:31 UTC (rev 68219)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/ZopePageTemplate.py
  2006-05-21 19:44:18 UTC (rev 68220)
@@ -433,7 +433,7 @@
 return zpt
 
 from Products.PageTemplates import misc_
-misc_['exclamation.gif'] = ImageFile('pt/exclamation.gif', globals())
+misc_['exclamation.gif'] = ImageFile('www/exclamation.gif', globals())
 
 def initialize(context):
 context.registerClass(
@@ -441,7 +441,7 @@
 permission='Add Page Templates',
 constructors=(manage_addPageTemplateForm,
   manage_addPageTemplate),
-icon='pt/zpt.gif',
+icon='www/zpt.gif',
 )
 context.registerHelp()
 context.registerHelpTitle('Zope Help')

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py Remember an idea of how to solve a particular tricky BBB problem.

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68222:
  Remember an idea of how to solve a particular tricky BBB problem.
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
 2006-05-21 20:03:09 UTC (rev 68221)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
 2006-05-21 23:24:11 UTC (rev 68222)
@@ -50,7 +50,23 @@
 '''Test advanced expression evaluation 1'''
 ec = self.ec
 assert ec.evaluate('x | nothing') is None
+
+# XXX this fails because Zope 3 doesn't allow empty path
+# elements. My idea is to deprecate blank path elements and
+# allow them for the time of the deprecation period. We do
+# that by implementing our own SubPathExpr that just looks for
+# empty path elements and replaces them with a call to a
+# TALESNamespace adapter that explicitly does the empty
+# element lookup.  Then we hand off to the standard Zope 3
+# SubPathExpr implementation.  Something along these lines:
+#
+# class Zope2SubPathExpr(SubPathExpr):
+# def __init__(self, text, ...):
+# text = text.replace('//', 'blank:element')
+# return super(Zope2SubPathExpr, self).__init__(text ...)
+#
 assert ec.evaluate('d/') == 'blank'
+
 assert ec.evaluate('d/_') == 'under'
 assert ec.evaluate('d/ | nothing') == 'blank'
 assert ec.evaluate('d/?blank') == 'blank'

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py Discuss another BBB problem (noticeable due to a test failure).

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68223:
  Discuss another BBB problem (noticeable due to a test failure).
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
 2006-05-21 23:24:11 UTC (rev 68222)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
 2006-05-21 23:54:39 UTC (rev 68223)
@@ -75,11 +75,40 @@
 '''Test hybrid path expressions'''
 ec = self.ec
 assert ec.evaluate('x | python:1+1') == 2
+
+# XXX The following test fails because int here is called
+# which yields 0, not the int type. Why is it called? Because
+# PathExpr calls everything that's not on the trees by the
+# time it has counted to three.
 assert ec.evaluate('x | python:int') == int
+
+# The whole expression is a PathExpr with two subexpressions:
+# a SubPathExpr and a PythonExpr.  The first fails as
+# intended, so the second is evaluated.  The result is called.
+# The old PathExpr didn't do that.  Specifically, it wouldn't
+# call builtin types (str, unicode, dict, list, tuple, bool).
+# There are two things we can do about this now:
+
+# a) Nothing. Accept the incompatibility from Zope 2.9 to
+#2.10.  Of course, this might break existing code, but
+#there are ways to make code compatible with 2.9 and 2.10:
+#Add a nocall: before the python: expression (if that's
+#possible?!?).  You just have to know about these things
+#beforehand.
+
+# b) Provide our own PathExpr implementation that does not
+#blindly call primitive types.  We would have to keep this
+#code in Zope 2 forever which means there'd be an
+#incompatibility between Zope 2 and Zope 3 ZPTs forever.
+
+# I'm leaning towards option a). Given that this only turns
+# out to be a problem with builtin types, the breakage is
+# quite limited.
+
 assert ec.evaluate('x | string:x') == 'x'
 assert ec.evaluate('x | string:$one') == '1'
 assert ec.evaluate('x | not:exists:x')
-
+
 def testWrappers(self):
 Test if defer and lazy are returning their wrappers
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py minor clarification

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68224:
  minor clarification
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
 2006-05-21 23:54:39 UTC (rev 68223)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
 2006-05-21 23:56:43 UTC (rev 68224)
@@ -51,14 +51,15 @@
 ec = self.ec
 assert ec.evaluate('x | nothing') is None
 
-# XXX this fails because Zope 3 doesn't allow empty path
-# elements. My idea is to deprecate blank path elements and
-# allow them for the time of the deprecation period. We do
-# that by implementing our own SubPathExpr that just looks for
-# empty path elements and replaces them with a call to a
-# TALESNamespace adapter that explicitly does the empty
-# element lookup.  Then we hand off to the standard Zope 3
-# SubPathExpr implementation.  Something along these lines:
+# XXX The following test fails because Zope 3 doesn't allow
+# empty path elements.  My idea is to eventually disallow
+# blank path elements, but to allow them for a limited
+# deprecation period.  We do that by implementing our own
+# SubPathExpr that just looks for empty path elements and
+# replaces them with a call to a TALESNamespace adapter that
+# explicitly does the empty element lookup.  Then we hand off
+# to the standard Zope 3 SubPathExpr implementation.
+# Something along these lines (pseudo-ish code!):
 #
 # class Zope2SubPathExpr(SubPathExpr):
 # def __init__(self, text, ...):

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py Remind myself of yet another test failure

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68226:
  Remind myself of yet another test failure
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py
   2006-05-22 00:14:35 UTC (rev 68225)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py
   2006-05-22 00:17:08 UTC (rev 68226)
@@ -125,6 +125,11 @@
 self.assert_expected(self.folder.t, 'Loop1.html')
 
 def checkFancyLoop(self):
+# XXX iterator/first/bla is supposed to work for some reason,
+# even though iterator.first is a method that needs to be
+# called (and that won't happen when it appears inside a path
+# expr).  I wonder how this worked in Zope 2.9.  Need to
+# investigate.
 self.assert_expected(self.folder.t, 'Loop2.html')
 
 def checkGlobalsShadowLocals(self):

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py IMHO, the fact that test used to pass with the Zope 2 ZPT implementation

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68228:
  IMHO, the fact that test used to pass with the Zope 2 ZPT implementation
  demonstrates a bug in the very same: The local variable bag was kept
  when a new scope was opened, hence it could be polluted by lower scopes.
  Zope 3 makes a copy of the local variable bag when it starts a new scope.
  This is there Right Thing(tm) to do. This test is now identical to its
  Zope 3 equivalent.
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py
   2006-05-22 00:37:11 UTC (rev 68227)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py
   2006-05-22 00:47:42 UTC (rev 68228)
@@ -104,23 +104,25 @@
 def testVariables(self):
 '''Test variables'''
 ctxt = self.getContext()
-c = ctxt.vars
 ctxt.beginScope()
 ctxt.setLocal('v1', 1)
 ctxt.setLocal('v2', 2)
 
+c = ctxt.vars
 assert c['v1'] == 1, 'Variable v1'
 
 ctxt.beginScope()
 ctxt.setLocal('v1', 3)
 ctxt.setGlobal('g', 1)
 
+c = ctxt.vars
 assert c['v1'] == 3, 'Inner scope'
 assert c['v2'] == 2, 'Outer scope'
 assert c['g'] == 1, 'Global'
 
 ctxt.endScope()
 
+c = ctxt.vars
 assert c['v1'] == 1, Uncovered local
 assert c['g'] == 1, Global from inner scope
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/test get rid of unused imports

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68229:
  get rid of unused imports
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testDTMLTests.py
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testDTMLTests.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testDTMLTests.py
   2006-05-22 00:47:42 UTC (rev 68228)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testDTMLTests.py
   2006-05-22 00:51:25 UTC (rev 68229)
@@ -11,7 +11,7 @@
 #
 ##
 
-import os, sys, unittest
+import unittest
 
 import zope.component.testing
 from zope.traversing.adapters import DefaultTraversable

Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
 2006-05-22 00:47:42 UTC (rev 68228)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
 2006-05-22 00:51:25 UTC (rev 68229)
@@ -1,4 +1,4 @@
-import os, sys, unittest
+import unittest
 
 from Products.PageTemplates import Expressions
 from Products.PageTemplates.DeferExpr import LazyWrapper

Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py
   2006-05-22 00:47:42 UTC (rev 68228)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py
   2006-05-22 00:51:25 UTC (rev 68229)
@@ -11,7 +11,7 @@
 #
 ##
 
-import os, sys, unittest
+import unittest
 
 import zope.component.testing
 from zope.traversing.adapters import DefaultTraversable

Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py
   2006-05-22 00:47:42 UTC (rev 68228)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py
   2006-05-22 00:51:25 UTC (rev 68229)
@@ -1,8 +1,7 @@
-import os, sys, unittest
+import unittest
 
 from Products.PageTemplates import TALES
 from zope.tales.tests.test_tales import Harness
-import string
 
 class DummyUnicodeExpr:
 '''Dummy expression type handler returning unicode'''

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py I found out what a previously discussed failure is about and sketched out

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68230:
  I found out what a previously discussed failure is about and sketched out
  a plan how to deal with it.
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py
   2006-05-22 00:51:25 UTC (rev 68229)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testHTMLTests.py
   2006-05-22 01:08:55 UTC (rev 68230)
@@ -125,11 +125,15 @@
 self.assert_expected(self.folder.t, 'Loop1.html')
 
 def checkFancyLoop(self):
-# XXX iterator/first/bla is supposed to work for some reason,
-# even though iterator.first is a method that needs to be
-# called (and that won't happen when it appears inside a path
-# expr).  I wonder how this worked in Zope 2.9.  Need to
-# investigate.
+# XXX This checks among others for a feature of the
+# PathIterator which lets you do something like this in a path
+# expr: iterator/last/bla.  This would check whether the
+# current item in the iteration was the last one with a
+# particular 'bla' attribute value.  I wonder whether anyone
+# actually needs this? I vote for ripping it out.  We can
+# provide BBB for a certain deprecation period by enabling a
+# specialized ITraversable adapter for ZopeIterator that works
+# similar to the old PathIterator.
 self.assert_expected(self.folder.t, 'Loop2.html')
 
 def checkGlobalsShadowLocals(self):

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py Officially deprecate the BBB methods on the iterator and add a note

2006-05-21 Thread Philipp von Weitershausen
Log message for revision 68231:
  Officially deprecate the BBB methods on the iterator and add a note
  regarding our plans for the other iterator BBB code
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
   2006-05-22 01:08:55 UTC (rev 68230)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
   2006-05-22 01:17:43 UTC (rev 68231)
@@ -35,6 +35,7 @@
 
 # BBB 2005/05/01 -- remove after 12 months
 import zope.deprecation
+from zope.deprecation import deprecate
 zope.deprecation.deprecated(
 (StringExpr, NotExpr, PathExpr, SubPathExpr),
 Zope 2 uses the Zope 3 ZPT engine now.  Expression types can be 
@@ -98,7 +99,12 @@
 
 __allow_access_to_unprotected_subobjects__ = True
 
-# these used to be properties in ZTUtils.Iterator.Iterator
+# The things below used to be attributes in
+# ZTUtils.Iterator.Iterator, however in zope.tales.tales.Iterator
+# they're methods.  We need BBB on the Python level so we redefine
+# them as properties here.  Eventually, we would like to get rid
+# of them, though, so that we won't have to maintain yet another
+# iterator class somewhere.
 
 @property
 def index(self):
@@ -116,18 +122,27 @@
 def item(self):
 return super(ZopeIterator, self).item()
 
-# these aren't in zope.tales.tales.Iterator, but were in
-# ZTUtils.Iterator.Iterator
+# The following things were in ZTUtils.Iterator.Iterator but
+# aren't anymore in zope.tales.tales.Iterator.  For a good reason.
+# They're just insane.
 
+# BBB 2005/05/01 -- to be removed after 12 months
+
 @property
+@deprecate(The 'nextIndex' method has been deprecated and will disappear 
+   in Zope 2.12.  Use 'iterator.index+1' instead.)
 def nextIndex(self):
 return self.index + 1
 
+@deprecate(The 'first' method has been deprecated and will disappear 
+   in Zope 2.12.  Use the 'start' property instead.)
 def first(self, name=None):
 if self.start:
 return True
 return not self.same_part(name, self._last, self.item)
 
+@deprecate(The 'last' method has been deprecated and will disappear 
+   in Zope 2.12.  Use the 'end' property instead.)
 def last(self, name=None):
 if self.end:
 return True

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py Remove an unused import and provide another BBB one.

2006-05-23 Thread Philipp von Weitershausen
Log message for revision 68250:
  Remove an unused import and provide another BBB one.
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
   2006-05-23 08:40:04 UTC (rev 68249)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
   2006-05-23 08:53:54 UTC (rev 68250)
@@ -21,7 +21,6 @@
 from zope.tales.tales import ExpressionEngine, Context, Iterator
 from zope.tales.expressions import PathExpr, StringExpr, NotExpr
 from zope.tales.expressions import DeferExpr, SubPathExpr
-from zope.tales.expressions import SimpleModuleImporter
 from zope.tales.pythonexpr import PythonExpr
 from zope.traversing.interfaces import ITraversable
 from zope.traversing.adapters import traversePathElement
@@ -38,8 +37,9 @@
 # BBB 2005/05/01 -- remove after 12 months
 import zope.deprecation
 from zope.deprecation import deprecate
+from zope.tales.expressions import Undefs
 zope.deprecation.deprecated(
-(StringExpr, NotExpr, PathExpr, SubPathExpr),
+(StringExpr, NotExpr, PathExpr, SubPathExpr, Undefs),
 Zope 2 uses the Zope 3 ZPT engine now.  Expression types can be 
 imported from zope.tales.expressions.
 )

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/ Revert a change to a unit test that would assert that the results of hybrid

2006-05-25 Thread Philipp von Weitershausen
Log message for revision 68285:
  Revert a change to a unit test that would assert that the results of hybrid
  path expressions where the alternate expression wasn't a PathExpr is not 
called.
  See http://www.zope.org/Collectors/Zope/538, 
http://svn.zope.org/?view=revrev=22855
  and http://www.zope.org/Collectors/Zope3-dev/638.
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
   2006-05-25 19:43:25 UTC (rev 68284)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
   2006-05-25 19:45:47 UTC (rev 68285)
@@ -116,6 +116,8 @@
 else:
 # On the last subexpression allow exceptions through.
 ob = self._subexprs[-1](econtext)
+if self._hybrid:
+return ob
 
 if self._name == 'nocall':
 return ob

Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
 2006-05-25 19:43:25 UTC (rev 68284)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
 2006-05-25 19:45:47 UTC (rev 68285)
@@ -76,7 +76,7 @@
 '''Test hybrid path expressions'''
 ec = self.ec
 assert ec.evaluate('x | python:1+1') == 2
-assert ec.evaluate('x | python:int') == 0
+assert ec.evaluate('x | python:int') == int
 assert ec.evaluate('x | string:x') == 'x'
 assert ec.evaluate('x | string:$one') == '1'
 assert ec.evaluate('x | not:exists:x')

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py Supporting empty path elements seems a lost use case, as explained

2006-05-25 Thread Philipp von Weitershausen
Log message for revision 68287:
  Supporting empty path elements seems a lost use case, as explained
  in http://mail.zope.org/pipermail/zope-dev/2006-May/027493.html.
  Disable the corresponding tests therefore.
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
 2006-05-25 20:09:48 UTC (rev 68286)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testExpressions.py
 2006-05-25 20:25:06 UTC (rev 68287)
@@ -50,26 +50,11 @@
 '''Test advanced expression evaluation 1'''
 ec = self.ec
 assert ec.evaluate('x | nothing') is None
-
-# XXX The following test fails because Zope 3 doesn't allow
-# empty path elements.  My idea is to eventually disallow
-# blank path elements, but to allow them for a limited
-# deprecation period.  We do that by implementing our own
-# SubPathExpr that just looks for empty path elements and
-# replaces them with a call to a TALESNamespace adapter that
-# explicitly does the empty element lookup.  Then we hand off
-# to the standard Zope 3 SubPathExpr implementation.
-# Something along these lines (pseudo-ish code!):
-#
-# class Zope2SubPathExpr(SubPathExpr):
-# def __init__(self, text, ...):
-# text = text.replace('//', 'blank:element')
-# return super(Zope2SubPathExpr, self).__init__(text ...)
-#
-assert ec.evaluate('d/') == 'blank'
-
+# empty path elements aren't supported anymore, for the lack
+# of a use case
+#assert ec.evaluate('d/') == 'blank'
 assert ec.evaluate('d/_') == 'under'
-assert ec.evaluate('d/ | nothing') == 'blank'
+#assert ec.evaluate('d/ | nothing') == 'blank'
 assert ec.evaluate('d/?blank') == 'blank'
 
 def testHybrid(self):

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py Fix last remaining Five test failure by providing the ZPT traverser

2006-05-25 Thread Philipp von Weitershausen
Log message for revision 68293:
  Fix last remaining Five test failure by providing the ZPT traverser
  (boboTraverseAwareSimpleTraverse) with a request. Since zope.app has
  already solved this problem (and I copied zope.app's approach in the
  traverser), we can just simply reuse zope.app's code here. Yes, it
  adds another dependency on zope.app, but at least we're not duplicating
  code.
  
  All Zope 2 tests should be passing now...
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
   2006-05-25 21:10:12 UTC (rev 68292)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
   2006-05-25 21:24:36 UTC (rev 68293)
@@ -18,7 +18,7 @@
 $Id$
 
 from zope.interface import implements
-from zope.tales.tales import ExpressionEngine, Context, Iterator
+from zope.tales.tales import Context, Iterator
 from zope.tales.expressions import PathExpr, StringExpr, NotExpr
 from zope.tales.expressions import DeferExpr, SubPathExpr
 from zope.tales.pythonexpr import PythonExpr
@@ -26,6 +26,7 @@
 from zope.traversing.adapters import traversePathElement
 from zope.contentprovider.tales import TALESProviderExpression
 from zope.proxy import removeAllProxies
+import zope.app.pagetemplate.engine
 
 import OFS.interfaces
 from Acquisition import aq_base
@@ -133,16 +134,10 @@
 domain, msgid, mapping=mapping,
 context=context, default=default)
 
-class ZopeEngine(ExpressionEngine):
-
-def getContext(self, contexts=None, **kwcontexts):
-if contexts is not None:
-if kwcontexts:
-kwcontexts.update(contexts)
-else:
-kwcontexts = contexts
-return ZopeContext(self, kwcontexts)
+class ZopeEngine(zope.app.pagetemplate.engine.ZopeEngine):
 
+_create_context = ZopeContext
+
 class ZopeIterator(Iterator):
 
 # The things below used to be attributes in

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py Don't show deprecation warnings during running tests.

2006-05-25 Thread Philipp von Weitershausen
Log message for revision 68294:
  Don't show deprecation warnings during running tests.
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py
   2006-05-25 21:24:36 UTC (rev 68293)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testTALES.py
   2006-05-25 21:57:05 UTC (rev 68294)
@@ -1,6 +1,17 @@
 import unittest
 
+# BBB 2005/05/01 -- to be changed after 12 months
+# ignore deprecation warnings on import for now
+import warnings
+showwarning = warnings.showwarning
+warnings.showwarning = lambda *a, **k: None
+# this old import should remain here until the TALES.py module is
+# completely removed, so that API backward compatibility is properly
+# tested
 from Products.PageTemplates import TALES
+# restore warning machinery
+warnings.showwarning = showwarning
+
 from zope.tales.tests.test_tales import Harness
 
 class DummyUnicodeExpr:

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py cleanup (shorter name, better docstring)

2006-05-28 Thread Philipp von Weitershausen
Log message for revision 68311:
  cleanup (shorter name, better docstring)
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
   2006-05-28 13:49:16 UTC (rev 68310)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
   2006-05-28 13:54:27 UTC (rev 68311)
@@ -53,9 +53,12 @@
 # Path Expression uses them
 ZopeUndefs = Undefs + (NotFound, Unauthorized)
 
-def boboTraverseAwareSimpleTraverse(object, path_items, econtext):
-A slightly modified version of zope.tales.expressions.simpleTraverse
-that interacts correctly with objects providing 
OFS.interfaces.ITraversable.
+def boboAwareZopeTraverse(object, path_items, econtext):
+Traverses a sequence of names, first trying attributes then items.
+
+This uses Zope 3 path traversal where possible and interacts
+correctly with objects providing OFS.interface.ITraversable when
+necessary (bobo-awareness).
 
 request = getattr(econtext, 'request', None)
 path_items = list(path_items)
@@ -97,7 +100,7 @@
 
 def __init__(self, name, expr, engine):
 super(ZopePathExpr, self).__init__(name, expr, engine,
-   boboTraverseAwareSimpleTraverse)
+   boboAwareZopeTraverse)
 
 # override this to support different call metrics (see bottom of
 # method) and Zope 2's traversal exceptions (ZopeUndefs instead of
@@ -232,8 +235,8 @@
 if isinstance(name, basestring):
 name = name.split('/')
 try:
-ob1 = boboTraverseAwareSimpleTraverse(ob1, name, None)
-ob2 = boboTraverseAwareSimpleTraverse(ob2, name, None)
+ob1 = boboAwareZopeTraverse(ob1, name, None)
+ob2 = boboAwareZopeTraverse(ob2, name, None)
 except LookupError:
 return False
 return ob1 == ob2

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py Catch all possible (in Zope2) traversal exceptions

2006-05-28 Thread Philipp von Weitershausen
Log message for revision 68312:
  Catch all possible (in Zope2) traversal exceptions
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
   2006-05-28 13:54:27 UTC (rev 68311)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py
   2006-05-28 15:14:20 UTC (rev 68312)
@@ -237,7 +237,7 @@
 try:
 ob1 = boboAwareZopeTraverse(ob1, name, None)
 ob2 = boboAwareZopeTraverse(ob2, name, None)
-except LookupError:
+except ZopeUndefs:
 return False
 return ob1 == ob2
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/ Cope with changes in the TAL interpreter from TAL 1.5 to 1.6:

2006-05-28 Thread Philipp von Weitershausen
Log message for revision 68318:
  Cope with changes in the TAL interpreter from TAL 1.5 to 1.6:
  i18n:name and i18n:translate on the same element is now supported. Moreover,
  i18n:translate isn't automatically assumed for those elements with i18n:name.
  Also, the element that i18n:name is on isn't automatically removed anymore.
  You'll have to use tal:omit-tag to explicitly make it go away.
  
  For more info, see http://zope.org/Collectors/Zope3-dev/301.
  

Changed:
  U   Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/input/test29.html
  U   Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test29.html

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/input/test29.html
===
--- Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/input/test29.html 
2006-05-28 23:07:07 UTC (rev 68317)
+++ Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/input/test29.html 
2006-05-28 23:09:57 UTC (rev 68318)
@@ -1,4 +1,5 @@
 div i18n:translate=At the tone the time will be
 span i18n:data=here/currentTime
   i18n:translate=timefmt
-  i18n:name=time2:32 pm/span... beep!/div
+  i18n:name=time
+  tal:omit-tag=2:32 pm/span... beep!/div

Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test29.html
===
--- Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test29.html
2006-05-28 23:07:07 UTC (rev 68317)
+++ Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test29.html
2006-05-28 23:09:57 UTC (rev 68318)
@@ -1 +1 @@
-divAT THE TONE THE TIME WILL BE 59 MINUTES AFTER 6 PM... BEEP!/div
+divAT THE TONE THE TIME WILL BE 59 minutes after 6 PM... BEEP!/div

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal Cope with changes in the METAL interpreter

2006-05-28 Thread Philipp von Weitershausen
Log message for revision 68320:
  Cope with changes in the METAL interpreter
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal1.html
  U   
Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal7.html

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal1.html
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal1.html   
2006-05-28 23:10:37 UTC (rev 68319)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal1.html   
2006-05-28 23:11:02 UTC (rev 68320)
@@ -22,7 +22,7 @@
 
 span metal:use-macro=OUTER2
   AAA
-  xxx metal:fill-slot=OUTERSLOT
+  xxx
   spanINNER/span
   /xxx
   BBB
@@ -48,7 +48,7 @@
 
 span metal:use-macro=OUTER3
   AAA
-  xxx metal:fill-slot=OUTERSLOT
+  xxx
   spanINNER
 xxxINNERSLOT/xxx
   /span
@@ -63,7 +63,7 @@
 /span
 
 span metal:use-macro=INNER3INNER
-xxx metal:fill-slot=INNERSLOTINNERSLOT/xxx
+xxxINNERSLOT/xxx
   /span
 
 span metal:use-macro=INNER3INNER

Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal7.html
===
--- 
Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal7.html   
2006-05-28 23:10:37 UTC (rev 68319)
+++ 
Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal7.html   
2006-05-28 23:11:02 UTC (rev 68320)
@@ -2,5 +2,5 @@
 x metal:define-slot=title /
 /html
 html metal:use-macro=page i18n:domain=zope
-x metal:fill-slot=title /
+x /
 /html

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/test_htmltalparser.py Cope with TAL 1.6 bytecode changes:

2006-05-28 Thread Philipp von Weitershausen
Log message for revision 68321:
  Cope with TAL 1.6 bytecode changes:
  * tal:replace now emits something different (optTag)
  * constructs with i18n:name emits more complicated bytecode (i18nVariable, 
etc.)
to cope with behavioural changes (see 
http://zope.org/Collectors/Zope3-dev/301)
  * probably some more that aren't very interesting (if these any of this is
interesting at all)
  

Changed:
  U   
Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/test_htmltalparser.py

-=-
Modified: 
Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/test_htmltalparser.py
===
--- Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/test_htmltalparser.py 
2006-05-28 23:11:02 UTC (rev 68320)
+++ Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/test_htmltalparser.py 
2006-05-28 23:14:22 UTC (rev 68321)
@@ -345,9 +345,13 @@
 self._run_check(p tal:replace='string:foo'bar/p, [
  ('setPosition', (1, 0)),
  ('beginScope', {'tal:replace': 'string:foo'}),
- ('insertText', ('$string:foo$',
-  [('startTag', ('p', [('tal:replace', 'string:foo', 'tal')])),
-   rawtext('bar/p')])),
+ ('optTag',
+  ('p',
+   '',
+   None,
+   0,
+   [('startTag', ('p', [('tal:replace', 'string:foo', 'tal')]))],
+   [('insertText', ('$string:foo$', [rawtext('bar')]))])),
  ('endScope', ()),
  ])
 
@@ -355,10 +359,13 @@
 self._run_check(p tal:replace='text string:foo'bar/p, [
  ('setPosition', (1, 0)),
  ('beginScope', {'tal:replace': 'text string:foo'}),
- ('insertText', ('$string:foo$',
-  [('startTag', ('p',
- [('tal:replace', 'text string:foo', 'tal')])),
-   rawtext('bar/p')])),
+ ('optTag',
+  ('p',
+   '',
+   None,
+   0,
+   [('startTag', ('p', [('tal:replace', 'text string:foo', 
'tal')]))],
+   [('insertText', ('$string:foo$', [('rawtextOffset', ('bar', 
3))]))])),
  ('endScope', ()),
  ])
 
@@ -366,10 +373,14 @@
 self._run_check(p tal:replace='structure string:br'bar/p, [
  ('setPosition', (1, 0)),
  ('beginScope', {'tal:replace': 'structure string:br'}),
- ('insertStructure', ('$string:br$', {},
-  [('startTag', ('p',
-[('tal:replace', 'structure string:br', 'tal')])),
-   rawtext('bar/p')])),
+ ('optTag',
+  ('p',
+   '',
+   None,
+   0,
+   [('startTag', ('p', [('tal:replace', 'structure string:br', 
'tal')]))],
+   [('insertStructure',
+ ('$string:br$', {}, [('rawtextOffset', ('bar', 3))]))])),
  ('endScope', ()),
  ])
 
@@ -383,9 +394,13 @@
  [('tal:repeat', 'x python:(1,2,3)', 'tal')])),
('setPosition', (1, 33)),
('beginScope', {'tal:replace': 'x'}),
-   ('insertText', ('$x$',
-[('startTag', ('span', [('tal:replace', 'x', 'tal')])),
- rawtext('dummy/span')])),
+   ('optTag',
+('span',
+ '',
+ None,
+ 0,
+ [('startTag', ('span', [('tal:replace', 'x', 
'tal')]))],
+ [('insertText', ('$x$', [rawtext('dummy')]))])),
('endScope', ()),
rawtext('/p')])),
  ('endScope', ()),
@@ -416,14 +431,19 @@
 ('beginScope',
  {'tal:attributes': 'src string:foo.png',
   'tal:replace': 'structure string:img'}),
-('insertStructure',
- ('$string:img$',
-  {'src': ('$string:foo.png$', 0, None)},
-  [('startTag', ('p',
- [('tal:replace', 'structure string:img', 'tal'),
-  ('tal:attributes', 'src string:foo.png',
-   'tal')])),
-   rawtext('duh/p')])),
+('optTag',
+ ('p',
+  '',
+  None,
+  0,
+  [('startTag',
+('p',
+ [('tal:replace', 'structure string:img', 'tal'),
+  ('tal:attributes', 'src string:foo.png', 'tal')]))],
+  [('insertStructure',
+('$string:img$',
+ {'src': ('$string:foo.png$', False, None)},
+ [rawtext('duh')]))])),
 ('endScope', ()),
 ])
 
@@ -454,11 +474,16 @@
 ('beginScope',
  {'tal:replace': 'notHere', 'tal:on-error': 'string:error'}),
 ('onError',
- ([('insertText', ('$notHere$',
-  

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/ Update to latest Zope 3.3 branch; it contains a traversing bugfix.

2006-05-28 Thread Philipp von Weitershausen
Log message for revision 68327:
  Update to latest Zope 3.3 branch; it contains a traversing bugfix.
  

Changed:
  _U  Zope/branches/ajung-zpt-end-game/lib/python/
  _U  Zope/branches/ajung-zpt-end-game/lib/python/zope/

-=-

Property changes on: Zope/branches/ajung-zpt-end-game/lib/python
___
Name: svn:externals
   - ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
BTrees -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/BTrees
persistent -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/persistent
ThreadedAsync  -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ThreadedAsync
transaction-r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/transaction
ZEO-r 68012 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZEO
ZODB   -r 68012 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZODB
ZopeUndo   -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZopeUndo
zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
pytz   -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/pytz
zodbcode   -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zodbcode
ClientCookie   -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/ClientCookie
mechanize  -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/mechanize
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0


   + ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
BTrees -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/BTrees
persistent -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/persistent
ThreadedAsync  -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ThreadedAsync
transaction-r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/transaction
ZEO-r 68012 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZEO
ZODB   -r 68012 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZODB
ZopeUndo   -r 68012 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZopeUndo
zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
pytz   -r 68324 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/pytz
zodbcode   -r 68324 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zodbcode
ClientCookie   -r 68324 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/ClientCookie
mechanize  -r 68324 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/mechanize
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0




Property changes on: Zope/branches/ajung-zpt-end-game/lib/python/zope
___
Name: svn:externals
   - app  -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/app
cachedescriptors -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/cachedescriptors
component-r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/component
configuration-r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/configuration
documenttemplate -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/documenttemplate
event-r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/event
exceptions   -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/exceptions
hookable -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/hookable
i18n -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/i18n
i18nmessageid-r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/i18nmessageid
interface-r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/interface
modulealias  -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/modulealias
pagetemplate -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/pagetemplate
proxy-r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/proxy
publisher-r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/publisher
schema   -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/schema
security -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/security
server   -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/server
structuredtext   -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/structuredtext
tal  -r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/tal
tales-r 68282 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zope/tales
testing  -r 67760 
svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing
thread   -r 68282 

[Zope-Checkins] Re: SVN: Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal Cope with changes in the METAL interpreter

2006-05-29 Thread Philipp von Weitershausen
Philipp von Weitershausen wrote:
 Log message for revision 68320:
   Cope with changes in the METAL interpreter

In case anyone is interested in the details, this behaviourial change is
due to the fact that metal:use-macro and metal:define-macro can now
occur on the same tag. The corresponding change occurred in Zope 3 a
while ago: http://svn.zope.org/?view=revrev=28489.

 Changed:
   U   
 Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal1.html
   U   
 Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal7.html
 
 -=-
 Modified: 
 Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal1.html
 ===
 --- 
 Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal1.html 
 2006-05-28 23:10:37 UTC (rev 68319)
 +++ 
 Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal1.html 
 2006-05-28 23:11:02 UTC (rev 68320)
 @@ -22,7 +22,7 @@
  
  span metal:use-macro=OUTER2
AAA
 -  xxx metal:fill-slot=OUTERSLOT
 +  xxx
spanINNER/span
/xxx
BBB
 @@ -48,7 +48,7 @@
  
  span metal:use-macro=OUTER3
AAA
 -  xxx metal:fill-slot=OUTERSLOT
 +  xxx
spanINNER
  xxxINNERSLOT/xxx
/span
 @@ -63,7 +63,7 @@
  /span
  
  span metal:use-macro=INNER3INNER
 -xxx metal:fill-slot=INNERSLOTINNERSLOT/xxx
 +xxxINNERSLOT/xxx
/span
  
  span metal:use-macro=INNER3INNER
 
 Modified: 
 Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal7.html
 ===
 --- 
 Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal7.html 
 2006-05-28 23:10:37 UTC (rev 68319)
 +++ 
 Zope/branches/ajung-zpt-end-game/lib/python/TAL/tests/output/test_metal7.html 
 2006-05-28 23:11:02 UTC (rev 68320)
 @@ -2,5 +2,5 @@
  x metal:define-slot=title /
  /html
  html metal:use-macro=page i18n:domain=zope
 -x metal:fill-slot=title /
 +x /
  /html


___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/trunk/ Merge ajung-zpt-end-game branch.

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68331:
  Merge ajung-zpt-end-game branch.
  

Changed:
  U   Products.Five/trunk/CHANGES.txt
  D   Products.Five/trunk/browser/ProviderExpression.py
  D   Products.Five/trunk/browser/ReuseUtils.py
  D   Products.Five/trunk/browser/TrustedExpression.py
  U   Products.Five/trunk/browser/pagetemplatefile.py
  U   Products.Five/trunk/browser/tests/i18n.pt
  A   Products.Five/trunk/browser/tests/i18n.py
  U   Products.Five/trunk/browser/tests/pages.py
  U   Products.Five/trunk/browser/tests/pages.txt
  U   Products.Five/trunk/browser/tests/test_i18n.py
  U   Products.Five/trunk/browser/tests/test_pages.py
  U   Products.Five/trunk/formlib/formbase.py
  U   Products.Five/trunk/viewlet/directives.txt

-=-
Modified: Products.Five/trunk/CHANGES.txt
===
--- Products.Five/trunk/CHANGES.txt 2006-05-29 07:08:39 UTC (rev 68330)
+++ Products.Five/trunk/CHANGES.txt 2006-05-29 09:47:23 UTC (rev 68331)
@@ -5,6 +5,13 @@
 Five 1.5c (Unreleased)
 ==
 
+Restructuring
+-
+
+* Zope 2.10+ uses the Zope 3 PageTemplate engine (incl. TAL and
+  TALES).  A bunch of special and magic code in Five has become
+  obsolete with this, some other had to be readjusted.
+
 Bugfixes
 
 

Deleted: Products.Five/trunk/browser/ProviderExpression.py
===
--- Products.Five/trunk/browser/ProviderExpression.py   2006-05-29 07:08:39 UTC 
(rev 68330)
+++ Products.Five/trunk/browser/ProviderExpression.py   2006-05-29 09:47:23 UTC 
(rev 68331)
@@ -1,62 +0,0 @@
-##
-#
-# Copyright (c) 2004 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.
-#
-##
-Provider tales expression registrations
-
-$Id: tales.py 39606 2005-10-25 02:59:26Z srichter $
-
-__docformat__ = 'restructuredtext'
-from Products.PageTemplates.Expressions import StringExpr
-from Products.PageTemplates.Expressions import getEngine
-from AccessControl.ZopeGuards import guarded_hasattr
-from AccessControl.ZopeSecurityPolicy import getRoles
-import Products.Five.security
-
-import zope.component
-import zope.schema
-import zope.interface
-from zope.contentprovider import interfaces
-from zope.contentprovider.tales import addTALNamespaceData
-
-_noroles = []
-
-class ProviderExpr(StringExpr):
-A provider expression for Zope2 templates.
-
-
-zope.interface.implements(interfaces.ITALESProviderExpression)
-def __call__(self, econtext):
-name = StringExpr.__call__(self, econtext)
-context = econtext.vars['context']
-request = econtext.vars['request']
-view = econtext.vars['view']
-
-# Try to look up the provider.
-provider = zope.component.queryMultiAdapter(
-(context, request, view), interfaces.IContentProvider, name)
-
-# Provide a useful error message, if the provider was not found.
-if provider is None:
-raise interfaces.ContentProviderLookupError(name)
-
-# Insert the data gotten from the context
-addTALNamespaceData(provider, econtext)
-
-# Stage 1: Do the state update.
-provider.update()
-
-# Stage 2: Render the HTML content.
-return provider.render()
-
-# Register Provider expression
-getEngine().registerType('provider', ProviderExpr)

Deleted: Products.Five/trunk/browser/ReuseUtils.py
===
--- Products.Five/trunk/browser/ReuseUtils.py   2006-05-29 07:08:39 UTC (rev 
68330)
+++ Products.Five/trunk/browser/ReuseUtils.py   2006-05-29 09:47:23 UTC (rev 
68331)
@@ -1,32 +0,0 @@
-##
-#
-# Copyright (c) 2004, 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.
-#
-##
-Utils to be reused
-
-$Id$
-
-from new import function
-
-def rebindFunction(f,rebindDir=None,**rebinds):
-  '''return *f* 

[Zope-Checkins] SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/ Switch to latest Five trunk (ajung-zpt-end-game branch was merged there)

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68332:
  Switch to latest Five trunk (ajung-zpt-end-game branch was merged there)
  

Changed:
  _U  Zope/branches/ajung-zpt-end-game/lib/python/Products/

-=-

Property changes on: Zope/branches/ajung-zpt-end-game/lib/python/Products
___
Name: svn:externals
   - Five 
svn://svn.zope.org/repos/main/Products.Five/branches/ajung-zpt-end-game

   + Five -r 68331 svn://svn.zope.org/repos/main/Products.Five/trunk


___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/releases/Zope2/DEPENDENCIES.cfg Include zope.wfmc and zope.app.wfmc in zope 2.10 release series.

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68334:
  Include zope.wfmc and zope.app.wfmc in zope 2.10 release series.
  

Changed:
  U   Zope/trunk/releases/Zope2/DEPENDENCIES.cfg

-=-
Modified: Zope/trunk/releases/Zope2/DEPENDENCIES.cfg
===
--- Zope/trunk/releases/Zope2/DEPENDENCIES.cfg  2006-05-29 10:34:19 UTC (rev 
68333)
+++ Zope/trunk/releases/Zope2/DEPENDENCIES.cfg  2006-05-29 10:35:21 UTC (rev 
68334)
@@ -64,13 +64,15 @@
 zope.app.undo
 zope.app.zptpage
 zope.app.intid
-# zope.appkeyreference should be stated as a dependency 
+# zope.app.keyreference should be stated as a dependency 
 # in zope.app.intid/DEPENDENCIES.cfg in Zope 3
 zope.app.keyreference
 zope.app.session
 
 zope.contentprovider
 zope.viewlet
+zope.wfmc
+zope.app.wfmc
 
 # zope.app depends for us on:
 # - ZODB

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ajung- Get rid of no longer needed branches.

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68335:
  Get rid of no longer needed branches.
  

Changed:
  D   Zope/branches/ajung-final-zpt-integration/
  D   Zope/branches/ajung-zpt-end-game/
  D   Zope/branches/ajung-zpt-integration/
  D   Zope/branches/ajung-zpt-strict-unicode/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/branches/ajung-zpt-end-game/ Get rid of no longer needed branches.

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68336:
  Get rid of no longer needed branches.
  

Changed:
  D   Products.Five/branches/ajung-zpt-end-game/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/ Get rid of merged branch/branch that we never used.

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68354:
  Get rid of merged branch/branch that we never used.
  

Changed:
  D   Zope/branches/philikon-deprecate-interfaces/
  D   Zope/branches/zope33-port/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/branches/1.2/ Get ready for release

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68362:
  Get ready for release
  

Changed:
  U   Products.Five/branches/1.2/CHANGES.txt
  U   Products.Five/branches/1.2/version.txt

-=-
Modified: Products.Five/branches/1.2/CHANGES.txt
===
--- Products.Five/branches/1.2/CHANGES.txt  2006-05-29 20:31:03 UTC (rev 
68361)
+++ Products.Five/branches/1.2/CHANGES.txt  2006-05-29 20:50:44 UTC (rev 
68362)
@@ -2,7 +2,7 @@
 Five Changes
 
 
-Five 1.2.x (unreleased)
+Five 1.2.5 (2006-05-29)
 ===
 
 Bugfixes

Modified: Products.Five/branches/1.2/version.txt
===
--- Products.Five/branches/1.2/version.txt  2006-05-29 20:31:03 UTC (rev 
68361)
+++ Products.Five/branches/1.2/version.txt  2006-05-29 20:50:44 UTC (rev 
68362)
@@ -1 +1 @@
-Five 1.2.4
+Five 1.2.5

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/tags/1.2.5/ Tag release

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68363:
  Tag release
  

Changed:
  A   Products.Five/tags/1.2.5/

-=-
Copied: Products.Five/tags/1.2.5 (from rev 68362, Products.Five/branches/1.2)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/branches/1.3/ prepare for release

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68364:
  prepare for release
  

Changed:
  U   Products.Five/branches/1.3/CHANGES.txt
  U   Products.Five/branches/1.3/version.txt

-=-
Modified: Products.Five/branches/1.3/CHANGES.txt
===
--- Products.Five/branches/1.3/CHANGES.txt  2006-05-29 20:53:42 UTC (rev 
68363)
+++ Products.Five/branches/1.3/CHANGES.txt  2006-05-29 20:55:47 UTC (rev 
68364)
@@ -2,7 +2,7 @@
 Five Changes
 
 
-Five 1.3.x (unreleased)
+Five 1.3.6 (2006-05-29)
 ===
 
 Bugfixes
@@ -160,6 +160,18 @@
   components has been removed as that functionality is now in the Zope
   2 core as of Zope 2.9.
 
+Five 1.2.5 (2006-05-29)
+===
+
+Bugfixes
+
+
+* Fixed an issue where browser:page based views that didn't have
+  template or attribute defined weren't getting BrowserView mixed in.
+
+* Fixed an issue where new-style classes could not be used for
+  view components with browser:page.
+
 Five 1.2.4 (2006-05-04)
 ===
 

Modified: Products.Five/branches/1.3/version.txt
===
--- Products.Five/branches/1.3/version.txt  2006-05-29 20:53:42 UTC (rev 
68363)
+++ Products.Five/branches/1.3/version.txt  2006-05-29 20:55:47 UTC (rev 
68364)
@@ -1 +1 @@
-Five 1.3.5
+Five 1.3.6

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/trunk/doc/main.txt Get rid of confusiing paragraph and refer to compat matrix instead

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68367:
  Get rid of confusiing paragraph and refer to compat matrix instead
  

Changed:
  U   Products.Five/trunk/doc/main.txt

-=-
Modified: Products.Five/trunk/doc/main.txt
===
--- Products.Five/trunk/doc/main.txt2006-05-29 21:01:58 UTC (rev 68366)
+++ Products.Five/trunk/doc/main.txt2006-05-29 21:06:52 UTC (rev 68367)
@@ -13,18 +13,12 @@
 
 We've tried to keep the Five experience as close to Zope 3 as
 possible, so this means that what you learn while using Five should
-also be applicable to Zope 3, and viceversa.
+also be applicable to Zope 3, and viceversa.  We're in the process of
+evaluating lots more Zope 3 technologies for integration into Zope 2.
+This is the right moment for interested Zope 2 and Zope 3 developers
+to jump in.  We're looking for cooperation between different Zope 2
+projects so that this can be a foundational system for us all.
 
-Five 1.0 and 1.1 work on a straight Zope 2.7 installation, as long as
-Zope 3 has been installed.  Five 1.2 requires Zope 2.8 which already
-ships with Zope 3, Five 1.3 is included in Zope 2.9.
-
-We're in the process of evaluating lots more Zope 3 technologies for
-integration into Zope 2.  This is the right moment for interested Zope
-2 and Zope 3 developers to jump in.  We're looking for cooperation
-between different Zope 2 projects so that this can be a foundational
-system for us all.
-
 Download
 
 
@@ -44,6 +38,10 @@
 
 http://codespeak.net/z3/five/release/Five-1.4.tgz
 
+To check which version of Five is compatible with which version of
+Zope, please refer to the `compatibility matrix
+http://codespeak.net/z3/five/INSTALL.html`_.
+
 Joining the project
 ---
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.9/ Update Five to newest bugfix release

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68368:
  Update Five to newest bugfix release
  

Changed:
  U   Zope/branches/2.9/doc/CHANGES.txt
  _U  Zope/branches/2.9/lib/python/Products/

-=-
Modified: Zope/branches/2.9/doc/CHANGES.txt
===
--- Zope/branches/2.9/doc/CHANGES.txt   2006-05-29 21:06:52 UTC (rev 68367)
+++ Zope/branches/2.9/doc/CHANGES.txt   2006-05-29 21:08:10 UTC (rev 68368)
@@ -18,8 +18,8 @@
 
Bugs fixed
 
+  - Updated Five to bugfix release 1.3.6.
 
-
   Zope 2.9.3 (2006/05/13)
 
Bugs fixed


Property changes on: Zope/branches/2.9/lib/python/Products
___
Name: svn:externals
   - Five svn://svn.zope.org/repos/main/Products.Five/tags/1.3.5

   + Five svn://svn.zope.org/repos/main/Products.Five/tags/1.3.6


___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/branches/1.4/ get ready for release.

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68369:
  get ready for release.
  

Changed:
  U   Products.Five/branches/1.4/CHANGES.txt
  U   Products.Five/branches/1.4/version.txt

-=-
Modified: Products.Five/branches/1.4/CHANGES.txt
===
--- Products.Five/branches/1.4/CHANGES.txt  2006-05-29 21:08:10 UTC (rev 
68368)
+++ Products.Five/branches/1.4/CHANGES.txt  2006-05-29 21:10:28 UTC (rev 
68369)
@@ -2,7 +2,7 @@
 Five Changes
 
 
-Five 1.4 (Unreleased)
+Five 1.4 (2006-05-29)
 =
 
 Bugfixes
@@ -20,7 +20,6 @@
 * Five.testbrowser capitalizes headers in the same way as the Zope2
   HTTPResponse. i.e. content-length - Content-Length.
 
-
 Five 1.4c (2006-05-04)
 ==
 
@@ -65,6 +64,18 @@
   NOTE: Anyone who copied the Five site.zcml to their
   $INSTANCE_HOME/etc/ directory is going to need to update it.
 
+Five 1.3.6 (2006-05-29)
+===
+
+Bugfixes
+
+
+* Fixed an issue where browser:page based views that didn't have
+  template or attribute defined weren't getting BrowserView mixed in.
+
+* Fixed an issue where new-style classes could not be used for
+  view components with browser:page.
+
 Five 1.3.5 (2006-05-04)
 ===
 
@@ -211,6 +222,18 @@
   components has been removed as that functionality is now in the Zope
   2 core as of Zope 2.9.
 
+Five 1.2.5 (2006-05-29)
+===
+
+Bugfixes
+
+
+* Fixed an issue where browser:page based views that didn't have
+  template or attribute defined weren't getting BrowserView mixed in.
+
+* Fixed an issue where new-style classes could not be used for
+  view components with browser:page.
+
 Five 1.2.4 (2006-05-04)
 ===
 

Modified: Products.Five/branches/1.4/version.txt
===
--- Products.Five/branches/1.4/version.txt  2006-05-29 21:08:10 UTC (rev 
68368)
+++ Products.Five/branches/1.4/version.txt  2006-05-29 21:10:28 UTC (rev 
68369)
@@ -1 +1 @@
-Five 1.4c
+Five 1.4

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/tags/1.4/ Tag release

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68370:
  Tag release
  

Changed:
  A   Products.Five/tags/1.4/

-=-
Copied: Products.Five/tags/1.4 (from rev 68369, Products.Five/branches/1.4)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/trunk/CHANGES.txt prepare release

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68371:
  prepare release
  

Changed:
  U   Products.Five/trunk/CHANGES.txt

-=-
Modified: Products.Five/trunk/CHANGES.txt
===
--- Products.Five/trunk/CHANGES.txt 2006-05-29 21:10:57 UTC (rev 68370)
+++ Products.Five/trunk/CHANGES.txt 2006-05-29 21:11:59 UTC (rev 68371)
@@ -2,7 +2,7 @@
 Five Changes
 
 
-Five 1.5c (Unreleased)
+Five 1.5c (2006-05-29)
 ==
 
 Restructuring
@@ -36,10 +36,12 @@
 * Provided the 'default' layer alias for backwards compability.  It
   was deleted by accident during the Zope 3.3 port.
 
+* Five.testbrowser does not swallow cookies anymore, based on patch by
+  Daniel Nouri.
+
 * Five.testbrowser capitalizes headers in the same way as the Zope2
   HTTPResponse. i.e. content-length - Content-Length.
 
-
 Five 1.5b (2006-05-04)
 ==
 
@@ -52,20 +54,24 @@
   deprecated, as the functionality exists in the Zope core publisher
   from Zope 2.10 and up.
 
-
-Five 1.4 (Unreleased)
+Five 1.4 (2006-05-29)
 =
 
 Bugfixes
 
 
+* Fixed an issue where browser:page based views that didn't have
+  template or attribute defined weren't getting BrowserView mixed in.
+
+* Fixed an issue where new-style classes could not be used for
+  view components with browser:page.
+
 * Five.testbrowser does not swallow cookies anymore, based on patch by
   Daniel Nouri.
 
 * Five.testbrowser capitalizes headers in the same way as the Zope2
   HTTPResponse. i.e. content-length - Content-Length.
 
-
 Five 1.4c (2006-05-04)
 ==
 
@@ -110,6 +116,18 @@
   NOTE: Anyone who copied the Five site.zcml to their
   $INSTANCE_HOME/etc/ directory is going to need to update it.
 
+Five 1.3.6 (2006-05-29)
+===
+
+Bugfixes
+
+
+* Fixed an issue where browser:page based views that didn't have
+  template or attribute defined weren't getting BrowserView mixed in.
+
+* Fixed an issue where new-style classes could not be used for
+  view components with browser:page.
+
 Five 1.3.5 (2006-05-04)
 ===
 
@@ -256,6 +274,18 @@
   components has been removed as that functionality is now in the Zope
   2 core as of Zope 2.9.
 
+Five 1.2.5 (2006-05-29)
+===
+
+Bugfixes
+
+
+* Fixed an issue where browser:page based views that didn't have
+  template or attribute defined weren't getting BrowserView mixed in.
+
+* Fixed an issue where new-style classes could not be used for
+  view components with browser:page.
+
 Five 1.2.4 (2006-05-04)
 ===
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/tags/1.5c/ Tag release

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68372:
  Tag release
  

Changed:
  A   Products.Five/tags/1.5c/

-=-
Copied: Products.Five/tags/1.5c (from rev 68371, Products.Five/trunk)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/tags/1.5c/ Need to tag again.

2006-05-29 Thread Philipp von Weitershausen
Log message for revision 68374:
  Need to tag again.
  

Changed:
  D   Products.Five/tags/1.5c/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/PageTemplates/ Allow access to ZopeIterator/PathIterator API from restricted Python

2006-06-01 Thread Philipp von Weitershausen
Log message for revision 68451:
  Allow access to ZopeIterator/PathIterator API from restricted Python
  (e.g. python expressions)
  

Changed:
  U   Zope/trunk/lib/python/Products/PageTemplates/Expressions.py
  U   Zope/trunk/lib/python/Products/PageTemplates/tests/testExpressions.py

-=-
Modified: Zope/trunk/lib/python/Products/PageTemplates/Expressions.py
===
--- Zope/trunk/lib/python/Products/PageTemplates/Expressions.py 2006-06-01 
19:56:09 UTC (rev 68450)
+++ Zope/trunk/lib/python/Products/PageTemplates/Expressions.py 2006-06-01 
20:26:48 UTC (rev 68451)
@@ -152,6 +152,10 @@
 
 class ZopeIterator(Iterator):
 
+# allow iterator API to be accessed from (restricted) Python TALES
+# expressions
+__allow_access_to_unprotected_subobjects__ = True
+
 # The things below used to be attributes in
 # ZTUtils.Iterator.Iterator, however in zope.tales.tales.Iterator
 # they're methods.  We need BBB on the Python level so we redefine

Modified: Zope/trunk/lib/python/Products/PageTemplates/tests/testExpressions.py
===
--- Zope/trunk/lib/python/Products/PageTemplates/tests/testExpressions.py   
2006-06-01 19:56:09 UTC (rev 68450)
+++ Zope/trunk/lib/python/Products/PageTemplates/tests/testExpressions.py   
2006-06-01 20:26:48 UTC (rev 68451)
@@ -69,6 +69,14 @@
 assert ec.evaluate('x | string:$one') == '1'
 assert ec.evaluate('x | not:exists:x')
 
+def testIteratorZRPythonExpr(self):
+'''Test access to iterator functions from Python expressions'''
+ec = self.ec
+ec.beginScope()
+ec.setRepeat('loop', python:[1,2,3])
+assert ec.evaluate(python:repeat['loop'].even())
+ec.endScope()
+
 def testWrappers(self):
 Test if defer and lazy are returning their wrappers
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.10/lib/python/Products/PageTemplates/ Merge from trunk:

2006-06-01 Thread Philipp von Weitershausen
Log message for revision 68452:
  Merge from trunk:
   Log message for revision 68451:
Allow access to ZopeIterator/PathIterator API from restricted Python
(e.g. python expressions)
  

Changed:
  U   Zope/branches/2.10/lib/python/Products/PageTemplates/Expressions.py
  U   
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testExpressions.py

-=-
Modified: Zope/branches/2.10/lib/python/Products/PageTemplates/Expressions.py
===
--- Zope/branches/2.10/lib/python/Products/PageTemplates/Expressions.py 
2006-06-01 20:26:48 UTC (rev 68451)
+++ Zope/branches/2.10/lib/python/Products/PageTemplates/Expressions.py 
2006-06-01 20:28:04 UTC (rev 68452)
@@ -152,6 +152,10 @@
 
 class ZopeIterator(Iterator):
 
+# allow iterator API to be accessed from (restricted) Python TALES
+# expressions
+__allow_access_to_unprotected_subobjects__ = True
+
 # The things below used to be attributes in
 # ZTUtils.Iterator.Iterator, however in zope.tales.tales.Iterator
 # they're methods.  We need BBB on the Python level so we redefine

Modified: 
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testExpressions.py
===
--- 
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testExpressions.py   
2006-06-01 20:26:48 UTC (rev 68451)
+++ 
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testExpressions.py   
2006-06-01 20:28:04 UTC (rev 68452)
@@ -69,6 +69,14 @@
 assert ec.evaluate('x | string:$one') == '1'
 assert ec.evaluate('x | not:exists:x')
 
+def testIteratorZRPythonExpr(self):
+'''Test access to iterator functions from Python expressions'''
+ec = self.ec
+ec.beginScope()
+ec.setRepeat('loop', python:[1,2,3])
+assert ec.evaluate(python:repeat['loop'].even())
+ec.endScope()
+
 def testWrappers(self):
 Test if defer and lazy are returning their wrappers
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/branches/philikon-viewzpt-refactor/ Branch for some work on ViewZPTs

2006-06-10 Thread Philipp von Weitershausen
Log message for revision 68573:
  Branch for some work on ViewZPTs
  

Changed:
  A   Products.Five/branches/philikon-viewzpt-refactor/

-=-
Copied: Products.Five/branches/philikon-viewzpt-refactor (from rev 68572, 
Products.Five/trunk)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/branches/philikon-viewzpt-refactor/browser/pagetemplatefile.py Attempt at simplifying ZopeTwoPageTemplate. The code doesn't look *that*

2006-06-10 Thread Philipp von Weitershausen
Log message for revision 68574:
  Attempt at simplifying ZopeTwoPageTemplate. The code doesn't look *that*
  much simpler in the end :(.
  

Changed:
  U   
Products.Five/branches/philikon-viewzpt-refactor/browser/pagetemplatefile.py

-=-
Modified: 
Products.Five/branches/philikon-viewzpt-refactor/browser/pagetemplatefile.py
===
--- 
Products.Five/branches/philikon-viewzpt-refactor/browser/pagetemplatefile.py
2006-06-10 18:46:54 UTC (rev 68573)
+++ 
Products.Five/branches/philikon-viewzpt-refactor/browser/pagetemplatefile.py
2006-06-10 18:48:37 UTC (rev 68574)
@@ -15,80 +15,67 @@
 
 $Id$
 
-import os, sys
-
-from Globals import package_home
-from Products.PageTemplates.PageTemplateFile import PageTemplateFile
+import AccessControl.Owned
+from Acquisition import aq_inner, aq_acquire
+from DocumentTemplate.DT_Util import TemplateDict
+from Shared.DC.Scripts.Bindings import Bindings
 from Products.PageTemplates.Expressions import SecureModuleImporter
 from Products.PageTemplates.Expressions import createTrustedZopeEngine
+from zope.app.pagetemplate import viewpagetemplatefile
 
-from zope.app.pagetemplate.viewpagetemplatefile import ViewMapper
-from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-
 _engine = createTrustedZopeEngine()
 def getEngine():
 return _engine
 
-class ZopeTwoPageTemplateFile(PageTemplateFile):
-A strange hybrid between Zope 2 and Zope 3 page template.
+class ViewPageTemplateFile(Bindings, AccessControl.Owned.Owned,
+   viewpagetemplatefile.ViewPageTemplateFile):
 
-Uses Zope 2's engine, but with security disabled and with some
-initialization and API from Zope 3.
-
+_default_bindings = {'name_subpath': 'traverse_subpath'}
+_Bindings_ns_class = TemplateDict
 
 def __init__(self, filename, _prefix=None, content_type=None):
-# XXX doesn't use content_type yet
-
 self.ZBindings_edit(self._default_bindings)
+_prefix = self.get_path_from_prefix(_prefix)
+super(ViewPageTemplateFile, self).__init__(
+filename, _prefix, content_type)
 
-path = self.get_path_from_prefix(_prefix)
-self.filename = os.path.join(path, filename)
-if not os.path.isfile(self.filename):
-raise ValueError(No such file, self.filename)
-
-basepath, ext = os.path.splitext(self.filename)
-self.__name__ = os.path.basename(basepath)
-
-super(PageTemplateFile, self).__init__(self.filename, _prefix)
-
-def get_path_from_prefix(self, _prefix):
-if isinstance(_prefix, str):
-path = _prefix
-else:
-if _prefix is None:
-_prefix = sys._getframe(2).f_globals
-path = package_home(_prefix)
-return path
-
 def pt_getEngine(self):
 return getEngine()
 
-def pt_getContext(self):
+def pt_getContext(self, instance, request, **kw):
+namespace = super(ViewPageTemplateFile, self).pt_getContext(
+instance, request, **kw)
+bound_names = namespace['options'].pop('bound_names')
+namespace.update(bound_names)
+
+context = aq_inner(instance.context)
 try:
-root = self.getPhysicalRoot()
+root = aq_acquire(context, 'getPhysicalRoot')()
 except AttributeError:
-root = self.context.getPhysicalRoot()
-# Even if the context isn't a view (when would that be exaclty?),
-# there shouldn't be any dange in applying a view, because it
-# won't be used.  However assuming that a lack of getPhysicalRoot
-# implies a missing view causes problems.
-view = self._getContext()
+raise
+# we can't access the root, probably because 'context' is
+# something that doesn't support Acquisition.  You lose.
+root = None
+namespace.update({
+'context': context,
+'here': context,
+'container': context,
+'root': root,
+'user': AccessControl.getSecurityManager().getUser(),
+'modules': SecureModuleImporter,
+})
+return namespace
 
-here = self.context.aq_inner
+# this will be called by Bindings.__call__
+def _exec(self, bound_names, args, kw):
+kw['bound_names'] = bound_names
+return viewpagetemplatefile.ViewPageTemplateFile.__call__(
+self, *args, **kw)
 
-request = getattr(root, 'REQUEST', None)
-c = {'template': self,
- 'here': here,
- 'context': here,
- 'container': here,
- 'nothing': None,
- 'options': {},
- 'root': root,
- 'request': request,
- 'modules': SecureModuleImporter,
- }
-if view is not None:
-c['view'] = view
-c['views'] 

[Zope-Checkins] SVN: Products.Five/branches/philikon-viewzpt-refactor/browser/tests/template_variables.pt Don't use template.aq_base (the template isn't acquisitionish anymore)

2006-06-10 Thread Philipp von Weitershausen
Log message for revision 68575:
  Don't use template.aq_base (the template isn't acquisitionish anymore)
  and adjust accordign to new class name
  

Changed:
  U   
Products.Five/branches/philikon-viewzpt-refactor/browser/tests/template_variables.pt

-=-
Modified: 
Products.Five/branches/philikon-viewzpt-refactor/browser/tests/template_variables.pt
===
--- 
Products.Five/branches/philikon-viewzpt-refactor/browser/tests/template_variables.pt
2006-06-10 18:48:37 UTC (rev 68574)
+++ 
Products.Five/branches/philikon-viewzpt-refactor/browser/tests/template_variables.pt
2006-06-10 18:49:37 UTC (rev 68575)
@@ -10,7 +10,7 @@
 Root is the application: tal:block 
   replace=python:repr(root).find('Application') != -1 /
 Template is a template: tal:block 
-  
replace=python:repr(template.aq_base).startswith('ZopeTwoPageTemplateFile') 
/
+  replace=python:'ViewPageTemplateFile object' in repr(template) /
 Traverse_subpath exists and is empty: tal:block 
   replace=python:traverse_subpath == [] /
 Request is a request: tal:block 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/branches/philikon-viewzpt-refactor/viewlet/directives.txt ViewPTF isn't a simpleitem anymore, so no meta_type

2006-06-10 Thread Philipp von Weitershausen
Log message for revision 68576:
  ViewPTF isn't a simpleitem anymore, so no meta_type
  

Changed:
  U   Products.Five/branches/philikon-viewzpt-refactor/viewlet/directives.txt

-=-
Modified: 
Products.Five/branches/philikon-viewzpt-refactor/viewlet/directives.txt
===
--- Products.Five/branches/philikon-viewzpt-refactor/viewlet/directives.txt 
2006-06-10 18:49:37 UTC (rev 68575)
+++ Products.Five/branches/philikon-viewzpt-refactor/viewlet/directives.txt 
2006-06-10 18:50:36 UTC (rev 68576)
@@ -130,8 +130,8 @@
   Products.Five.viewlet.manager.ViewletManager providing ILeftColumn object 
...
ILeftColumn.providedBy(manager)
   True
-   manager.template.meta_type
-  'Page Template (File)'
+   manager.template
+  BoundPageTemplateFile of Products.Five.viewlet.manager.ViewletManager 
providing ILeftColumn object at ...
manager.update()
print manager.render().strip()
   div class=column
@@ -164,8 +164,8 @@
class 'Products.Five.viewlet.manager.ViewletManagerBase')
ILeftColumn.providedBy(manager)
   True
-   manager.template.meta_type
-  'Page Template (File)'
+   manager.template
+  BoundPageTemplateFile of Products.Five.viewlet.manager.ViewletManager 
providing ILeftColumn object at ...
manager.update()
print manager.render().strip()
   div class=column

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/trunk/ * Added Five.browser.pagetemplatefile.ViewPageTemplateFile as an alias

2006-06-10 Thread Philipp von Weitershausen
Log message for revision 68579:
  * Added Five.browser.pagetemplatefile.ViewPageTemplateFile as an alias
to ZopeTwoPageTemplateFile and as a Zope 2 correspondence to
zope.app.pagetemplate.ViewPageTemplateFile.
  
  

Changed:
  U   Products.Five/trunk/CHANGES.txt
  U   Products.Five/trunk/browser/pagetemplatefile.py

-=-
Modified: Products.Five/trunk/CHANGES.txt
===
--- Products.Five/trunk/CHANGES.txt 2006-06-10 22:47:34 UTC (rev 68578)
+++ Products.Five/trunk/CHANGES.txt 2006-06-10 23:13:52 UTC (rev 68579)
@@ -2,6 +2,13 @@
 Five Changes
 
 
+Five 1.5 (unreleased)
+=
+
+* Added Five.browser.pagetemplatefile.ViewPageTemplateFile as an alias
+  to ZopeTwoPageTemplateFile and as a Zope 2 correspondence to
+  zope.app.pagetemplate.ViewPageTemplateFile.
+
 Five 1.5c (2006-05-29)
 ==
 

Modified: Products.Five/trunk/browser/pagetemplatefile.py
===
--- Products.Five/trunk/browser/pagetemplatefile.py 2006-06-10 22:47:34 UTC 
(rev 68578)
+++ Products.Five/trunk/browser/pagetemplatefile.py 2006-06-10 23:13:52 UTC 
(rev 68579)
@@ -21,9 +21,7 @@
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
 from Products.PageTemplates.Expressions import SecureModuleImporter
 from Products.PageTemplates.Expressions import createTrustedZopeEngine
-
 from zope.app.pagetemplate.viewpagetemplatefile import ViewMapper
-from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
 
 _engine = createTrustedZopeEngine()
 def getEngine():
@@ -92,3 +90,5 @@
 c['views'] = ViewMapper(here, request)
 
 return c
+
+ViewPageTemplateFile = ZopeTwoPageTemplateFile

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/trunk/testbrowser.py Make Five work with newest zope.testbrowser (on Zope 3.3 branch).

2006-07-07 Thread Philipp von Weitershausen
Log message for revision 69026:
  Make Five work with newest zope.testbrowser (on Zope 3.3 branch).
  

Changed:
  U   Products.Five/trunk/testbrowser.py

-=-
Modified: Products.Five/trunk/testbrowser.py
===
--- Products.Five/trunk/testbrowser.py  2006-07-07 13:45:53 UTC (rev 69025)
+++ Products.Five/trunk/testbrowser.py  2006-07-07 13:48:23 UTC (rev 69026)
@@ -6,7 +6,6 @@
 import urllib2
 
 import mechanize
-import ClientCookie
 
 from zope.testbrowser import testing
 from zope.testbrowser import browser
@@ -68,28 +67,23 @@
 class PublisherMechanizeBrowser(mechanize.Browser):
 Special ``mechanize`` browser using the Zope Publisher HTTP handler.
 
-handler_classes = {
-# scheme handlers
-http: PublisherHTTPHandler,
+default_schemes = ['http']
+default_others = ['_http_error', '_http_request_upgrade',
+  '_http_default_error']
+default_features = ['_redirect', '_cookies', '_referer', '_refresh',
+'_equiv', '_basicauth', '_digestauth', '_seek' ]
 
-_http_error: ClientCookie.HTTPErrorProcessor,
-_http_request_upgrade: ClientCookie.HTTPRequestUpgradeProcessor,
-_http_default_error: urllib2.HTTPDefaultErrorHandler,
+def __init__(self, *args, **kws):
+inherited_handlers = ['_unknown', '_http_error',
+'_http_request_upgrade', '_http_default_error', '_basicauth',
+'_digestauth', '_redirect', '_cookies', '_referer',
+'_refresh', '_equiv', '_seek', '_gzip']
 
-# feature handlers
-_authen: urllib2.HTTPBasicAuthHandler,
-_redirect: ClientCookie.HTTPRedirectHandler,
-_cookies: ClientCookie.HTTPCookieProcessor,
-_refresh: ClientCookie.HTTPRefreshProcessor,
-_referer: mechanize.Browser.handler_classes['_referer'],
-_equiv: ClientCookie.HTTPEquivProcessor,
-_seek: ClientCookie.SeekableProcessor,
-}
+self.handler_classes = {http: PublisherHTTPHandler}
+for name in inherited_handlers:
+self.handler_classes[name] = 
mechanize.Browser.handler_classes[name]
 
-default_schemes = [http]
-default_others = [_http_error, _http_request_upgrade,
-  _http_default_error]
-default_features = [_authen, _redirect, _cookies, _seek]
+mechanize.Browser.__init__(self, *args, **kws)
 
 
 class Browser(browser.Browser):

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/branches/1.2/ Fix: Allow multiple uses of the class/content directive.

2006-08-13 Thread Philipp von Weitershausen
Log message for revision 69443:
  Fix: Allow multiple uses of the class/content directive.
  
  Also, reduce the code duplication in the directive handler tremendously
  by using the zope 3 implementation as a base class.
  

Changed:
  U   Products.Five/branches/1.2/CHANGES.txt
  U   Products.Five/branches/1.2/metaconfigure.py
  U   Products.Five/branches/1.2/security.py
  A   Products.Five/branches/1.2/tests/classes.py
  U   Products.Five/branches/1.2/tests/directives.zcml
  U   Products.Five/branches/1.2/tests/test_directives.py
  U   Products.Five/branches/1.2/tests/test_security.py
  U   Products.Five/branches/1.2/version.txt

-=-
Modified: Products.Five/branches/1.2/CHANGES.txt
===
--- Products.Five/branches/1.2/CHANGES.txt  2006-08-13 18:11:36 UTC (rev 
69442)
+++ Products.Five/branches/1.2/CHANGES.txt  2006-08-13 18:51:08 UTC (rev 
69443)
@@ -2,13 +2,15 @@
 Five Changes
 
 
-Five 1.2.6 (unreleased)
+Five 1.2.6 (2006-08-13)
 ===
 
+* Allow multiple uses of the class/content directive.
+
 * Fix problem with WebDAV/HEAD requests due to new traversal order.
 
-* Backported the new traversal lookup order from Zope 2.10 (attribute, adapter,
-  acquired attribute).
+* Backported the new traversal lookup order from Zope 2.10 (attribute,
+  adapter, acquired attribute).
 
 Five 1.2.5 (2006-05-29)
 ===

Modified: Products.Five/branches/1.2/metaconfigure.py
===
--- Products.Five/branches/1.2/metaconfigure.py 2006-08-13 18:11:36 UTC (rev 
69442)
+++ Products.Five/branches/1.2/metaconfigure.py 2006-08-13 18:51:08 UTC (rev 
69443)
@@ -19,52 +19,17 @@
 
 from zope.interface import classImplements
 from zope.configuration.exceptions import ConfigurationError
+from zope.app.component import contentdirective
+from Products.Five.security import protectName, initializeClass
 
-from security import CheckerPublic
-from security import protectName, initializeClass
+class ContentDirective(contentdirective.ContentDirective):
 
-class ContentDirective:
-
 def __init__(self, _context, class_):
 self.__class = class_
 if isinstance(self.__class, ModuleType):
 raise ConfigurationError('Content class attribute must be a class')
 self.__context = _context
 
-def implements(self, _context, interface):
-for interface in interface:
-_context.action(
-discriminator = (
-'five::directive:content', self.__class, object()),
-callable = classImplements,
-args = (self.__class, interface),
-)
-interface(_context, interface)
-
-def require(self, _context, permission=None,
-attributes=None, interface=None):
-Require a the permission to access a specific aspect
-
-if not (interface or attributes):
-raise ConfigurationError(Nothing required)
-
-if interface:
-for i in interface:
-if i:
-self.__protectByInterface(i, permission)
-if attributes:
-self.__protectNames(attributes, permission)
-
-def allow(self, _context, attributes=None, interface=None):
-Like require, but with permission_id zope.Public
-return self.require(_context, CheckerPublic, attributes, interface)
-
-def __protectByInterface(self, interface, permission_id):
-Set a permission on names in an interface.
-for n, d in interface.namesAndDescriptions(1):
-self.__protectName(n, permission_id)
-interface(self.__context, interface)
-
 def __protectName(self, name, permission_id):
 Set a permission on a particular name.
 self.__context.action(
@@ -73,15 +38,18 @@
 args = (self.__class, name, permission_id)
 )
 
-def __protectNames(self, names, permission_id):
-Set a permission on a bunch of names.
-for name in names:
-self.__protectName(name, permission_id)
+def __protectSetAttributes(self, attributes, permissions):
+raise ConfigurationError('set_attributes parameter not supported.')
 
+def __proctectSetSchema(self, schema, permission):
+raise ConfigurationError('set_schema parameter not supported.')
+
+def __mimic(self, _context, class_):
+raise ConfigurationError('like_class parameter not supported.')
+
 def __call__(self):
-Handle empty/simple declaration.
 return self.__context.action(
-discriminator = ('five:initialize:class', self.__class),
+discriminator = None,
 callable = initializeClass,
 args = (self.__class,)
 )

Modified: Products.Five/branches/1.2/security.py
===
--- 

[Zope-Checkins] SVN: Products.Five/branches/1.2/metaconfigure.py remove even more unnecessarily duplicated code

2006-08-13 Thread Philipp von Weitershausen
Log message for revision 69444:
  remove even more unnecessarily duplicated code
  

Changed:
  U   Products.Five/branches/1.2/metaconfigure.py

-=-
Modified: Products.Five/branches/1.2/metaconfigure.py
===
--- Products.Five/branches/1.2/metaconfigure.py 2006-08-13 18:51:08 UTC (rev 
69443)
+++ Products.Five/branches/1.2/metaconfigure.py 2006-08-13 18:54:56 UTC (rev 
69444)
@@ -24,12 +24,6 @@
 
 class ContentDirective(contentdirective.ContentDirective):
 
-def __init__(self, _context, class_):
-self.__class = class_
-if isinstance(self.__class, ModuleType):
-raise ConfigurationError('Content class attribute must be a class')
-self.__context = _context
-
 def __protectName(self, name, permission_id):
 Set a permission on a particular name.
 self.__context.action(

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/branches/1.3/ Merge from 1.2 branch:

2006-08-13 Thread Philipp von Weitershausen
Log message for revision 69446:
  Merge from 1.2 branch:
   Log message for revision 69443:
Fix: Allow multiple uses of the class/content directive.

Also, reduce the code duplication in the directive handler tremendously
by using the zope 3 implementation as a base class.
  

Changed:
  U   Products.Five/branches/1.3/CHANGES.txt
  U   Products.Five/branches/1.3/metaconfigure.py
  A   Products.Five/branches/1.3/tests/classes.py
  U   Products.Five/branches/1.3/tests/directives.zcml
  U   Products.Five/branches/1.3/tests/test_directives.py
  U   Products.Five/branches/1.3/tests/test_security.py
  U   Products.Five/branches/1.3/version.txt

-=-
Modified: Products.Five/branches/1.3/CHANGES.txt
===
--- Products.Five/branches/1.3/CHANGES.txt  2006-08-13 18:57:44 UTC (rev 
69445)
+++ Products.Five/branches/1.3/CHANGES.txt  2006-08-13 19:01:27 UTC (rev 
69446)
@@ -2,12 +2,14 @@
 Five Changes
 
 
-Five 1.3.7 (unreleased)
+Five 1.3.7 (2006-08-13)
 ===
 
 Bugfixes
 
 
+* Allow multiple uses of the class/content directive.
+
 * Fix problem with WebDAV/HEAD requests due to new traversal order.
 
 * Backported the new traversal lookup order from Zope 2.10 (attribute, adapter,
@@ -174,6 +176,16 @@
   components has been removed as that functionality is now in the Zope
   2 core as of Zope 2.9.
 
+Five 1.2.6 (2006-08-13)
+===
+
+* Allow multiple uses of the class/content directive.
+
+* Fix problem with WebDAV/HEAD requests due to new traversal order.
+
+* Backported the new traversal lookup order from Zope 2.10 (attribute,
+  adapter, acquired attribute).
+
 Five 1.2.5 (2006-05-29)
 ===
 

Modified: Products.Five/branches/1.3/metaconfigure.py
===
--- Products.Five/branches/1.3/metaconfigure.py 2006-08-13 18:57:44 UTC (rev 
69445)
+++ Products.Five/branches/1.3/metaconfigure.py 2006-08-13 19:01:27 UTC (rev 
69446)
@@ -15,14 +15,12 @@
 
 $Id$
 
-from Products.Five.security import CheckerPublic, protectName
-from Globals import InitializeClass as initializeClass
+from zope.configuration.exceptions import ConfigurationError
+from zope.app.component import contentdirective
+from Products.Five.security import protectName, initializeClass
 
-from zope.app.component.contentdirective import ContentDirective as \
- zope_app_ContentDirective
+class ContentDirective(contentdirective.ContentDirective):
 
-class ContentDirective(zope_app_ContentDirective):
-
 def __protectName(self, name, permission_id):
 self.__context.action(
 discriminator = ('five:protectName', self.__class, name),
@@ -30,10 +28,18 @@
 args = (self.__class, name, permission_id)
 )
 
+def __protectSetAttributes(self, attributes, permissions):
+raise ConfigurationError('set_attributes parameter not supported.')
+
+def __proctectSetSchema(self, schema, permission):
+raise ConfigurationError('set_schema parameter not supported.')
+
+def __mimic(self, _context, class_):
+raise ConfigurationError('like_class parameter not supported.')
+
 def __call__(self):
-Handle empty/simple declaration.
 return self.__context.action(
-discriminator = ('five:initialize:class', self.__class),
+discriminator = None,
 callable = initializeClass,
 args = (self.__class,)
 )

Copied: Products.Five/branches/1.3/tests/classes.py (from rev 69443, 
Products.Five/branches/1.2/tests/classes.py)

Modified: Products.Five/branches/1.3/tests/directives.zcml
===
--- Products.Five/branches/1.3/tests/directives.zcml2006-08-13 18:57:44 UTC 
(rev 69445)
+++ Products.Five/branches/1.3/tests/directives.zcml2006-08-13 19:01:27 UTC 
(rev 69446)
@@ -47,4 +47,15 @@
   factory=.adapters.OriginalAdapter
   /
 
+  !-- this tests whether content / class can be declared on the same class
+   with two different interfaces. --
+
+  class class=.classes.One 
+implements interface=.classes.IOne /
+  /class
+
+  class class=.classes.One 
+implements interface=.classes.ITwo /
+  /class
+
 /configure

Modified: Products.Five/branches/1.3/tests/test_directives.py
===
--- Products.Five/branches/1.3/tests/test_directives.py 2006-08-13 18:57:44 UTC 
(rev 69445)
+++ Products.Five/branches/1.3/tests/test_directives.py 2006-08-13 19:01:27 UTC 
(rev 69446)
@@ -59,6 +59,14 @@
dest.method()
   'Overridden'
 
+Check the result of the class directives
+
+   from Products.Five.tests.classes import One, Two, IOne, ITwo
+   IOne.implementedBy(One)
+  True
+   ITwo.implementedBy(One)
+  True
+
 Clean up adapter registry and others:
 

[Zope-Checkins] SVN: Products.Five/branches/1.4/ Merge from 1.2 branch:

2006-08-13 Thread Philipp von Weitershausen
Log message for revision 69449:
  Merge from 1.2 branch:
   Log message for revision 69443:
Fix: Allow multiple uses of the class/content directive.

Also, reduce the code duplication in the directive handler tremendously
by using the zope 3 implementation as a base class.
  

Changed:
  U   Products.Five/branches/1.4/CHANGES.txt
  U   Products.Five/branches/1.4/metaconfigure.py
  A   Products.Five/branches/1.4/tests/classes.py
  U   Products.Five/branches/1.4/tests/directives.zcml
  U   Products.Five/branches/1.4/tests/test_directives.py
  U   Products.Five/branches/1.4/tests/test_security.py

-=-
Modified: Products.Five/branches/1.4/CHANGES.txt
===
--- Products.Five/branches/1.4/CHANGES.txt  2006-08-13 19:06:48 UTC (rev 
69448)
+++ Products.Five/branches/1.4/CHANGES.txt  2006-08-13 19:08:16 UTC (rev 
69449)
@@ -2,12 +2,14 @@
 Five Changes
 
 
-Five 1.4.1 (unreleased)
+Five 1.4.1 (2006-08-13)
 ===
 
 Bugfixes
 
 
+* Allow multiple uses of the class/content directive.
+
 * Fix problem with WebDAV/HEAD requests due to new traversal order.
 
 * Made the pythonproducts monkey patching more robust by checking to
@@ -93,6 +95,22 @@
   NOTE: Anyone who copied the Five site.zcml to their
   $INSTANCE_HOME/etc/ directory is going to need to update it.
 
+Five 1.3.7 (2006-08-13)
+===
+
+Bugfixes
+
+
+* Allow multiple uses of the class/content directive.
+
+* Fix problem with WebDAV/HEAD requests due to new traversal order.
+
+* Backported the new traversal lookup order from Zope 2.10 (attribute, adapter,
+  acquired attribute).
+
+* fiveconfigure.py: Removed import of deprecated 'LOG' object from 'zLOG'
+  in favor of the facilities provided by Python's 'logging' module.
+
 Five 1.3.6 (2006-05-29)
 ===
 
@@ -251,6 +269,16 @@
   components has been removed as that functionality is now in the Zope
   2 core as of Zope 2.9.
 
+Five 1.2.6 (2006-08-13)
+===
+
+* Allow multiple uses of the class/content directive.
+
+* Fix problem with WebDAV/HEAD requests due to new traversal order.
+
+* Backported the new traversal lookup order from Zope 2.10 (attribute,
+  adapter, acquired attribute).
+
 Five 1.2.5 (2006-05-29)
 ===
 

Modified: Products.Five/branches/1.4/metaconfigure.py
===
--- Products.Five/branches/1.4/metaconfigure.py 2006-08-13 19:06:48 UTC (rev 
69448)
+++ Products.Five/branches/1.4/metaconfigure.py 2006-08-13 19:08:16 UTC (rev 
69449)
@@ -15,14 +15,12 @@
 
 $Id$
 
-from Products.Five.security import CheckerPublic, protectName
-from Globals import InitializeClass as initializeClass
+from zope.configuration.exceptions import ConfigurationError
+from zope.app.component import contentdirective
+from Products.Five.security import protectName, initializeClass
 
-from zope.app.component.contentdirective import ContentDirective as \
- zope_app_ContentDirective
+class ContentDirective(contentdirective.ContentDirective):
 
-class ContentDirective(zope_app_ContentDirective):
-
 def __protectName(self, name, permission_id):
 self.__context.action(
 discriminator = ('five:protectName', self.__class, name),
@@ -30,10 +28,18 @@
 args = (self.__class, name, permission_id)
 )
 
+def __protectSetAttributes(self, attributes, permissions):
+raise ConfigurationError('set_attributes parameter not supported.')
+
+def __proctectSetSchema(self, schema, permission):
+raise ConfigurationError('set_schema parameter not supported.')
+
+def __mimic(self, _context, class_):
+raise ConfigurationError('like_class parameter not supported.')
+
 def __call__(self):
-Handle empty/simple declaration.
 return self.__context.action(
-discriminator = ('five:initialize:class', self.__class),
+discriminator = None,
 callable = initializeClass,
 args = (self.__class,)
 )

Copied: Products.Five/branches/1.4/tests/classes.py (from rev 69446, 
Products.Five/branches/1.3/tests/classes.py)

Modified: Products.Five/branches/1.4/tests/directives.zcml
===
--- Products.Five/branches/1.4/tests/directives.zcml2006-08-13 19:06:48 UTC 
(rev 69448)
+++ Products.Five/branches/1.4/tests/directives.zcml2006-08-13 19:08:16 UTC 
(rev 69449)
@@ -47,4 +47,15 @@
   factory=.adapters.OriginalAdapter
   /
 
+  !-- this tests whether content / class can be declared on the same class
+   with two different interfaces. --
+
+  class class=.classes.One 
+implements interface=.classes.IOne /
+  /class
+
+  class class=.classes.One 
+implements interface=.classes.ITwo /
+  /class
+
 /configure

Modified: 

[Zope-Checkins] SVN: Products.Five/trunk/ Merge from 1.2 branch:

2006-08-13 Thread Philipp von Weitershausen
Log message for revision 69450:
  Merge from 1.2 branch:
   Log message for revision 69443:
Fix: Allow multiple uses of the class/content directive.

Also, reduce the code duplication in the directive handler tremendously
by using the zope 3 implementation as a base class.
  

Changed:
  U   Products.Five/trunk/CHANGES.txt
  U   Products.Five/trunk/metaconfigure.py
  A   Products.Five/trunk/tests/classes.py
  U   Products.Five/trunk/tests/directives.zcml
  U   Products.Five/trunk/tests/test_directives.py
  U   Products.Five/trunk/tests/test_security.py

-=-
Modified: Products.Five/trunk/CHANGES.txt
===
--- Products.Five/trunk/CHANGES.txt 2006-08-13 19:08:16 UTC (rev 69449)
+++ Products.Five/trunk/CHANGES.txt 2006-08-13 19:16:44 UTC (rev 69450)
@@ -2,13 +2,15 @@
 Five Changes
 
 
-Five 1.5 (unreleased)
+Five 1.5 (2006-08-13)
 =
 
 * Enabled the viewlet related directives by default.
 
 * Added acquisition wrappers to viewlets before updating or rendering.
 
+* Allow multiple uses of the class/content directive.
+
 * Moved the custom 'provider:' tales expression back into Five.  Made the
   provider directive acquisition wrap the resultant content provider so that
   simple providers that need security declarations (e.g. those that render
@@ -79,6 +81,28 @@
   deprecated, as the functionality exists in the Zope core publisher
   from Zope 2.10 and up.
 
+Five 1.4.1 (2006-08-13)
+===
+
+Bugfixes
+
+
+* Allow multiple uses of the class/content directive.
+
+* Fix problem with WebDAV/HEAD requests due to new traversal order.
+
+* Made the pythonproducts monkey patching more robust by checking to
+  ensure patches aren't reapplied and cleaning up after itself.
+
+* Backported the new traversal lookup order from Zope 2.10 (attribute, adapter,
+  acquired attribute).
+
+* Made the provider directive acquisition wrap the resultant content provider
+  so that simple providers that need security declarations (e.g. those that
+  render pagetemplates) can work with the Zope 2 security machinery.
+
+* Added acquisition wrappers to viewlets before updating or rendering.
+
 Five 1.4 (2006-05-29)
 =
 
@@ -141,6 +165,22 @@
   NOTE: Anyone who copied the Five site.zcml to their
   $INSTANCE_HOME/etc/ directory is going to need to update it.
 
+Five 1.3.7 (2006-08-13)
+===
+
+Bugfixes
+
+
+* Allow multiple uses of the class/content directive.
+
+* Fix problem with WebDAV/HEAD requests due to new traversal order.
+
+* Backported the new traversal lookup order from Zope 2.10 (attribute, adapter,
+  acquired attribute).
+
+* fiveconfigure.py: Removed import of deprecated 'LOG' object from 'zLOG'
+  in favor of the facilities provided by Python's 'logging' module.
+
 Five 1.3.6 (2006-05-29)
 ===
 
@@ -299,6 +339,16 @@
   components has been removed as that functionality is now in the Zope
   2 core as of Zope 2.9.
 
+Five 1.2.6 (2006-08-13)
+===
+
+* Allow multiple uses of the class/content directive.
+
+* Fix problem with WebDAV/HEAD requests due to new traversal order.
+
+* Backported the new traversal lookup order from Zope 2.10 (attribute,
+  adapter, acquired attribute).
+
 Five 1.2.5 (2006-05-29)
 ===
 

Modified: Products.Five/trunk/metaconfigure.py
===
--- Products.Five/trunk/metaconfigure.py2006-08-13 19:08:16 UTC (rev 
69449)
+++ Products.Five/trunk/metaconfigure.py2006-08-13 19:16:44 UTC (rev 
69450)
@@ -15,13 +15,12 @@
 
 $Id$
 
-import warnings
-from Products.Five.security import CheckerPublic, protectName
-from Globals import InitializeClass as initializeClass
-import zope.app.component.contentdirective
+from zope.configuration.exceptions import ConfigurationError
+from zope.app.component import contentdirective
+from Products.Five.security import protectName, initializeClass
 
-class ClassDirective(zope.app.component.contentdirective.ClassDirective):
-
+class ClassDirective(contentdirective.ClassDirective):
+
 def __protectName(self, name, permission_id):
 self.__context.action(
 discriminator = ('five:protectName', self.__class, name),
@@ -29,16 +28,24 @@
 args = (self.__class, name, permission_id)
 )
 
+def __protectSetAttributes(self, attributes, permissions):
+raise ConfigurationError('set_attributes parameter not supported.')
+
+def __proctectSetSchema(self, schema, permission):
+raise ConfigurationError('set_schema parameter not supported.')
+
+def __mimic(self, _context, class_):
+raise ConfigurationError('like_class parameter not supported.')
+
 def __call__(self):
-Handle empty/simple declaration.
 return self.__context.action(
-discriminator = 

[Zope-Checkins] SVN: Products.Five/tags/1.2.6/ Tag Five 1.2.6

2006-08-13 Thread Philipp von Weitershausen
Log message for revision 69451:
  Tag Five 1.2.6
  

Changed:
  A   Products.Five/tags/1.2.6/

-=-
Copied: Products.Five/tags/1.2.6 (from rev 69450, Products.Five/branches/1.2)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/tags/1.3.7/ Tag Five 1.3.7

2006-08-13 Thread Philipp von Weitershausen
Log message for revision 69452:
  Tag Five 1.3.7
  

Changed:
  A   Products.Five/tags/1.3.7/

-=-
Copied: Products.Five/tags/1.3.7 (from rev 69451, Products.Five/branches/1.3)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/tags/1.4.1/ Tag Five 1.4.1

2006-08-13 Thread Philipp von Weitershausen
Log message for revision 69453:
  Tag Five 1.4.1
  

Changed:
  A   Products.Five/tags/1.4.1/

-=-
Copied: Products.Five/tags/1.4.1 (from rev 69452, Products.Five/branches/1.4)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/trunk/doc/main.txt update website docs pointing to new releases

2006-08-13 Thread Philipp von Weitershausen
Log message for revision 69454:
  update website docs pointing to new releases
  

Changed:
  U   Products.Five/trunk/doc/main.txt

-=-
Modified: Products.Five/trunk/doc/main.txt
===
--- Products.Five/trunk/doc/main.txt2006-08-13 19:20:13 UTC (rev 69453)
+++ Products.Five/trunk/doc/main.txt2006-08-13 19:22:56 UTC (rev 69454)
@@ -22,22 +22,27 @@
 Download
 
 
-We have released Five 1.2.5 on 29 May 2006.  You may download it
+We have released Five 1.2.6 on 13 August 2006.  You may download it
 here:
 
-http://codespeak.net/z3/five/release/Five-1.2.5.tgz
+http://codespeak.net/z3/five/release/Five-1.2.6.tgz
 
-We have also released Five 1.3.6.  This is a bugfix release for Five
+We have also released Five 1.3.7.  This is a bugfix release for Five
 1.3 and will be included in the next Zope 2.9 bugfix release.  You may
 download it here:
 
-http://codespeak.net/z3/five/release/Five-1.3.6.tgz
+http://codespeak.net/z3/five/release/Five-1.3.7.tgz
 
-We have also released Five 1.4.  This is a feature release and is
+We have also released Five 1.4.1.  This is a feature release and is
 compatible with Zope 2.9.  You may download it here:
 
-http://codespeak.net/z3/five/release/Five-1.4.tgz
+http://codespeak.net/z3/five/release/Five-1.4.1.tgz
 
+We have also released Five 1.5.  It will be included with the next
+Zope 2.10 release.  You may download it here:
+
+http://codespeak.net/z3/five/release/Five-1.5.tgz
+
 To check which version of Five is compatible with which version of
 Zope, please refer to the `compatibility matrix
 http://codespeak.net/z3/five/INSTALL.html`_.

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/tags/1.5/ Tag Five 1.5 release

2006-08-13 Thread Philipp von Weitershausen
Log message for revision 69455:
  Tag Five 1.5 release
  

Changed:
  A   Products.Five/tags/1.5/

-=-
Copied: Products.Five/tags/1.5 (from rev 69454, Products.Five/trunk)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.9/ Switch to newer Five release

2006-08-13 Thread Philipp von Weitershausen
Log message for revision 69456:
  Switch to newer Five release
  

Changed:
  U   Zope/branches/2.9/doc/CHANGES.txt
  _U  Zope/branches/2.9/lib/python/Products/

-=-
Modified: Zope/branches/2.9/doc/CHANGES.txt
===
--- Zope/branches/2.9/doc/CHANGES.txt   2006-08-13 19:23:50 UTC (rev 69455)
+++ Zope/branches/2.9/doc/CHANGES.txt   2006-08-13 20:14:24 UTC (rev 69456)
@@ -8,6 +8,8 @@
 
Bugs fixed
 
+  - Updated Five to bugfix release 1.3.7.
+
   - Collector #2157: Expose name of broken class in SystemError raised
 from '__getstate__' of a broken instance.
 


Property changes on: Zope/branches/2.9/lib/python/Products
___
Name: svn:externals
   - Five svn://svn.zope.org/repos/main/Products.Five/tags/1.3.6

   + Five svn://svn.zope.org/repos/main/Products.Five/tags/1.3.7


___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.10/ Switch to newer Five release.

2006-08-13 Thread Philipp von Weitershausen
Log message for revision 69457:
  Switch to newer Five release.
  

Changed:
  U   Zope/branches/2.10/doc/CHANGES.txt
  _U  Zope/branches/2.10/lib/python/Products/

-=-
Modified: Zope/branches/2.10/doc/CHANGES.txt
===
--- Zope/branches/2.10/doc/CHANGES.txt  2006-08-13 20:14:24 UTC (rev 69456)
+++ Zope/branches/2.10/doc/CHANGES.txt  2006-08-13 20:27:58 UTC (rev 69457)
@@ -8,6 +8,8 @@
 
 Bugs Fixed
 
+  - Updated Five to stable 1.5 release.
+
   - Traversal order changes were causing WebDAV requests which used
 acquisition to fail.
 


Property changes on: Zope/branches/2.10/lib/python/Products
___
Name: svn:externals
   - Five-r 69026 svn://svn.zope.org/repos/main/Products.Five/trunk


   + Fivesvn://svn.zope.org/repos/main/Products.Five/tags/1.5



___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/tags/philikon-localzptcustomization-prototype/ Get rid of old prototype that's no longer needed anymore now that we have

2006-10-29 Thread Philipp von Weitershausen
Log message for revision 70978:
  Get rid of old prototype that's no longer needed anymore now that we have
  five.customerize.
  

Changed:
  D   Products.Five/tags/philikon-localzptcustomization-prototype/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/branches/zope33-port/ get rid of ooooold branch

2006-10-29 Thread Philipp von Weitershausen
Log message for revision 70979:
  get rid of old branch
  

Changed:
  D   Products.Five/branches/zope33-port/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/branches/1.5/doc/main.txt announce new five releases

2006-11-04 Thread Philipp von Weitershausen
Log message for revision 71072:
  announce new five releases
  

Changed:
  U   Products.Five/branches/1.5/doc/main.txt

-=-
Modified: Products.Five/branches/1.5/doc/main.txt
===
--- Products.Five/branches/1.5/doc/main.txt 2006-11-04 20:10:38 UTC (rev 
71071)
+++ Products.Five/branches/1.5/doc/main.txt 2006-11-04 20:26:10 UTC (rev 
71072)
@@ -27,21 +27,21 @@
 
 http://codespeak.net/z3/five/release/Five-1.2.6.tgz
 
-We have also released Five 1.3.7.  This is a bugfix release for Five
-1.3 and will be included in the next Zope 2.9 bugfix release.  You may
-download it here:
+We have released Five 1.3.8 on 4 November 2006.  This is a bugfix
+release for Five 1.3 and will be included in the next Zope 2.9 bugfix
+release.  You may download it here:
 
-http://codespeak.net/z3/five/release/Five-1.3.7.tgz
+http://codespeak.net/z3/five/release/Five-1.3.8.tgz
 
-We have also released Five 1.4.1.  This is a feature release and is
+We have also released Five 1.4.2.  This is a feature release and is
 compatible with Zope 2.9.  You may download it here:
 
-http://codespeak.net/z3/five/release/Five-1.4.1.tgz
+http://codespeak.net/z3/five/release/Five-1.4.2.tgz
 
-We have also released Five 1.5.  It will be included with the next
-Zope 2.10 release.  You may download it here:
+We have also released Five 1.5.1.  It will be included with the next
+Zope 2.10 bugfix release.  You may download it here:
 
-http://codespeak.net/z3/five/release/Five-1.5.tgz
+http://codespeak.net/z3/five/release/Five-1.5.1.tgz
 
 To check which version of Five is compatible with which version of
 Zope, please refer to the `compatibility matrix

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/ Put a certain changelog entry in the right place

2006-11-04 Thread Philipp von Weitershausen
Log message for revision 71074:
  Put a certain changelog entry in the right place
  

Changed:
  U   Products.Five/branches/1.3/CHANGES.txt
  U   Products.Five/branches/1.4/CHANGES.txt
  U   Products.Five/branches/1.5/CHANGES.txt
  U   Products.Five/trunk/CHANGES.txt

-=-
Modified: Products.Five/branches/1.3/CHANGES.txt
===
--- Products.Five/branches/1.3/CHANGES.txt  2006-11-04 20:27:14 UTC (rev 
71073)
+++ Products.Five/branches/1.3/CHANGES.txt  2006-11-04 20:41:28 UTC (rev 
71074)
@@ -13,6 +13,9 @@
 * Port code from Zope 3 making resource directories recursive.
   Thanks to Richard Waid.
 
+* Made the __call__ method of ViewMixinForAttributes have the same signature
+  as the original attribute.  This aids some pathological request parameter
+  marshalling.
 
 Five 1.3.7 (2006-08-13)
 ===
@@ -20,10 +23,6 @@
 Bugfixes
 
 
-* Made the __call__ method of ViewMixinForAttributes have the same signature
-  as the original attribute.  This aids some pathological request parameter
-  marshalling.
-
 * Allow multiple uses of the class/content directive.
 
 * Fix problem with WebDAV/HEAD requests due to new traversal order.

Modified: Products.Five/branches/1.4/CHANGES.txt
===
--- Products.Five/branches/1.4/CHANGES.txt  2006-11-04 20:27:14 UTC (rev 
71073)
+++ Products.Five/branches/1.4/CHANGES.txt  2006-11-04 20:41:28 UTC (rev 
71074)
@@ -130,6 +130,9 @@
 * Port code from Zope 3 making resource directories recursive.
   Thanks to Richard Waid.
 
+* Made the __call__ method of ViewMixinForAttributes have the same signature
+  as the original attribute.  This aids some pathological request parameter
+  marshalling.
 
 Five 1.3.7 (2006-08-13)
 ===

Modified: Products.Five/branches/1.5/CHANGES.txt
===
--- Products.Five/branches/1.5/CHANGES.txt  2006-11-04 20:27:14 UTC (rev 
71073)
+++ Products.Five/branches/1.5/CHANGES.txt  2006-11-04 20:41:28 UTC (rev 
71074)
@@ -227,6 +227,9 @@
 * Port code from Zope 3 making resource directories recursive.
   Thanks to Richard Waid.
 
+* Made the __call__ method of ViewMixinForAttributes have the same signature
+  as the original attribute.  This aids some pathological request parameter
+  marshalling.
 
 Five 1.3.7 (2006-08-13)
 ===

Modified: Products.Five/trunk/CHANGES.txt
===
--- Products.Five/trunk/CHANGES.txt 2006-11-04 20:27:14 UTC (rev 71073)
+++ Products.Five/trunk/CHANGES.txt 2006-11-04 20:41:28 UTC (rev 71074)
@@ -236,6 +236,9 @@
 * Port code from Zope 3 making resource directories recursive.
   Thanks to Richard Waid.
 
+* Made the __call__ method of ViewMixinForAttributes have the same signature
+  as the original attribute.  This aids some pathological request parameter
+  marshalling.
 
 Five 1.3.7 (2006-08-13)
 ===

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.9/lib/python/Products/PageTemplates/tests/ Give test a better name

2007-01-08 Thread Philipp von Weitershausen
Log message for revision 71797:
  Give test a better name
  

Changed:
  D   
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/input/Attributes.html
  A   
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/input/BooleanAttributesAndDefault.html
  D   
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/output/Attributes.html
  A   
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/output/BooleanAttributesAndDefault.html
  U   Zope/branches/2.9/lib/python/Products/PageTemplates/tests/testHTMLTests.py

-=-
Deleted: 
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/input/Attributes.html
===
--- 
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/input/Attributes.html 
2007-01-08 12:56:56 UTC (rev 71796)
+++ 
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/input/Attributes.html 
2007-01-08 13:04:38 UTC (rev 71797)
@@ -1,7 +0,0 @@
-html
-head/head
-body
-p tal:attributes=disabled python:True and default or 'disabled'/p
-p tal:attributes=disabled python:False and default or 'disabled'/p
-/body
-/html

Copied: 
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/input/BooleanAttributesAndDefault.html
 (from rev 71791, 
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/input/Attributes.html)

Deleted: 
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/output/Attributes.html
===
--- 
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/output/Attributes.html
2007-01-08 12:56:56 UTC (rev 71796)
+++ 
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/output/Attributes.html
2007-01-08 13:04:38 UTC (rev 71797)
@@ -1,7 +0,0 @@
-html
-head/head
-body
-p/p
-p disabled=disabled/p
-/body
-/html

Copied: 
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/output/BooleanAttributesAndDefault.html
 (from rev 71791, 
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/output/Attributes.html)

Modified: 
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/testHTMLTests.py
===
--- Zope/branches/2.9/lib/python/Products/PageTemplates/tests/testHTMLTests.py  
2007-01-08 12:56:56 UTC (rev 71796)
+++ Zope/branches/2.9/lib/python/Products/PageTemplates/tests/testHTMLTests.py  
2007-01-08 13:04:38 UTC (rev 71797)
@@ -156,8 +156,11 @@
 self.assert_expected(self.folder.t, 'CheckI18nTranslateHooked.html')
 setGlobalTranslationService(old_ts)
 
-def checkAttributes(self):
-self.assert_expected(self.folder.t, 'Attributes.html')
+def checkBooleanAttributesAndDefault(self):
+# Zope 2.9 and below support the semantics that an HTML
+# boolean attribute (e.g. 'selected', 'disabled', etc.) can
+# be used together with 'default'.
+self.assert_expected(self.folder.t, 'BooleanAttributesAndDefault.html')
 
 def test_suite():
 return unittest.makeSuite(HTMLTests, 'check')

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.10/ Fixed Collector #2223: Evaluation of booleans in TALES and the 'default' variable.

2007-01-08 Thread Philipp von Weitershausen
Log message for revision 71799:
  Fixed Collector #2223: Evaluation of booleans in TALES and the 'default' 
variable.
  
  That consisted of forwardporting r70918 and r71797 from the 2.9 branch and 
providing
  a fix.
  

Changed:
  U   Zope/branches/2.10/doc/CHANGES.txt
  U   Zope/branches/2.10/lib/python/Products/PageTemplates/Expressions.py
  A   
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/input/BooleanAttributesAndDefault.html
  A   
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/output/BooleanAttributesAndDefault.html
  U   
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testHTMLTests.py

-=-
Modified: Zope/branches/2.10/doc/CHANGES.txt
===
--- Zope/branches/2.10/doc/CHANGES.txt  2007-01-08 13:16:22 UTC (rev 71798)
+++ Zope/branches/2.10/doc/CHANGES.txt  2007-01-08 13:18:19 UTC (rev 71799)
@@ -8,6 +8,9 @@
 
 Bugs fixed
 
+  - Fixed Collector #2223: Evaluation of booleans in TALES and the
+'default' variable.
+
   - Reverted backward-incompatible fix for Collector #2191.
 
   - Fixed the creation of lib/python/Zope2/version.txt

Modified: Zope/branches/2.10/lib/python/Products/PageTemplates/Expressions.py
===
--- Zope/branches/2.10/lib/python/Products/PageTemplates/Expressions.py 
2007-01-08 13:16:22 UTC (rev 71798)
+++ Zope/branches/2.10/lib/python/Products/PageTemplates/Expressions.py 
2007-01-08 13:18:19 UTC (rev 71799)
@@ -182,12 +182,20 @@
 domain, msgid, mapping=mapping,
 context=context, default=default)
 
+def evaluateBoolean(self, expr):
+value = self.evaluate(expr)
+# here we override the normal Zope 3 behaviour.  Zope 3
+# doesn't care about the default in a boolean expression,
+# while we do (Zope 2 legacy, see the
+# BooleanAttributesAndDefault.html test case)
+if value is self.getDefault():
+return value
+return bool(value)
 
 def evaluateText(self, expr):
  customized version in order to get rid of unicode
 errors for all and ever
 
-
 text = self.evaluate(expr)
 
 if text is self.getDefault() or text is None:

Copied: 
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/input/BooleanAttributesAndDefault.html
 (from rev 71797, 
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/input/BooleanAttributesAndDefault.html)

Copied: 
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/output/BooleanAttributesAndDefault.html
 (from rev 71797, 
Zope/branches/2.9/lib/python/Products/PageTemplates/tests/output/BooleanAttributesAndDefault.html)

Modified: 
Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testHTMLTests.py
===
--- Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testHTMLTests.py 
2007-01-08 13:16:22 UTC (rev 71798)
+++ Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testHTMLTests.py 
2007-01-08 13:18:19 UTC (rev 71799)
@@ -173,6 +173,12 @@
 def checkRepeatVariable(self):
 self.assert_expected(self.folder.t, 'RepeatVariable.html')
 
+def checkBooleanAttributesAndDefault(self):
+# Zope 2.9 and below support the semantics that an HTML
+# boolean attribute (e.g. 'selected', 'disabled', etc.) can
+# be used together with 'default'.
+self.assert_expected(self.folder.t, 'BooleanAttributesAndDefault.html')
+
 def test_suite():
 return unittest.makeSuite(HTMLTests, 'check')
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/lib/python/ZPublisher/tests/testPublish.py get rid of deprecated import

2007-01-08 Thread Philipp von Weitershausen
Log message for revision 71801:
  get rid of deprecated import
  

Changed:
  U   Zope/trunk/lib/python/ZPublisher/tests/testPublish.py

-=-
Modified: Zope/trunk/lib/python/ZPublisher/tests/testPublish.py
===
--- Zope/trunk/lib/python/ZPublisher/tests/testPublish.py   2007-01-08 
13:23:38 UTC (rev 71800)
+++ Zope/trunk/lib/python/ZPublisher/tests/testPublish.py   2007-01-08 
13:25:10 UTC (rev 71801)
@@ -1,4 +1,4 @@
-from zope.app.publication.browser import setDefaultSkin
+from zope.publisher.browser import setDefaultSkin
 from zope.publisher.interfaces.browser import IDefaultBrowserLayer
 from ZPublisher import Retry
 from ZODB.POSException import ConflictError

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/branches/1.5/ Merge from 1.4 branch:

2007-01-08 Thread Philipp von Weitershausen
Log message for revision 71815:
  Merge from 1.4 branch:
Log message for revision 71811:
  Add an ftest that demonstrates zope.security.management.checkPermission() 
works in Zope 2.
  This is the reproduceability test case for 
http://www.zope.org/Collectors/Zope/2190.
Log message for revision 71813:
  Also test for a permission that anonymous doesn't have.
  
  Also, added support for the securityPolicy directive which will now be used 
by Zope 2.
  

Changed:
  U   Products.Five/branches/1.5/CHANGES.txt
  U   Products.Five/branches/1.5/INSTALL.txt
  A   Products.Five/branches/1.5/browser/tests/test_zope3security.py
  A   Products.Five/branches/1.5/browser/tests/zope3security.py
  U   Products.Five/branches/1.5/meta.zcml
  U   Products.Five/branches/1.5/version.txt

-=-
Modified: Products.Five/branches/1.5/CHANGES.txt
===
--- Products.Five/branches/1.5/CHANGES.txt  2007-01-08 16:15:34 UTC (rev 
71814)
+++ Products.Five/branches/1.5/CHANGES.txt  2007-01-08 16:16:26 UTC (rev 
71815)
@@ -5,6 +5,9 @@
 Five 1.5.2 (unreleased)
 ===
 
+* Added support for the securityPolicy / ZCML directive known from
+  Zope 3.
+
 * View methods which aren't explicitly declared as allowed must be marked
   private explicitly to avoid being web publishable.
 

Modified: Products.Five/branches/1.5/INSTALL.txt
===
--- Products.Five/branches/1.5/INSTALL.txt  2007-01-08 16:15:34 UTC (rev 
71814)
+++ Products.Five/branches/1.5/INSTALL.txt  2007-01-08 16:16:26 UTC (rev 
71815)
@@ -1,10 +1,10 @@
 How to install Five
 ===
 
-Requirements for Five 1.5
--
+Requirements for Five 1.5.2
+---
 
-* Zope 2.10 with Python 2.4.1+
+* Zope 2.10.2 with Python 2.4.3+
 
 Note that Five 1.5 is already part of Zope 2.10.  You can still
 install a newer Five version in your instance, if you like.  It will

Copied: Products.Five/branches/1.5/browser/tests/test_zope3security.py (from 
rev 71811, Products.Five/branches/1.4/browser/tests/test_zope3security.py)
===
--- Products.Five/branches/1.4/browser/tests/test_zope3security.py  
2007-01-08 15:27:41 UTC (rev 71811)
+++ Products.Five/branches/1.5/browser/tests/test_zope3security.py  
2007-01-08 16:16:26 UTC (rev 71815)
@@ -0,0 +1,65 @@
+import os, sys
+if __name__ == '__main__':
+execfile(os.path.join(sys.path[0], 'framework.py'))
+
+def test_check_permission():
+Code (in Zope 3) often uses
+zope.security.management.checkPermission to determine whether the
+current user has a certain permission in a given context.  Five
+inserts its own interaction that assures that such calls still
+work.
+
+   configure_zcml = '''
+  ... configure 
+  ... xmlns=http://namespaces.zope.org/zope;
+  ... xmlns:browser=http://namespaces.zope.org/browser;
+  ...   securityPolicy
+  ...   component=Products.Five.security.FiveSecurityPolicy /
+  ...   configure package=Products.Five.browser.tests
+  ... browser:page
+  ... for=OFS.interfaces.IFolder
+  ... class=.zope3security.Zope3SecurityView
+  ... name=zope3security.html
+  ... permission=zope2.View
+  ... /
+  ...   /configure
+  ... /configure'''
+
+   import Products.Five
+   from Products.Five import zcml
+   zcml.load_config(configure.zcml, Products.Five)
+   zcml.load_string(configure_zcml)
+
+In order to be able to traverse to the PageTemplate view, we need
+a traversable object:
+
+   from Products.Five.tests.testing import 
manage_addFiveTraversableFolder
+   manage_addFiveTraversableFolder(self.folder, 'testoid', 'Testoid')
+
+Now we access a page that uses
+zope.security.management.checkPermission().  We see it works as
+expected:
+
+   from Products.Five.testbrowser import Browser
+   browser = Browser()
+   
browser.open('http://localhost/test_folder_1_/testoid/@@zope3security.html?permission=zope2.View')
+   print browser.contents
+  Yes, you have the 'zope2.View' permission.
+   
browser.open('http://localhost/test_folder_1_/testoid/@@zope3security.html?permission=zope2.DeleteObjects')
+   print browser.contents
+  No, you don't have the 'zope2.DeleteObjects' permission.
+
+Clean up:
+
+   from zope.app.testing.placelesssetup import tearDown
+   tearDown()
+
+
+
+def test_suite():
+from Testing.ZopeTestCase import FunctionalDocTestSuite
+from zope.testing.doctest import ELLIPSIS
+return FunctionalDocTestSuite(optionflags=ELLIPSIS)
+
+if __name__ == '__main__':
+framework()

Copied: Products.Five/branches/1.5/browser/tests/zope3security.py (from rev 
71811, 

[Zope-Checkins] SVN: Zope/trunk/skel/etc/site.zcml Merge from 2.10 branch:

2007-01-09 Thread Philipp von Weitershausen
Log message for revision 71847:
  Merge from 2.10 branch:
Log message for revision 71846:
  Back out accidental commit from yesterday
  

Changed:
  U   Zope/trunk/skel/etc/site.zcml

-=-
Modified: Zope/trunk/skel/etc/site.zcml
===
--- Zope/trunk/skel/etc/site.zcml   2007-01-09 14:25:34 UTC (rev 71846)
+++ Zope/trunk/skel/etc/site.zcml   2007-01-09 14:26:26 UTC (rev 71847)
@@ -3,8 +3,6 @@
 xmlns:meta=http://namespaces.zope.org/meta;
 xmlns:five=http://namespaces.zope.org/five;
 
-  meta:provides feature=devmode /
-
   include package=Products.Five /
   meta:redefinePermission from=zope2.Public to=zope.Public /
 
@@ -18,6 +16,7 @@
   five:loadProducts /
 
   !-- Load the configuration overrides--
+  includeOverrides files=package-includes/*-overrides.zcml /
   five:loadProductsOverrides /
 
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Products.Five/branches/1.5/ prepare release

2007-01-10 Thread Philipp von Weitershausen
Log message for revision 71860:
  prepare release
  

Changed:
  U   Products.Five/branches/1.5/CHANGES.txt
  U   Products.Five/branches/1.5/INSTALL.txt

-=-
Modified: Products.Five/branches/1.5/CHANGES.txt
===
--- Products.Five/branches/1.5/CHANGES.txt  2007-01-10 12:24:08 UTC (rev 
71859)
+++ Products.Five/branches/1.5/CHANGES.txt  2007-01-10 14:25:58 UTC (rev 
71860)
@@ -2,7 +2,7 @@
 Five Changes
 
 
-Five 1.5.2 (unreleased)
+Five 1.5.2 (2007-01-10)
 ===
 
 * Added support for the securityPolicy / ZCML directive known from

Modified: Products.Five/branches/1.5/INSTALL.txt
===
--- Products.Five/branches/1.5/INSTALL.txt  2007-01-10 12:24:08 UTC (rev 
71859)
+++ Products.Five/branches/1.5/INSTALL.txt  2007-01-10 14:25:58 UTC (rev 
71860)
@@ -6,7 +6,7 @@
 
 * Zope 2.10.2 with Python 2.4.3+
 
-Note that Five 1.5 is already part of Zope 2.10.  You can still
+Note that Five 1.5.x is already part of Zope 2.10.x.  You can still
 install a newer Five version in your instance, if you like.  It will
 override the Five product inside the Zope tree.
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.10/ Update externals to newly released Zope 3.3.1, and remove a monkey patch that

2007-01-14 Thread Philipp von Weitershausen
Log message for revision 72027:
  Update externals to newly released Zope 3.3.1, and remove a monkey patch that
  was fixed in Zope 3.3 proper.
  

Changed:
  U   Zope/branches/2.10/doc/CHANGES.txt
  _U  Zope/branches/2.10/lib/python/
  U   Zope/branches/2.10/lib/python/Products/PageTemplates/__init__.py
  _U  Zope/branches/2.10/lib/python/zope/
  _U  Zope/branches/2.10/lib/python/zope/app/

-=-
Modified: Zope/branches/2.10/doc/CHANGES.txt
===
--- Zope/branches/2.10/doc/CHANGES.txt  2007-01-14 14:20:44 UTC (rev 72026)
+++ Zope/branches/2.10/doc/CHANGES.txt  2007-01-14 14:57:11 UTC (rev 72027)
@@ -4,6 +4,12 @@
   Change information for previous versions of Zope can be found in the
   file HISTORY.txt.
 
+  Zope 2.10.2 (unreleased)
+
+Bugs fixed
+
+  - Updated Zope 3 to bugfix release 3.3.1.
+
   Zope 2.10.2 beta 1 (2007/01/14)
 
 Bugs fixed


Property changes on: Zope/branches/2.10/lib/python
___
Name: svn:externals
   - BTrees 
svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/BTrees
ThreadedAsync  
svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ThreadedAsync
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ZEO
ZODB   
svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ZODB
ZopeUndo   
svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ZopeUndo
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope
mechanize  svn://svn.zope.org/repos/main/Zope3/tags/3.3.0/src/mechanize
persistent 
svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/persistent
pytz   svn://svn.zope.org/repos/main/Zope3/tags/3.3.0/src/pytz
transaction
svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/transaction
zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
zodbcode   svn://svn.zope.org/repos/main/Zope3/tags/3.3.0/src/zodbcode

   + BTrees 
svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/BTrees
ThreadedAsync  
svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ThreadedAsync
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ZEO
ZODB   
svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ZODB
ZopeUndo   
svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/ZopeUndo
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope
mechanize  svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/mechanize
persistent 
svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/persistent
pytz   svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/pytz
transaction
svn://svn.zope.org/repos/main/ZODB/tags/3.7-Zope-3.3.0rc1/src/transaction
zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
zodbcode   svn://svn.zope.org/repos/main/Zope3/tags/3.3.1/src/zodbcode


Modified: Zope/branches/2.10/lib/python/Products/PageTemplates/__init__.py
===
--- Zope/branches/2.10/lib/python/Products/PageTemplates/__init__.py
2007-01-14 14:20:44 UTC (rev 72026)
+++ Zope/branches/2.10/lib/python/Products/PageTemplates/__init__.py
2007-01-14 14:57:11 UTC (rev 72027)
@@ -31,25 +31,3 @@
 # Import lazily, and defer initialization to the module
 import ZopePageTemplate
 ZopePageTemplate.initialize(context)
-
-
-# HACK!!!
-# We need to monkeypatch the parseString method of the Zope 3 
-# XMLParser since the internal ZPT representation uses unicode
-# however the XMLParser (using Expat) can only deal with standard
-# Python strings. However we won't and can't convert directly
-# to UTF-8 within the ZPT wrapper code. 
-# Unicode support for (this issue) should be directly added
-# to zope.tal.xmlparser however this requires a new Zope 3.3.X
-# release. For now we fix it here.
-
-from zope.tal.xmlparser import XMLParser
-import logging
-
-def parseString(self, s):
-if isinstance(s, unicode):
-s = s.encode('utf-8')
-self.parser.Parse(s, 1)
-
-XMLParser.parseString = parseString
-logging.info('Monkeypatching zope.tal.xmlparser.XMLParser.parseString()')


Property changes on: Zope/branches/2.10/lib/python/zope
___
Name: svn:externals
   - annotation   
svn://svn.zope.org/repos/main/Zope3/tags/3.3.0/src/zope/annotation
cachedescriptors 
svn://svn.zope.org/repos/main/Zope3/tags/3.3.0/src/zope/cachedescriptors
component
svn://svn.zope.org/repos/main/Zope3/tags/3.3.0/src/zope/component
configuration
svn://svn.zope.org/repos/main/Zope3/tags/3.3.0/src/zope/configuration
contentprovider  

[Zope-Checkins] SVN: Zope/trunk/lib/python/ Remove deprecated stuff that's scheduled for removal in Zope 2.11

2007-06-03 Thread Philipp von Weitershausen
Log message for revision 76196:
  Remove deprecated stuff that's scheduled for removal in Zope 2.11
  

Changed:
  D   Zope/trunk/lib/python/ImageFile.py
  D   Zope/trunk/lib/python/Zope.py

-=-
Deleted: Zope/trunk/lib/python/ImageFile.py
===
--- Zope/trunk/lib/python/ImageFile.py  2007-06-03 09:37:52 UTC (rev 76195)
+++ Zope/trunk/lib/python/ImageFile.py  2007-06-03 09:47:20 UTC (rev 76196)
@@ -1,23 +0,0 @@
-##
-#
-# Copyright (c) 2002 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
-#
-##
-Image object that is stored in a file
-
-__version__='$Revision: 1.13 $'[11:-2]
-
-
-# BBB 2005/11/18 -- This module will be removed in Zope 2.11
-#
-from App.ImageFile import ImageFile
-import warnings
-warnings.warn(The ImageFile module will be removed in Zope 2.11. 
-  Use App.ImageFile instead., DeprecationWarning, stacklevel=2)

Deleted: Zope/trunk/lib/python/Zope.py
===
--- Zope/trunk/lib/python/Zope.py   2007-06-03 09:37:52 UTC (rev 76195)
+++ Zope/trunk/lib/python/Zope.py   2007-06-03 09:47:20 UTC (rev 76196)
@@ -1,26 +0,0 @@
-##
-#
-# 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.
-#
-##
-Legacy Zope package that redirects to the new Zope 2 package
-
-$Id$
-
-
-import sys, Zope2
-sys.modules['Zope'] = Zope2
-
-import warnings
-warnings.warn(The Zope package has been renamed to Zope2. 
-  Import of a package named 'Zope' is deprecated 
-  and will be disabled starting in Zope 2.11.,
-  DeprecationWarning, stacklevel=2)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/lib/python/ Point to the one and only RestrictedPython we now have (the one that has been set free

2007-06-04 Thread Philipp von Weitershausen
Log message for revision 76328:
  Point to the one and only RestrictedPython we now have (the one that has been 
set free
  as its own project, egg).
  

Changed:
  _U  Zope/trunk/lib/python/
  D   Zope/trunk/lib/python/RestrictedPython/

-=-

Property changes on: Zope/trunk/lib/python
___
Name: svn:externals
   - ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
BTrees -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/BTrees
persistent -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/persistent
ThreadedAsync  -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ThreadedAsync
transaction-r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/transaction
ZEO-r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZEO
ZODB   -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZODB
ZopeUndo   -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZopeUndo
zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
pytz   -r 69031 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/pytz
zodbcode   -r 69031 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zodbcode
mechanize  -r 69031 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/mechanize
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope
ClientForm svn://svn.zope.org/repos/main/Zope3/trunk/src/ClientForm


   + ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
BTrees -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/BTrees
persistent -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/persistent
ThreadedAsync  -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ThreadedAsync
transaction-r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/transaction
ZEO-r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZEO
ZODB   -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZODB
ZopeUndo   -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZopeUndo
zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
pytz   -r 69031 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/pytz
zodbcode   -r 69031 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zodbcode
mechanize  -r 69031 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/mechanize
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope
ClientForm svn://svn.zope.org/repos/main/Zope3/trunk/src/ClientForm
RestrictedPython   
svn://svn.zope.org/repos/main/RestrictedPython/tags/3.4.0/src/RestrictedPython


___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/lib/python/Interface/tests/ Use standard doctest.DocFileSuite, no need for ZopeTestCase...

2007-06-04 Thread Philipp von Weitershausen
Log message for revision 76337:
  Use standard doctest.DocFileSuite, no need for ZopeTestCase...
  

Changed:
  D   Zope/trunk/lib/python/Interface/tests/framework.py
  U   Zope/trunk/lib/python/Interface/tests/test_bridge.py

-=-
Deleted: Zope/trunk/lib/python/Interface/tests/framework.py
===
--- Zope/trunk/lib/python/Interface/tests/framework.py  2007-06-04 21:41:17 UTC 
(rev 76336)
+++ Zope/trunk/lib/python/Interface/tests/framework.py  2007-06-04 21:45:18 UTC 
(rev 76337)
@@ -1,116 +0,0 @@
-##
-#
-# 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.
-#
-##
-ZopeTestCase framework
-
-COPY THIS FILE TO YOUR 'tests' DIRECTORY.
-
-This version of framework.py will use the SOFTWARE_HOME
-environment variable to locate Zope and the Testing package.
-
-If the tests are run in an INSTANCE_HOME installation of Zope,
-Products.__path__ and sys.path with be adjusted to include the
-instance's Products and lib/python directories respectively.
-
-If you explicitly set INSTANCE_HOME prior to running the tests,
-auto-detection is disabled and the specified path will be used 
-instead.
-
-If the 'tests' directory contains a custom_zodb.py file, INSTANCE_HOME
-will be adjusted to use it.
-
-If you set the ZEO_INSTANCE_HOME environment variable a ZEO setup 
-is assumed, and you can attach to a running ZEO server (via the 
-instance's custom_zodb.py).
-
-The following code should be at the top of every test module:
-
-  import os, sys
-  if __name__ == '__main__':
-  execfile(os.path.join(sys.path[0], 'framework.py'))
-
-...and the following at the bottom:
-
-  if __name__ == '__main__':
-  framework()
-
-$Id$
-
-
-__version__ = '0.2.4'
-
-# Save start state
-#
-__SOFTWARE_HOME = os.environ.get('SOFTWARE_HOME', '')
-__INSTANCE_HOME = os.environ.get('INSTANCE_HOME', '')
-
-if __SOFTWARE_HOME.endswith(os.sep):
-__SOFTWARE_HOME = os.path.dirname(__SOFTWARE_HOME)
-
-if __INSTANCE_HOME.endswith(os.sep):
-__INSTANCE_HOME = os.path.dirname(__INSTANCE_HOME)
-
-# Find and import the Testing package
-#
-if not sys.modules.has_key('Testing'):
-p0 = sys.path[0]
-if p0 and __name__ == '__main__':
-os.chdir(p0)
-p0 = ''
-s = __SOFTWARE_HOME
-p = d = s and s or os.getcwd()
-while d:
-if os.path.isdir(os.path.join(p, 'Testing')):
-zope_home = os.path.dirname(os.path.dirname(p))
-sys.path[:1] = [p0, p, zope_home]
-break
-p, d = s and ('','') or os.path.split(p)
-else:
-print 'Unable to locate Testing package.',
-print 'You might need to set SOFTWARE_HOME.'
-sys.exit(1)
-
-import Testing, unittest
-execfile(os.path.join(os.path.dirname(Testing.__file__), 'common.py'))
-
-# Include ZopeTestCase support
-#
-if 1:   # Create a new scope
-
-p = os.path.join(os.path.dirname(Testing.__file__), 'ZopeTestCase')
-
-if not os.path.isdir(p):
-print 'Unable to locate ZopeTestCase package.',
-print 'You might need to install ZopeTestCase.'
-sys.exit(1)
-
-ztc_common = 'ztc_common.py'
-ztc_common_global = os.path.join(p, ztc_common)
-
-f = 0
-if os.path.exists(ztc_common_global):
-execfile(ztc_common_global)
-f = 1
-if os.path.exists(ztc_common):
-execfile(ztc_common)
-f = 1
-
-if not f:
-print 'Unable to locate %s.' % ztc_common
-sys.exit(1)
-
-# Debug
-#
-print 'SOFTWARE_HOME: %s' % os.environ.get('SOFTWARE_HOME', 'Not set')
-print 'INSTANCE_HOME: %s' % os.environ.get('INSTANCE_HOME', 'Not set')
-sys.stdout.flush()
-

Modified: Zope/trunk/lib/python/Interface/tests/test_bridge.py
===
--- Zope/trunk/lib/python/Interface/tests/test_bridge.py2007-06-04 
21:41:17 UTC (rev 76336)
+++ Zope/trunk/lib/python/Interface/tests/test_bridge.py2007-06-04 
21:45:18 UTC (rev 76337)
@@ -14,14 +14,13 @@
 
 $Id$
 
+import unittest
+from zope.testing.doctest import DocFileSuite
 
-import os, sys
-if __name__ == '__main__':
-execfile(os.path.join(sys.path[0], 'framework.py'))
-
 def test_suite():
-from Testing.ZopeTestCase import ZopeDocFileSuite
-return ZopeDocFileSuite('bridge.txt', package=Interface.tests)
+return unittest.TestSuite([
+DocFileSuite('bridge.txt', package='Interface.tests'),
+])
 
 

[Zope-Checkins] SVN: Zope/branches/philikon-zope2.11-with-standard-docutils/ Alternate approach to shipping with a standard docutils distribution and still preserving security

2007-06-06 Thread Philipp von Weitershausen
Log message for revision 76421:
  Alternate approach to shipping with a standard docutils distribution and 
still preserving security
  measurements that Zope installed.
  

Changed:
  A   Zope/branches/philikon-zope2.11-with-standard-docutils/

-=-
Copied: Zope/branches/philikon-zope2.11-with-standard-docutils (from rev 76420, 
Zope/trunk)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/ Alternate approach to forbidding file inclusion in reStructuredText that's used from Zope:

2007-06-06 Thread Philipp von Weitershausen
Log message for revision 76433:
  Alternate approach to forbidding file inclusion in reStructuredText that's 
used from Zope:
* ship with a standard docutils package
* don't monkey patch docutils functions, rather change the default setting 
for
  file_inclusion_enabled in the docutils parser.
  
  This changes the behaviour, however. Instead of failing with a 
NotImplementedError, users
  will now see the rendered document with a warning message.  I think this is 
much more
  sensible, anyway.
  

Changed:
  _U  Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/
  U   
Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/DocumentTemplate/tests/testDTML.py
  U   
Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/Products/ZReST/ZReST.py
  U   
Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/Products/ZReST/tests/test_ZReST.py
  U   
Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/reStructuredText/__init__.py
  U   
Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/reStructuredText/tests/testReST.py

-=-

Property changes on: 
Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python
___
Name: svn:externals
   - ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
BTrees -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/BTrees
persistent -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/persistent
ThreadedAsync  -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ThreadedAsync
transaction-r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/transaction
ZEO-r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZEO
ZODB   -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZODB
ZopeUndo   -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZopeUndo
zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
pytz   -r 69031 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/pytz
zodbcode   -r 69031 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zodbcode
mechanize  -r 69031 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/mechanize
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope
ClientForm svn://svn.zope.org/repos/main/Zope3/trunk/src/ClientForm
RestrictedPython   
svn://svn.zope.org/repos/main/RestrictedPython/tags/3.4.0/src/RestrictedPython

   + ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
BTrees -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/BTrees
persistent -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/persistent
ThreadedAsync  -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ThreadedAsync
transaction-r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/transaction
ZEO-r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZEO
ZODB   -r 68677 svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZODB
ZopeUndo   -r 68677 
svn://svn.zope.org/repos/main/ZODB/branches/3.7/src/ZopeUndo
zdaemon-r 40792 svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
pytz   -r 69031 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/pytz
zodbcode   -r 69031 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/zodbcode
mechanize  -r 69031 
svn://svn.zope.org/repos/main/Zope3/branches/3.3/src/mechanize
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0
ClientForm svn://svn.zope.org/repos/main/Zope3/trunk/src/ClientForm
RestrictedPython   
svn://svn.zope.org/repos/main/RestrictedPython/tags/3.4.0/src/RestrictedPython


Modified: 
Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/DocumentTemplate/tests/testDTML.py
===
--- 
Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/DocumentTemplate/tests/testDTML.py
2007-06-06 15:48:08 UTC (rev 76432)
+++ 
Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/DocumentTemplate/tests/testDTML.py
2007-06-06 15:54:34 UTC (rev 76433)
@@ -16,7 +16,7 @@
 __rcs_id__='$Id$'
 __version__='$Revision: 1.15 $'[11:-2]
 
-import sys, os
+import sys, os, cgi
 import unittest
 
 if __name__=='__main__':
@@ -43,6 +43,14 @@
 
 def d(**kw): return kw
 
+docutils_include_warning = '''\
+p class=system-message-titleSystem Message: WARNING/2 (tt 
class=docutilslt;stringgt;/tt, line 1)/p
+pquot;includequot; directive disabled./p'''
+
+docutils_raw_warning = '''\
+p class=system-message-titleSystem Message: WARNING/2 (tt 
class=docutilslt;stringgt;/tt, line 1)/p
+pquot;rawquot; directive disabled./p'''
+
 class PukeError(Exception):
 Exception raised in test code.
 
@@ -340,38 +348,51 @@
 source = '.. include:: /etc/passwd'
 

[Zope-Checkins] SVN: Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/reStructuredText/tests/testReST.py Harden tests a bit and add a test that actually checks whether the monkey pat

2007-06-11 Thread Philipp von Weitershausen
Log message for revision 76626:
  Harden tests a bit and add a test that actually checks whether the monkey 
patch
  that turns off docutils' file insertino feature off by default actually works.
  

Changed:
  U   
Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/reStructuredText/tests/testReST.py

-=-
Modified: 
Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/reStructuredText/tests/testReST.py
===
--- 
Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/reStructuredText/tests/testReST.py
2007-06-11 20:15:25 UTC (rev 76625)
+++ 
Zope/branches/philikon-zope2.11-with-standard-docutils/lib/python/reStructuredText/tests/testReST.py
2007-06-11 20:50:19 UTC (rev 76626)
@@ -2,10 +2,10 @@
 
 import unittest
 import cgi
+from docutils.core import publish_parts
+from reStructuredText import HTML, Warnings
 
-from reStructuredText import HTML
 
-
 txt = Hello World
 
 
@@ -91,14 +91,27 @@
 output = HTML(input)
 self.assertEquals(output, expected) 
 
+def test_file_insertion_off_by_default(self):
+directive = '.. include:: /etc/passwd'
+source = 'hello world\n %s' % directive
+parts = publish_parts(source=source, writer_name='html4css1',
+  settings_overrides={'warning_stream': 
Warnings()})
 
+# The include: directive hasn't been rendered, it remains
+# verbatimly in the rendered output.  Instead a warning
+# message is presented:
+self.assert_(directive in parts['body'])
+self.assert_(docutils_include_warning in parts['body'])
+
 def test_include_directive_raises(self):
-source = 'hello world\n .. include:: /etc/passwd'
+directive = '.. include:: /etc/passwd'
+source = 'hello world\n %s' % directive
 result = HTML(source)
 
 # The include: directive hasn't been rendered, it remains
 # verbatimly in the rendered output.  Instead a warning
 # message is presented:
+self.assert_(directive in result)
 self.assert_(docutils_include_warning in result)
 
 def test_raw_directive_disabled(self):
@@ -120,6 +133,7 @@
 # The raw: directive hasn't been rendered, it remains
 # verbatimly in the rendered output.  Instead a warning
 # message is presented:
+self.assert_(source in result)
 self.assert_(docutils_raw_warning in result)
 
 def test_raw_directive_url_option_raises(self):
@@ -129,6 +143,7 @@
 # The raw: directive hasn't been rendered, it remains
 # verbatimly in the rendered output.  Instead a warning
 # message is presented:
+self.assert_(source in result)
 self.assert_(docutils_raw_warning in result)
 
 def test_csv_table_file_option_raise(self):

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/philikon-aq/ New branch for the Acquisition + __parent__ work, revising changes in the old branch.

2007-07-10 Thread Philipp von Weitershausen
Log message for revision 77679:
  New branch for the Acquisition + __parent__ work, revising changes in the old 
branch.
  

Changed:
  A   Zope/branches/philikon-aq/

-=-
Copied: Zope/branches/philikon-aq (from rev 77678, Zope/trunk)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Acquisition/ Merge r71220 from old branch:

2007-07-10 Thread Philipp von Weitershausen
Log message for revision 77680:
  Merge r71220 from old branch:
Warming up: Make acquisition wrappers have __parent__ in addition to 
aq_parent
(they point to the same thing).
  

Changed:
  U   Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c
  U   Zope/branches/philikon-aq/lib/python/Acquisition/tests.py

-=-
Modified: Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c
===
--- Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c 
2007-07-10 14:48:45 UTC (rev 77679)
+++ Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c 
2007-07-10 15:49:42 UTC (rev 77680)
@@ -419,18 +419,27 @@
   char *name=;
 
   if (PyString_Check(oname)) name=PyString_AS_STRING(oname);
-  if (*name=='a'  name[1]=='q'  name[2]=='_')
-if ((r=Wrapper_special(self, name+3, oname)))
-  {
-   if (filter)
- switch(apply_filter(filter,OBJECT(self),oname,r,extra,orig))
-   {
-   case -1: return NULL;
-   case 1: return r;
-   }
-   else return r;
-  }
-else PyErr_Clear();
+  if ((*name=='a'  name[1]=='q'  name[2]=='_') ||
+  (strcmp(name, __parent__)==0))
+{
+  /* __parent__ is an alias to aq_parent */
+  if (strcmp(name, __parent__)==0)
+name = parent;
+  else
+name = name + 3;
+
+  if ((r=Wrapper_special(self, name, oname)))
+{
+  if (filter)
+switch(apply_filter(filter,OBJECT(self),oname,r,extra,orig))
+  {
+  case -1: return NULL;
+  case 1: return r;
+  }
+  else return r;
+}
+  else PyErr_Clear();
+}
   else if (*name=='_'  name[1]=='_'  
(strcmp(name+2,reduce__)==0 ||
 strcmp(name+2,reduce_ex__)==0 ||

Modified: Zope/branches/philikon-aq/lib/python/Acquisition/tests.py
===
--- Zope/branches/philikon-aq/lib/python/Acquisition/tests.py   2007-07-10 
14:48:45 UTC (rev 77679)
+++ Zope/branches/philikon-aq/lib/python/Acquisition/tests.py   2007-07-10 
15:49:42 UTC (rev 77680)
@@ -357,6 +357,11 @@
 ...
 AttributeError: aq_parent
 
+ c.__parent__
+Traceback (most recent call last):
+...
+AttributeError: __parent__
+
  Acquisition.aq_acquire(c, 'id')
 'unwrapped'
  Acquisition.aq_acquire(c, 'x')
@@ -533,6 +538,13 @@
  show(Acquisition.aq_self(a.b.c))
 c
 
+A wrapper's __parent__ attribute (which is equivalent to its
+aq_parent attribute) points to the Acquisition parent.
+
+ a.b.c.__parent__ == a.b.c.aq_parent
+True
+ a.b.c.__parent__ == a.b
+True
 
 
 def test__of__exception():

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Acquisition/ Merged from old philikon-aq-and-__parent__ branch:

2007-07-24 Thread Philipp von Weitershausen
Log message for revision 78314:
  Merged from old philikon-aq-and-__parent__ branch:
  
  Log message for revision 71221:
Step 2: Make aq_acquire aware of __parent__ pointers, even if the object
isn't acquisition wrapped.
  
  Log message for revision 71223:
Add another test that tests acquisition wrappers with containers that have 
__parent__.
  
  Log message for revision 71225:
Cosmetics: adjust a piece of code that I added earlier to the indentation
style of the overall file
  
  Log message for revision 71226:
Cleanup:
* no need to introduce another variable where we check for a __parent__ 
attribute
* clean up after failed getattr (it throws an AttributeError)
* properly DECREF the __parent__ attribute when it's no longer needed and
  the wrapper that is temporarily created from the __parent__ attribute.
  
  Log message for revision 75578:
Added a test to Acquisition that shows the current segmentation fault 
problem, when Acquisition goes in circles.
  
  Log message for revision 76140:
First attempt to fix 'Acquisition problem' when encountering cyclic 
hierarchies via __parent__ pointers. [hannosch, nouri]
  
  
  In addition, Hanno and Nouri's fix was expanded to not only cover circular 
__parent__
  pointers but also to cover a mixture of circular __parent__ and aq_parent 
pointers
  (which can occur when old Implicit acquisition meets new __parent__ pointer 
code).
  
  Also cleaned up much of the comments and added more comments.
  

Changed:
  U   Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c
  U   Zope/branches/philikon-aq/lib/python/Acquisition/tests.py

-=-
Modified: Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c
===
--- Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c 
2007-07-24 14:41:47 UTC (rev 78313)
+++ Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c 
2007-07-24 19:40:28 UTC (rev 78314)
@@ -38,7 +38,8 @@
   *py__long__, *py__float__, *py__oct__, *py__hex__,
   *py__getitem__, *py__setitem__, *py__delitem__,
   *py__getslice__, *py__setslice__, *py__delslice__,  *py__contains__,
-  *py__len__, *py__of__, *py__call__, *py__repr__, *py__str__, *py__cmp__;
+  *py__len__, *py__of__, *py__call__, *py__repr__, *py__str__, *py__cmp__,
+  *py__parent__;
 
 static PyObject *Acquired=0;
 
@@ -82,7 +83,7 @@
   INIT_PY_NAME(__repr__);
   INIT_PY_NAME(__str__);
   INIT_PY_NAME(__cmp__);
-  
+  INIT_PY_NAME(__parent__);
 #undef INIT_PY_NAME
 }
 
@@ -414,6 +415,23 @@
 Wrapper_findattr(Wrapper *self, PyObject *oname,
PyObject *filter, PyObject *extra, PyObject *orig,
int sob, int sco, int explicit, int containment)
+/*
+  Parameters:
+
+  sob
+Search self-obj for the 'oname' attribute
+
+  sco
+Search self-container for the 'oname' attribute
+
+  explicit
+Explicitly acquire 'oname' attribute from container (assumed with
+implicit acquisition wrapper)
+
+  containment
+Use the innermost wrapper (aq_inner) for looking up the 'oname'
+attribute.
+*/
 {
   PyObject *r, *v, *tb;
   char *name=;
@@ -486,6 +504,7 @@
  Py_XDECREF(r); Py_XDECREF(v); Py_XDECREF(tb);
  r=NULL;
}
+ /* normal attribute lookup */
   else if ((r=PyObject_GetAttr(self-obj,oname)))
{
  if (r==Acquired)
@@ -520,6 +539,7 @@
   PyErr_Clear();
 }
 
+  /* Lookup has failed, acquire it from parent. */
   if (sco  (*name != '_' || explicit)) 
 return Wrapper_acquire(self, oname, filter, extra, orig, explicit, 
   containment);
@@ -533,24 +553,35 @@
PyObject *filter, PyObject *extra, PyObject *orig,
int explicit, int containment)
 {
-  PyObject *r;
+  PyObject *r,  *v, *tb;
   int sob=1, sco=1;
 
   if (self-container)
 {
+  /* If the container has an acquisition wrapper itself, we'll use
+ Wrapper_findattr to progress further. */
   if (isWrapper(self-container))
{
  if (self-obj  isWrapper(self-obj))
{
- /* Try to optimize search by recognizing repeated obs in path */
+ /* Try to optimize search by recognizing repeated
+ objects in path. */
  if (WRAPPER(self-obj)-container==
  WRAPPER(self-container)-container) 
sco=0;
  else if (WRAPPER(self-obj)-container==
  WRAPPER(self-container)-obj)  
sob=0;
-  }
+   }
 
+  /* Don't search the container when the container of the
+ container is the same object as 'self'. */
+  if (WRAPPER(self-container)-container == WRAPPER(self)-obj)
+{
+  sco=0;
+  containment=1;
+}
+
  r=Wrapper_findattr((Wrapper*)self-container,
 oname, filter, extra, 

[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Acquisition/ Merged from old philikon-aq-and-__parent__ branch:

2007-07-24 Thread Philipp von Weitershausen
Log message for revision 78318:
  Merged from old philikon-aq-and-__parent__ branch:
  
  Log message for revision 71227:
Step 4: Make aq_get aware of __parent__ pointers.
(Also some comment cosmetics in _Acquisition.c)
  
  Log message for revision 71228:
Test aq_parent property as well (in addition to aq_parent function)
  
  Log message for revision 71229:
Step 5: Make aq_chain aware of __parent__ pointers.
  
  

Changed:
  U   Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c
  U   Zope/branches/philikon-aq/lib/python/Acquisition/tests.py

-=-
Modified: Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c
===
--- Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c 
2007-07-24 20:46:33 UTC (rev 78317)
+++ Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c 
2007-07-24 21:02:03 UTC (rev 78318)
@@ -1422,8 +1422,7 @@
  WRAPPER(self)-ob_type==(PyTypeObject*)Wrappertype,
  explicit, containment);  
   /* Not wrapped; check if we have a __parent__ pointer.  If that's
- the case, we create a wrapper and pretend it's business as
- usual */
+ the case, create a wrapper and pretend it's business as usual. */
   else if ((result = PyObject_GetAttr(self, py__parent__)))
 {
   self = newWrapper(self, result, (PyTypeObject*)Wrappertype);
@@ -1437,8 +1436,8 @@
   /* No wrapper and no __parent__, so just getattr. */
   else
 {
-  /* We need to clean up the AttributeError from the previous
- getattr (because it has clearly failed). */
+  /* Clean up the AttributeError from the previous getattr
+ (because it has clearly failed). */
   PyErr_Fetch(result,v,tb);
   if (result  (result != PyExc_AttributeError))
 {
@@ -1486,13 +1485,35 @@
 static PyObject *
 capi_aq_get(PyObject *self, PyObject *name, PyObject *defalt, int containment)
 {
-  PyObject *result = NULL;
+  PyObject *result = NULL, *v, *tb;
   /* We got a wrapped object, so business as usual */
   if (isWrapper(self)) 
 result=Wrapper_findattr(WRAPPER(self), name, 0, 0, OBJECT(self), 1, 1, 1, 
-  containment);
+containment);
+  /* Not wrapped; check if we have a __parent__ pointer.  If that's
+ the case, create a wrapper and pretend it's business as usual. */
+  else if ((result = PyObject_GetAttr(self, py__parent__)))
+{
+  self=newWrapper(self, result, (PyTypeObject*)Wrappertype);
+  Py_DECREF(result); /* don't need __parent__ anymore */
+  result=Wrapper_findattr(WRAPPER(self), name, 0, 0, OBJECT(self),
+  1, 1, 1, containment);
+  Py_DECREF(self); /* Get rid of temporary wrapper. */
+}
   else
-result=PyObject_GetAttr(self, name);
+{
+  /* Clean up the AttributeError from the previous getattr
+ (because it has clearly failed). */
+  PyErr_Fetch(result,v,tb);
+  if (result  (result != PyExc_AttributeError))
+{
+  PyErr_Restore(result,v,tb);
+  return NULL;
+}
+  Py_XDECREF(result); Py_XDECREF(v); Py_XDECREF(tb);
+ 
+  result=PyObject_GetAttr(self, name);
+}
 
   if (! result  defalt)
 {
@@ -1658,7 +1679,7 @@
 static PyObject *
 capi_aq_chain(PyObject *self, int containment)
 {
-  PyObject *result;
+  PyObject *result, *v, *tb;
 
   UNLESS (result=PyList_New(0)) return NULL;
 
@@ -1681,9 +1702,28 @@
}
}
   else
-   if (PyList_Append(result, self)  0)
- goto err;
+{
+  if (PyList_Append(result, self)  0)
+goto err;
 
+  if ((self=PyObject_GetAttr(self, py__parent__)))
+{
+  Py_DECREF(self); /* We don't need our own reference. */
+  if (self!=Py_None)
+continue;
+}
+  else
+{
+  PyErr_Fetch(self,v,tb);
+  if (self  (self != PyExc_AttributeError))
+{
+  PyErr_Restore(self,v,tb);
+  return NULL;
+}
+  Py_XDECREF(self); Py_XDECREF(v); Py_XDECREF(tb);
+}
+}
+
   break;
 }
   

Modified: Zope/branches/philikon-aq/lib/python/Acquisition/tests.py
===
--- Zope/branches/philikon-aq/lib/python/Acquisition/tests.py   2007-07-24 
20:46:33 UTC (rev 78317)
+++ Zope/branches/philikon-aq/lib/python/Acquisition/tests.py   2007-07-24 
21:02:03 UTC (rev 78318)
@@ -1725,14 +1725,26 @@
Acquisition.aq_acquire(x, 'bar')
   3.145
 
-as does ``aq_parent``:
+as does ``aq_get``:
 
+   Acquisition.aq_get(x, 'hello')
+  'world'
+   Acquisition.aq_get(x, 'foo')
+  42
+   Acquisition.aq_get(x, 'bar')
+  3.145
+
+and ``aq_parent``:
+
Acquisition.aq_parent(x) is y
   True

[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Shared/DC/Scripts/Bindings.py Merged from old philikon-aq-and-__parent__ branch:

2007-07-24 Thread Philipp von Weitershausen
Log message for revision 78319:
  Merged from old philikon-aq-and-__parent__ branch:
  
  Log message for revision 77024:
Read that mail again, we agreed on raising an AttributeError instead of 
returning None.
  
  

Changed:
  U   Zope/branches/philikon-aq/lib/python/Shared/DC/Scripts/Bindings.py

-=-
Modified: Zope/branches/philikon-aq/lib/python/Shared/DC/Scripts/Bindings.py
===
--- Zope/branches/philikon-aq/lib/python/Shared/DC/Scripts/Bindings.py  
2007-07-24 21:02:03 UTC (rev 78318)
+++ Zope/branches/philikon-aq/lib/python/Shared/DC/Scripts/Bindings.py  
2007-07-24 21:15:17 UTC (rev 78319)
@@ -179,6 +179,13 @@
 # Make *extra* sure that the wrapper isn't used to access
 # __call__, etc.
 if name.startswith('__'):
+# Acquisition will nowadays try to do an getattr on all
+# objects which aren't Acquisition wrappers, asking for a
+# __parent__ pointer.  We don't want to raise Unauthorized
+# in this case but simply an AttributeError.
+if name in ('__parent__', '__name__'):
+raise AttributeError(name)
+
 self.__you_lose()
 
 return guarded_getattr(self._wrapped, name, default)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/lib/python/zope/ Get rid of packages that were never in Zope2 (or Zope3, for that matter) and simply

2007-07-25 Thread Philipp von Weitershausen
Log message for revision 78332:
  Get rid of packages that were never in Zope2 (or Zope3, for that matter) and 
simply
  shouldn't be released. Who put them in here?!?
  
  Bring back packages that were removed, for who knows which reason. Point is, 
we can't
  just simply remove things from a release.
  

Changed:
  _U  Zope/trunk/lib/python/zope/
  _U  Zope/trunk/lib/python/zope/app/

-=-

Property changes on: Zope/trunk/lib/python/zope
___
Name: svn:externals
   - annotation  -r 77445 
svn://svn.zope.org/repos/main/zope.annotation/trunk/src/zope/annotation
cachedescriptors-r 77445 
svn://svn.zope.org/repos/main/zope.cachedescriptors/trunk/src/zope/cachedescriptors
component   -r 77445 
svn://svn.zope.org/repos/main/zope.component/trunk/src/zope/component
configuration   -r 77445 
svn://svn.zope.org/repos/main/zope.configuration/trunk/src/zope/configuration
contentprovider -r 77445 
svn://svn.zope.org/repos/main/zope.contentprovider/trunk/src/zope/contentprovider
contenttype -r 77445 
svn://svn.zope.org/repos/main/zope.contenttype/trunk/src/zope/contenttype
copypastemove   -r 77445 
svn://svn.zope.org/repos/main/zope.copypastemove/trunk/src/zope/copypastemove
datetime-r 77445 
svn://svn.zope.org/repos/main/zope.datetime/trunk/src/zope/datetime
decorator   -r 77445 
svn://svn.zope.org/repos/main/zope.decorator/trunk/src/zope/decorator
deferredimport  -r 77445 
svn://svn.zope.org/repos/main/zope.deferredimport/trunk/src/zope/deferredimport
deprecation -r 77445 
svn://svn.zope.org/repos/main/zope.deprecation/trunk/src/zope/deprecation
documenttemplate-r 77445 
svn://svn.zope.org/repos/main/zope.documenttemplate/trunk/src/zope/documenttemplate
dottedname  -r 77445 
svn://svn.zope.org/repos/main/zope.dottedname/trunk/src/zope/dottedname
dublincore  -r 77445 
svn://svn.zope.org/repos/main/zope.dublincore/trunk/src/zope/dublincore
event   -r 77445 
svn://svn.zope.org/repos/main/zope.event/trunk/src/zope/event
exceptions  -r 77445 
svn://svn.zope.org/repos/main/zope.exceptions/trunk/src/zope/exceptions
filerepresentation  -r 77445 
svn://svn.zope.org/repos/main/zope.filerepresentation/trunk/src/zope/filerepresentation
formlib -r 77445 
svn://svn.zope.org/repos/main/zope.formlib/trunk/src/zope/formlib
#fssync  -r 77445 
svn://svn.zope.org/repos/main/zope.fssync/trunk/src/zope/fssync
hookable-r 77445 
svn://svn.zope.org/repos/main/zope.hookable/trunk/src/zope/hookable
i18nmessageid   -r 77445 
svn://svn.zope.org/repos/main/zope.i18nmessageid/trunk/src/zope/i18nmessageid
i18n-r 77445 
svn://svn.zope.org/repos/main/zope.i18n/trunk/src/zope/i18n
index   -r 77445 
svn://svn.zope.org/repos/main/zope.index/trunk/src/zope/index
interface   -r 77445 
svn://svn.zope.org/repos/main/zope.interface/trunk/src/zope/interface
lifecycleevent  -r 77445 
svn://svn.zope.org/repos/main/zope.lifecycleevent/trunk/src/zope/lifecycleevent
location-r 77445 
svn://svn.zope.org/repos/main/zope.location/trunk/src/zope/location
modulealias -r 77445 
svn://svn.zope.org/repos/main/zope.modulealias/trunk/src/zope/modulealias
pagetemplate-r 77445 
svn://svn.zope.org/repos/main/zope.pagetemplate/trunk/src/zope/pagetemplate
proxy   -r 77445 
svn://svn.zope.org/repos/main/zope.proxy/trunk/src/zope/proxy
publisher   -r 77445 
svn://svn.zope.org/repos/main/zope.publisher/trunk/src/zope/publisher
rdb -r 77445 
svn://svn.zope.org/repos/main/zope.rdb/trunk/src/zope/rdb
schema  -r 77445 
svn://svn.zope.org/repos/main/zope.schema/trunk/src/zope/schema
security-r 77445 
svn://svn.zope.org/repos/main/zope.security/trunk/src/zope/security
sendmail-r 77445 
svn://svn.zope.org/repos/main/zope.sendmail/trunk/src/zope/sendmail
sequencesort-r 77445 
svn://svn.zope.org/repos/main/zope.sequencesort/trunk/src/zope/sequencesort
server  -r 77445 
svn://svn.zope.org/repos/main/zope.server/trunk/src/zope/server
size-r 77445 
svn://svn.zope.org/repos/main/zope.size/trunk/src/zope/size
structuredtext  -r 77445 
svn://svn.zope.org/repos/main/zope.structuredtext/trunk/src/zope/structuredtext
tales   -r 77445 
svn://svn.zope.org/repos/main/zope.tales/trunk/src/zope/tales
tal -r 77445 
svn://svn.zope.org/repos/main/zope.tal/trunk/src/zope/tal
testbrowser -r 77445 
svn://svn.zope.org/repos/main/zope.testbrowser/trunk/src/zope/testbrowser
testing -r 77445 
svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing
testrecorder-r 77445 
svn://svn.zope.org/repos/main/zope.testrecorder/trunk/src/zope/testrecorder
thread  -r 77445 
svn://svn.zope.org/repos/main/zope.thread/trunk/src/zope/thread
traversing  -r 

[Zope-Checkins] SVN: Zope/trunk/setup.py Make list easier to read

2007-07-25 Thread Philipp von Weitershausen
Log message for revision 78334:
  Make list easier to read
  

Changed:
  U   Zope/trunk/setup.py

-=-
Modified: Zope/trunk/setup.py
===
--- Zope/trunk/setup.py 2007-07-25 20:53:58 UTC (rev 78333)
+++ Zope/trunk/setup.py 2007-07-25 20:59:25 UTC (rev 78334)
@@ -523,17 +523,27 @@
 author=AUTHOR,
 
 data_files=installed_data_files,
-scripts=[utilities/mkzeoinstance.py, utilities/mkzopeinstance.py,
- utilities/check_catalog.py, utilities/load_site.py,
- utilities/requestprofiler.py, utilities/zpasswd.py,
- utilities/copyzopeskel.py, utilities/reindex_catalog.py,
- utilities/compilezpy.py, utilities/decompilezpy.py,
+scripts=[utilities/mkzeoinstance.py,
+ utilities/mkzopeinstance.py,
+ utilities/check_catalog.py,
+ utilities/load_site.py,
+ utilities/requestprofiler.py,
+ utilities/zpasswd.py,
+ utilities/copyzopeskel.py,
+ utilities/reindex_catalog.py,
+ utilities/compilezpy.py,
+ utilities/decompilezpy.py,
  utilities/ZODBTools/analyze.py,
- utilities/ZODBTools/checkbtrees.py, 
utilities/ZODBTools/fsdump.py,
- utilities/ZODBTools/fsrefs.py , utilities/ZODBTools/fstail.py,
- utilities/ZODBTools/fstest.py, utilities/ZODBTools/migrate.py,
- utilities/ZODBTools/netspace.py, 
utilities/ZODBTools/zodbload.py,
- utilities/ZODBTools/repozo.py, utilities/ZODBTools/space.py,
+ utilities/ZODBTools/checkbtrees.py,
+ utilities/ZODBTools/fsdump.py,
+ utilities/ZODBTools/fsrefs.py ,
+ utilities/ZODBTools/fstail.py,
+ utilities/ZODBTools/fstest.py,
+ utilities/ZODBTools/migrate.py,
+ utilities/ZODBTools/netspace.py,
+ utilities/ZODBTools/zodbload.py,
+ utilities/ZODBTools/repozo.py,
+ utilities/ZODBTools/space.py,
  test.py],
 distclass=ZopeDistribution,
 )

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/setup.py Bring back ZEO scripts that were removed in r76349.

2007-07-25 Thread Philipp von Weitershausen
Log message for revision 78335:
  Bring back ZEO scripts that were removed in r76349.
  

Changed:
  U   Zope/trunk/setup.py

-=-
Modified: Zope/trunk/setup.py
===
--- Zope/trunk/setup.py 2007-07-25 20:59:25 UTC (rev 78334)
+++ Zope/trunk/setup.py 2007-07-25 21:08:58 UTC (rev 78335)
@@ -544,6 +544,13 @@
  utilities/ZODBTools/zodbload.py,
  utilities/ZODBTools/repozo.py,
  utilities/ZODBTools/space.py,
+ lib/python/ZEO/scripts/timeout.py,
+ lib/python/ZEO/scripts/parsezeolog.py,
+ lib/python/ZEO/scripts/zeopack.py,
+ lib/python/ZEO/scripts/zeoqueue.py,
+ lib/python/ZEO/scripts/zeoreplay.py,
+ lib/python/ZEO/scripts/zeoserverlog.py,
+ lib/python/ZEO/scripts/zeoup.py,
  test.py],
 distclass=ZopeDistribution,
 )

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/PythonScripts/www/default_py Discourage the use of the upper-case RESPONSE attribute. The lower-case

2007-07-25 Thread Philipp von Weitershausen
Log message for revision 78338:
  Discourage the use of the upper-case RESPONSE attribute. The lower-case
  response attribute works perfectly fine (and has for ages) and it has the
  advantage of being supported by Zope 3 as well.
  

Changed:
  U   Zope/trunk/lib/python/Products/PythonScripts/www/default_py

-=-
Modified: Zope/trunk/lib/python/Products/PythonScripts/www/default_py
===
--- Zope/trunk/lib/python/Products/PythonScripts/www/default_py 2007-07-25 
22:26:53 UTC (rev 78337)
+++ Zope/trunk/lib/python/Products/PythonScripts/www/default_py 2007-07-25 
22:46:45 UTC (rev 78338)
@@ -3,7 +3,7 @@
 # Import a standard function, and get the HTML request and response objects.
 from Products.PythonScripts.standard import html_quote
 request = container.REQUEST
-RESPONSE =  request.RESPONSE
+response =  request.response
 
 # Return a string identifying this script.
 print This is the, script.meta_type, '%s' % script.getId(),

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/ Merged philikon-zope2.11-with-standard-docutils:

2007-07-25 Thread Philipp von Weitershausen
Log message for revision 78333:
  Merged philikon-zope2.11-with-standard-docutils:
  
- Ship Zope with a standard docutils 0.4 distribution, instead
  of a patched one.  Both trusted and untrusted code are still
  protected against unwanted file inclusion.
  
  

Changed:
  U   Zope/trunk/doc/CHANGES.txt
  _U  Zope/trunk/lib/python/
  U   Zope/trunk/lib/python/DocumentTemplate/tests/testDTML.py
  U   Zope/trunk/lib/python/Products/ZReST/ZReST.py
  U   Zope/trunk/lib/python/Products/ZReST/tests/test_ZReST.py
  U   Zope/trunk/lib/python/reStructuredText/__init__.py
  U   Zope/trunk/lib/python/reStructuredText/tests/testReST.py

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===
--- Zope/trunk/doc/CHANGES.txt  2007-07-25 20:27:08 UTC (rev 78332)
+++ Zope/trunk/doc/CHANGES.txt  2007-07-25 20:53:58 UTC (rev 78333)
@@ -9,6 +9,10 @@
 
 Restructuring
 
+  - Ship Zope with a standard docutils 0.4 distribution, instead
+of a patched one.  Both trusted and untrusted code are still
+protected against unwanted file inclusion.
+
   - Removed ZGadflyDA (was deprecated since Zope 2.9). The code is
 still available from svn.zope.org/Products.ZGadflyDA.
 


Property changes on: Zope/trunk/lib/python
___
Name: svn:externals
   - BTrees 
svn://svn.zope.org/repos/main/ZODB/branches/3.8/src/BTrees
ClientForm svn://svn.zope.org/repos/main/Zope3/trunk/src/ClientForm
RestrictedPython   
svn://svn.zope.org/repos/main/RestrictedPython/tags/3.4.1/src/RestrictedPython
ThreadedAsync  
svn://svn.zope.org/repos/main/ZODB/branches/3.8/src/ThreadedAsync
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
ZEOsvn://svn.zope.org/repos/main/ZODB/branches/3.8/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/branches/3.8/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/branches/3.8/src/ZopeUndo
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0-zope
mechanize  svn://svn.zope.org/repos/main/Zope3/trunk/src/mechanize
persistent 
svn://svn.zope.org/repos/main/ZODB/branches/3.8/src/persistent
pytz   svn://svn.zope.org/repos/main/Zope3/trunk/src/pytz
transaction
svn://svn.zope.org/repos/main/ZODB/branches/3.8/src/transaction
zdaemon-r 40792 
svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
zodbcode   svn://svn.zope.org/repos/main/zodbcode/trunk/src/zodbcode

   + BTrees 
svn://svn.zope.org/repos/main/ZODB/branches/3.8/src/BTrees
ClientForm svn://svn.zope.org/repos/main/Zope3/trunk/src/ClientForm
RestrictedPython   
svn://svn.zope.org/repos/main/RestrictedPython/tags/3.4.1/src/RestrictedPython
ThreadedAsync  
svn://svn.zope.org/repos/main/ZODB/branches/3.8/src/ThreadedAsync
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3.1
ZEOsvn://svn.zope.org/repos/main/ZODB/branches/3.8/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/branches/3.8/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/branches/3.8/src/ZopeUndo
docutils   svn://svn.zope.org/repos/main/docutils/tags/0.4.0
mechanize  svn://svn.zope.org/repos/main/Zope3/trunk/src/mechanize
persistent 
svn://svn.zope.org/repos/main/ZODB/branches/3.8/src/persistent
pytz   svn://svn.zope.org/repos/main/Zope3/trunk/src/pytz
transaction
svn://svn.zope.org/repos/main/ZODB/branches/3.8/src/transaction
zdaemon-r 40792 
svn://svn.zope.org/repos/main/zdaemon/trunk/src/zdaemon
zodbcode   svn://svn.zope.org/repos/main/zodbcode/trunk/src/zodbcode


Modified: Zope/trunk/lib/python/DocumentTemplate/tests/testDTML.py
===
--- Zope/trunk/lib/python/DocumentTemplate/tests/testDTML.py2007-07-25 
20:27:08 UTC (rev 78332)
+++ Zope/trunk/lib/python/DocumentTemplate/tests/testDTML.py2007-07-25 
20:53:58 UTC (rev 78333)
@@ -16,7 +16,7 @@
 __rcs_id__='$Id$'
 __version__='$Revision: 1.15 $'[11:-2]
 
-import sys, os
+import sys, os, cgi
 import unittest
 
 if __name__=='__main__':
@@ -43,6 +43,14 @@
 
 def d(**kw): return kw
 
+docutils_include_warning = '''\
+p class=system-message-titleSystem Message: WARNING/2 (tt 
class=docutilslt;stringgt;/tt, line 1)/p
+pquot;includequot; directive disabled./p'''
+
+docutils_raw_warning = '''\
+p class=system-message-titleSystem Message: WARNING/2 (tt 
class=docutilslt;stringgt;/tt, line 1)/p
+pquot;rawquot; directive disabled./p'''
+
 class PukeError(Exception):
 Exception raised in test code.
 
@@ -340,38 +348,51 @@
 source = '.. include:: /etc/passwd'
 html = self.doc_class('dtml-var name=foo fmt=restructured-text')
 html._vars['foo'] = source
-self.assertRaises(NotImplementedError, 

[Zope-Checkins] SVN: Zope/trunk/lib/python/Acquisition/ Actually move the README.txt that I added to the Acquisition egg earlier to

2007-07-27 Thread Philipp von Weitershausen
Log message for revision 78385:
  Actually move the README.txt that I added to the Acquisition egg earlier to
  the package itself and make it a doctest.
  

Changed:
  A   Zope/trunk/lib/python/Acquisition/README.txt
  U   Zope/trunk/lib/python/Acquisition/tests.py

-=-
Copied: Zope/trunk/lib/python/Acquisition/README.txt (from rev 78383, 
Acquisition/trunk/README.txt)
===
--- Zope/trunk/lib/python/Acquisition/README.txt
(rev 0)
+++ Zope/trunk/lib/python/Acquisition/README.txt2007-07-27 18:07:04 UTC 
(rev 78385)
@@ -0,0 +1,417 @@
+.. contents::
+
+Introductory Example
+
+
+Zope implements acquisition with Extension Class mix-in classes. To
+use acquisition your classes must inherit from an acquisition base
+class. For example::
+
+   import ExtensionClass, Acquisition
+
+   class C(ExtensionClass.Base):
+  ... color='red'
+
+   class A(Acquisition.Implicit):
+  ... def report(self):
+  ... print self.color
+  ...
+   a = A()
+   c = C()
+   c.a = a
+
+   c.a.report()
+  red
+
+   d = C()
+   d.color = 'green'
+   d.a = a
+
+   d.a.report()
+  green
+
+   a.report() # raises an attribute error
+  Traceback (most recent call last):
+...
+  AttributeError: color
+
+The class ``A`` inherits acquisition behavior from
+``Acquisition.Implicit``. The object, ``a``, has the color of
+objects ``c`` and d when it is accessed through them, but it has no
+color by itself. The object ``a`` obtains attributes from its
+environment, where its environment is defined by the access path used
+to reach ``a``.
+
+Acquisition Wrappers
+
+
+When an object that supports acquisition is accessed through an
+extension class instance, a special object, called an acquisition
+wrapper, is returned. In the example above, the expression ``c.a``
+returns an acquisition wrapper that contains references to both ``c``
+and ``a``. It is this wrapper that performs attribute lookup in ``c``
+when an attribute cannot be found in ``a``.
+
+Acquisition wrappers provide access to the wrapped objects through the
+attributes ``aq_parent``, ``aq_self``, ``aq_base``.  Continue the
+example from above::
+
+   c.a.aq_parent is c
+  True
+   c.a.aq_self is a
+  True
+
+Explicit and Implicit Acquisition
+=
+
+Two styles of acquisition are supported: implicit and explicit
+acquisition.
+
+Implicit acquisition
+
+
+Implicit acquisition is so named because it searches for attributes
+from the environment automatically whenever an attribute cannot be
+obtained directly from an object or through inheritance.
+
+An attribute can be implicitly acquired if its name does not begin
+with an underscore.
+
+To support implicit acquisition, your class should inherit from the
+mix-in class ``Acquisition.Implicit``.
+
+Explicit Acquisition
+
+
+When explicit acquisition is used, attributes are not automatically
+obtained from the environment. Instead, the method aq_acquire must be
+used. For example::
+
+   print c.a.aq_acquire('color')
+  red
+
+To support explicit acquisition, your class should inherit from the
+mix-in class ``Acquisition.Explicit``.
+
+Controlling Acquisition
+---
+
+A class (or instance) can provide attribute by attribute control over
+acquisition. Your should subclass from ``Acquisition.Explicit``, and set
+all attributes that should be acquired to the special value
+``Acquisition.Acquired``. Setting an attribute to this value also allows
+inherited attributes to be overridden with acquired ones. For example::
+
+   class C(Acquisition.Explicit):
+  ... id=1
+  ... secret=2
+  ... color=Acquisition.Acquired
+  ... __roles__=Acquisition.Acquired
+
+The only attributes that are automatically acquired from containing
+objects are color, and ``__roles__``. Note that the ``__roles__``
+attribute is acquired even though its name begins with an
+underscore. In fact, the special ``Acquisition.Acquired`` value can be
+used in ``Acquisition.Implicit`` objects to implicitly acquire
+selected objects that smell like private objects.
+
+Sometimes, you want to dynamically make an implicitly acquiring object
+acquire explicitly. You can do this by getting the object's
+aq_explicit attribute. This attribute provides the object with an
+explicit wrapper that places the original implicit wrapper.
+
+Filtered Acquisition
+
+
+The acquisition method, ``aq_acquire``, accepts two optional
+arguments. The first of the additional arguments is a filtering
+function that is used when considering whether to acquire an
+object. The second of the additional arguments is an object that is
+passed as extra data when calling the filtering function and which
+defaults to ``None``. The filter function is called with five
+arguments:
+
+* The object that the aq_acquire method was called on,
+
+* 

[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py A viewlet needs to be __of__ the view (it expects its __parent__ to be the view,

2007-07-27 Thread Philipp von Weitershausen
Log message for revision 78390:
  A viewlet needs to be __of__ the view (it expects its __parent__ to be the 
view,
  not the context).
  

Changed:
  U   
Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py

-=-
Modified: 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py
===
--- 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py
2007-07-27 20:24:58 UTC (rev 78389)
+++ 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py
2007-07-27 20:41:55 UTC (rev 78390)
@@ -42,7 +42,7 @@
 raise cp_interfaces.ContentProviderLookupError(name)
 
 if getattr(provider, '__of__', None) is not None:
-provider = provider.__of__(context)
+provider = provider.__of__(view)
 
 # Insert the data gotten from the context
 addTALNamespaceData(provider, econtext)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Products/Five/viewlet/manager.py Only wrap if there's __of__

2007-07-27 Thread Philipp von Weitershausen
Log message for revision 78392:
  Only wrap if there's __of__
  

Changed:
  U   Zope/branches/philikon-aq/lib/python/Products/Five/viewlet/manager.py

-=-
Modified: Zope/branches/philikon-aq/lib/python/Products/Five/viewlet/manager.py
===
--- Zope/branches/philikon-aq/lib/python/Products/Five/viewlet/manager.py   
2007-07-27 21:09:03 UTC (rev 78391)
+++ Zope/branches/philikon-aq/lib/python/Products/Five/viewlet/manager.py   
2007-07-27 21:09:28 UTC (rev 78392)
@@ -65,7 +65,8 @@
 # the object has a real context from which to determine owner
 # security.
 for name, viewlet in viewlets:
-viewlet = viewlet.__of__(viewlet.context)
+if getattr(viewlet, '__of__', None) is not None:
+viewlet = viewlet.__of__(viewlet.__parent__)
 if guarded_hasattr(viewlet, 'render'):
 results.append((name, viewlet))
 return results

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py Small refactoring: actually wrap in the provider in provider.__parent__, which

2007-07-27 Thread Philipp von Weitershausen
Log message for revision 78394:
  Small refactoring: actually wrap in the provider in provider.__parent__, which
  *usually* ends up being the view, unless the provider decides otherwise.
  

Changed:
  U   
Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py

-=-
Modified: 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py
===
--- 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py
2007-07-27 21:10:18 UTC (rev 78393)
+++ 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py
2007-07-27 21:30:50 UTC (rev 78394)
@@ -41,10 +41,10 @@
 if provider is None:
 raise cp_interfaces.ContentProviderLookupError(name)
 
-# A content provider's context (__parent__) is the view, not
-# the context object.
+# Wrap the content provider's in its __parent__, whatever that
+# may be (typically the view).
 if getattr(provider, '__of__', None) is not None:
-provider = provider.__of__(view)
+provider = provider.__of__(provider.__parent__)
 
 # Insert the data gotten from the context
 addTALNamespaceData(provider, econtext)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/tags/philikon-aq-checkpoint/ Tag a checkpoint before I start getting evil on this branch.

2007-07-27 Thread Philipp von Weitershausen
Log message for revision 78395:
  Tag a checkpoint before I start getting evil on this branch.
  

Changed:
  A   Zope/tags/philikon-aq-checkpoint/

-=-
Copied: Zope/tags/philikon-aq-checkpoint (from rev 78394, 
Zope/branches/philikon-aq)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/ Death to __of__!

2007-07-27 Thread Philipp von Weitershausen
Log message for revision 78398:
  Death to __of__!
  

Changed:
  U   Zope/branches/philikon-aq/lib/python/OFS/Traversable.py
  U   
Zope/branches/philikon-aq/lib/python/Products/Five/browser/metaconfigure.py
  U   
Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py
  U   Zope/branches/philikon-aq/lib/python/Products/Five/browser/resource.py
  U   Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/pages.txt
  U   Zope/branches/philikon-aq/lib/python/Products/Five/form/objectwidget.py
  U   Zope/branches/philikon-aq/lib/python/Products/Five/viewlet/manager.py
  U   Zope/branches/philikon-aq/lib/python/ZPublisher/BaseRequest.py

-=-
Modified: Zope/branches/philikon-aq/lib/python/OFS/Traversable.py
===
--- Zope/branches/philikon-aq/lib/python/OFS/Traversable.py 2007-07-27 
23:11:56 UTC (rev 78397)
+++ Zope/branches/philikon-aq/lib/python/OFS/Traversable.py 2007-07-27 
23:12:13 UTC (rev 78398)
@@ -192,7 +192,7 @@
 if ns:
 try:
 next = namespaceLookup(
-ns, nm, obj, self.REQUEST).__of__(obj)
+ns, nm, obj, self.REQUEST)
 if restricted and not validate(
 obj, obj, name, next):
 raise Unauthorized(name)
@@ -260,7 +260,7 @@
  Interface, name)
 
 if next is not None:
-next = next.__of__(obj)
+next = next
 if restricted and not validate(obj, obj, name, next):
 raise Unauthorized(name)
 elif bobo_traverse is not None:

Modified: 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/metaconfigure.py
===
--- Zope/branches/philikon-aq/lib/python/Products/Five/browser/metaconfigure.py 
2007-07-27 23:11:56 UTC (rev 78397)
+++ Zope/branches/philikon-aq/lib/python/Products/Five/browser/metaconfigure.py 
2007-07-27 23:12:13 UTC (rev 78398)
@@ -209,9 +209,9 @@
 view = component.queryMultiAdapter((self, request), name=name,
default=None)
 if view is not None:
-return view.__of__(self)
+return view
 
-m = class_.publishTraverse.__get__(self).__of__(self)
+m = class_.publishTraverse.__get__(self)
 return m(request, name)
 
 else:
@@ -223,7 +223,7 @@
 view = component.queryMultiAdapter((self, request), name=name,
default=None)
 if view is not None:
-return view.__of__(self)
+return view
 
 raise NotFoundError(self, name, request)
 

Modified: 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py
===
--- 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py
2007-07-27 23:11:56 UTC (rev 78397)
+++ 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/providerexpression.py
2007-07-27 23:12:13 UTC (rev 78398)
@@ -41,11 +41,6 @@
 if provider is None:
 raise cp_interfaces.ContentProviderLookupError(name)
 
-# Wrap the content provider's in its __parent__, whatever that
-# may be (typically the view).
-if getattr(provider, '__of__', None) is not None:
-provider = provider.__of__(provider.__parent__)
-
 # Insert the data gotten from the context
 addTALNamespaceData(provider, econtext)
 

Modified: Zope/branches/philikon-aq/lib/python/Products/Five/browser/resource.py
===
--- Zope/branches/philikon-aq/lib/python/Products/Five/browser/resource.py  
2007-07-27 23:11:56 UTC (rev 78397)
+++ Zope/branches/philikon-aq/lib/python/Products/Five/browser/resource.py  
2007-07-27 23:12:13 UTC (rev 78398)
@@ -18,7 +18,6 @@
 import os
 import urllib
 
-import Acquisition
 from OFS.Traversable import Traversable as OFSTraversable
 from zope.app.publisher.browser.resources import empty
 from zope.app.publisher.fileresource import File, Image
@@ -28,12 +27,11 @@
 from zope.component.interfaces import IResource
 from zope.datetime import time as timeFromDateTimeString
 from zope.traversing.browser.interfaces import IAbsoluteURL
-
 from Products.Five.browser import BrowserView
 
 _marker = []
 
-class Resource(Acquisition.Explicit):
+class Resource(object):
 A publishable resource
 
 implements(IResource)
@@ -63,7 +61,7 @@
 Rendered 

[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/test_pages.py Rip out test that tested the bogus behaviour of having self.context (where

2007-07-27 Thread Philipp von Weitershausen
Log message for revision 78399:
  Rip out test that tested the bogus behaviour of having self.context (where
  'self' is a view) have an aq_chain that includes the view again.
  
  Naturally, this branch is all about ripping this out.
  

Changed:
  U   
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/test_pages.py

-=-
Modified: 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/test_pages.py
===
--- 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/test_pages.py  
2007-07-27 23:12:13 UTC (rev 78398)
+++ 
Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/test_pages.py  
2007-07-27 23:14:33 UTC (rev 78399)
@@ -19,47 +19,6 @@
 if __name__ == '__main__':
 execfile(os.path.join(sys.path[0], 'framework.py'))
 
-def test_ViewAcquisitionWrapping():
-
-   import Products.Five.browser.tests
-   from Products.Five import zcml
-   zcml.load_config(configure.zcml, Products.Five)
-   zcml.load_config('pages.zcml', package=Products.Five.browser.tests)
-
-   from Products.Five.tests.testing import simplecontent as sc
-   sc.manage_addSimpleContent(self.folder, 'testoid', 'Testoid')
-   uf = self.folder.acl_users
-   uf._doAddUser('manager', 'r00t', ['Manager'], [])
-   self.login('manager')
-
-   view = self.folder.unrestrictedTraverse('testoid/eagle.txt')
-   view is not None
-  True
-   from Products.Five.browser.tests.pages import SimpleView
-   isinstance(view, SimpleView)
-  True
-   view()
-  u'The eagle has landed'
-
-This sucks, but we know it
-
-   from Acquisition import aq_parent, aq_base
-   aq_parent(view.context) is view
-  True
-
-This is the right way to get the context parent
-
-   view.context.aq_inner.aq_parent is not view
-  True
-   view.context.aq_inner.aq_parent is self.folder
-  True
-
-Clean up:
-
-   from zope.app.testing.placelesssetup import tearDown
-   tearDown()
-
-
 def test_view_with_unwrapped_context():
 
 It may be desirable when writing tests for views themselves to

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/AccessControl/ Use either obj.__parent__or aq_parent(obj) instead of obj.aq_parent.

2007-07-27 Thread Philipp von Weitershausen
Log message for revision 78401:
  Use either obj.__parent__or aq_parent(obj) instead of obj.aq_parent.
  Both are the canonical forms of getting to an object's parent now.
  

Changed:
  U   Zope/branches/philikon-aq/lib/python/AccessControl/ImplPython.py
  U   Zope/branches/philikon-aq/lib/python/AccessControl/Owned.py
  U   Zope/branches/philikon-aq/lib/python/AccessControl/PermissionMapping.py
  U   Zope/branches/philikon-aq/lib/python/AccessControl/Role.py
  U   Zope/branches/philikon-aq/lib/python/AccessControl/User.py

-=-
Modified: Zope/branches/philikon-aq/lib/python/AccessControl/ImplPython.py
===
--- Zope/branches/philikon-aq/lib/python/AccessControl/ImplPython.py
2007-07-27 23:41:03 UTC (rev 78400)
+++ Zope/branches/philikon-aq/lib/python/AccessControl/ImplPython.py
2007-07-27 23:43:27 UTC (rev 78401)
@@ -101,7 +101,7 @@
 object = getattr(object, 'aq_inner', None)
 if object is None:
 break
-object = object.aq_parent
+object = object.__parent__
 
 if r is None:
 if _embed_permission_in_roles:

Modified: Zope/branches/philikon-aq/lib/python/AccessControl/Owned.py
===
--- Zope/branches/philikon-aq/lib/python/AccessControl/Owned.py 2007-07-27 
23:41:03 UTC (rev 78400)
+++ Zope/branches/philikon-aq/lib/python/AccessControl/Owned.py 2007-07-27 
23:43:27 UTC (rev 78401)
@@ -21,7 +21,7 @@
 from AccessControl import getSecurityManager, Unauthorized
 from AccessControl.Permissions import view_management_screens
 from AccessControl.Permissions import take_ownership
-from Acquisition import aq_get, aq_parent, aq_base
+from Acquisition import aq_get, aq_parent, aq_base, aq_inner
 from requestmethod import requestmethod
 from zope.interface import implements
 
@@ -236,12 +236,12 @@
 def manage_fixupOwnershipAfterAdd(self):
 
 # Sigh, get the parent's _owner
-parent=getattr(self, 'aq_parent', None)
+parent=getattr(self, '__parent__', None)
 if parent is not None: _owner=aq_get(parent, '_owner', None, 1)
 else: _owner=None
 
 if (_owner is None and
-((not hasattr(self, 'aq_parent')) or
+((not getattr(self, '__parent__', None) is None) or
  (not hasattr(self, 'getPhysicalRoot'))
  )
 ):
@@ -298,13 +298,13 @@
 return None
 uid=user.getId()
 if uid is None: return uid
-db=user.aq_inner.aq_parent
+db=aq_parent(aq_inner(user))
 path=[absattr(db.id)]
 root=db.getPhysicalRoot()
 while 1:
 db=getattr(db,'aq_inner', None)
 if db is None: break
-db=db.aq_parent
+db=aq_parent(db)
 if db is root: break
 id=db.id
 if not isinstance(id, str):

Modified: 
Zope/branches/philikon-aq/lib/python/AccessControl/PermissionMapping.py
===
--- Zope/branches/philikon-aq/lib/python/AccessControl/PermissionMapping.py 
2007-07-27 23:41:03 UTC (rev 78400)
+++ Zope/branches/philikon-aq/lib/python/AccessControl/PermissionMapping.py 
2007-07-27 23:43:27 UTC (rev 78401)
@@ -105,7 +105,7 @@
 return r
 
 def _isBeingAccessedAsZClassDefinedInstanceMethod(self):
-p=getattr(self,'aq_parent',None)
+p=getattr(self,'__parent__',None)
 if p is None: return 0  # Not wrapped
 base=getattr(p, 'aq_base', None)
 return type(base) is PermissionMapper

Modified: Zope/branches/philikon-aq/lib/python/AccessControl/Role.py
===
--- Zope/branches/philikon-aq/lib/python/AccessControl/Role.py  2007-07-27 
23:41:03 UTC (rev 78400)
+++ Zope/branches/philikon-aq/lib/python/AccessControl/Role.py  2007-07-27 
23:43:27 UTC (rev 78401)
@@ -188,7 +188,7 @@
 if userObj:
 break
 else:
-current = current.aq_parent
+current = current.__parent__
 
 
 newSecurityManager(None, userObj) # necessary?
@@ -414,7 +414,7 @@
 raise OverflowError
 for name in unl:
 dict[name]=1
-item = getattr(item, 'aq_parent', _notfound)
+item = getattr(item, '__parent__', _notfound)
 if item is _notfound:
 break
 keys=dict.keys()
@@ -511,9 +511,9 @@
 for role in roles:
 if not dup(role):
 dict[role]=1
-if not hasattr(obj, 'aq_parent'):
+if getattr(obj, '__parent__', None) is None:
 break
-obj=obj.aq_parent
+obj=obj.__parent__
 x=x+1
 roles=dict.keys()
 roles.sort()

Modified: Zope/branches/philikon-aq/lib/python/AccessControl/User.py

<    1   2   3   4   5   6   7   8   9   >