bug in trunk ZopePageTemplate.py?
Running CMF 2.0-beta tests against the zope 2 trunk, I noticed a test failure that's not happening under zope 2.9: Error in test testHTML (Products.CMFDefault.tests.test_Document.DocumentFTPGetTests) Traceback (most recent call last): File "/usr/lib/python2.4/unittest.py", line 260, in run testMethod() File "/home/pw/Downloads/Apps/Net/z2-trunk/Products/CMFDefault/tests/test_Document.py", line 391, in testHTML ZopePageTemplate('source_html') ) File "/home/pw/Downloads/Apps/Net/z2-trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py", line 135, in __init__ self.pt_edit(text, content_type, encoding) File "/home/pw/Downloads/Apps/Net/z2-trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py", line 143, in pt_edit text = text.strip() AttributeError: 'NoneType' object has no attribute 'strip' This is because the semantics of ZopePageTemplate(id, text=None) have changed. It used to be that if text was None, the contents of www/default.html would be used. That no longer happends, and pt_edit can't accept None for the text. Was this intentional or is it a bug? -- Paul Winkler http://www.slinkp.com
--On 7. April 2006 15:37:38 -0400 Paul Winkler <pw_lists@slinkp.com> wrote:
This is because the semantics of ZopePageTemplate(id, text=None) have changed. It used to be that if text was None, the contents of www/default.html would be used. That no longer happends, and pt_edit can't accept None for the text.
Was this intentional or is it a bug?
Unlikely and it is likely a bug. Please put it into the collector. Since I have to complete my work on the Zope 3 ZPT integration for Zope 2.10 I'll try to fix that as soon as I can find some time. -aj ----------------------------------------------------------------------- - Andreas Jung ZOPYX Ltd. & Co KG - - E-mail: info@zopyx.com Web: www.zopyx.com, www.zopyx.de - -----------------------------------------------------------------------
On Fri, Apr 07, 2006 at 09:50:06PM +0200, Andreas Jung wrote:
--On 7. April 2006 15:37:38 -0400 Paul Winkler <pw_lists@slinkp.com> wrote:
This is because the semantics of ZopePageTemplate(id, text=None) have changed. It used to be that if text was None, the contents of www/default.html would be used. That no longer happends, and pt_edit can't accept None for the text.
Was this intentional or is it a bug?
Unlikely and it is likely a bug. Please put it into the collector. Since I have to complete my work on the Zope 3 ZPT integration for Zope 2.10 I'll try to fix that as soon as I can find some time.
Done and assigned to you - both of you ;-) http://www.zope.org/Collectors/Zope/2064 -- Paul Winkler http://www.slinkp.com
participants (2)
-
Andreas Jung -
Paul Winkler