Zope icon indicating copy to clipboard operation
Zope copied to clipboard

Remove more non-Chameleon parts of Products.PageTemplates

Open hannosch opened this issue 8 years ago • 1 comments

Zope master uses and sets up Chameleon as the default ZPT rendering engine. To do this, I've integrated the former five.pt code directly into Products.PageTemplates.

But I didn't yet remove the older code that is no longer required for Chameleon. One issue here is that Chameleon hooks itself into zope.pagetemplate via a utility registration for IPageTemplateEngine. This means you need to have ZCML set up for this to work. The old PageTemplates logic didn't require any ZCML. As a result tests without a ZCML layer or those not loading Products.PageTemplates configure.zcml still use the old ZPT engine.

One module that should probably be deprecated and cleaned out is Expressions (https://github.com/zopefoundation/Zope/blob/master/src/Products/PageTemplates/Expressions.py). In it the old module scope _engine is created.

The newer Chameleon integration code is in expression.py and engine.py.

hannosch avatar Feb 20 '17 17:02 hannosch

We just figured out that commenting out https://github.com/zopefoundation/Zope/blob/215bc42f7bf91c29d02c92cb55b1c3a5c562e651/src/Testing/ZopeTestCase/ZopeLite.py#L143 (which should already disable all indirect use of PageTemplate.Expressions) doesn't kill any tests. That should make this task much simpler.

dwt avatar Sep 15 '17 09:09 dwt