[Checkins] SVN: z3c.macro/trunk/ Fix working with z3c.pt :-)

Dan Korostelev nadako at gmail.com
Sat Feb 28 06:27:22 EST 2009


Log message for revision 97379:
  Fix working with z3c.pt :-)

Changed:
  U   z3c.macro/trunk/CHANGES.txt
  U   z3c.macro/trunk/setup.py
  U   z3c.macro/trunk/src/z3c/macro/README.txt
  D   z3c.macro/trunk/src/z3c/macro/SETUP.cfg
  U   z3c.macro/trunk/src/z3c/macro/tales.py
  U   z3c.macro/trunk/src/z3c/macro/tests.py
  D   z3c.macro/trunk/src/z3c/macro/z3c.macro-configure.zcml
  D   z3c.macro/trunk/src/z3c/macro/z3c.macro-meta.zcml
  U   z3c.macro/trunk/src/z3c/macro/zcml.py
  U   z3c.macro/trunk/src/z3c/macro/zcml.txt

-=-
Modified: z3c.macro/trunk/CHANGES.txt
===================================================================
--- z3c.macro/trunk/CHANGES.txt	2009-02-28 10:33:11 UTC (rev 97378)
+++ z3c.macro/trunk/CHANGES.txt	2009-02-28 11:27:22 UTC (rev 97379)
@@ -2,12 +2,14 @@
 CHANGES
 =======
 
-after 1.1.0
------------
+1.1.1 (unreleased)
+------------------
 
-- Allow use of ``z3c.pt`` using ``z3c.pt.compat`` compatibility later.
+- Allow use of ``z3c.pt`` using ``z3c.ptcompat`` compatibility later.
 
+- Change package's mailing list address to zope-dev at zope.org.
 
+
 1.1.0 (2007-11-01)
 ------------------
 

Modified: z3c.macro/trunk/setup.py
===================================================================
--- z3c.macro/trunk/setup.py	2009-02-28 10:33:11 UTC (rev 97378)
+++ z3c.macro/trunk/setup.py	2009-02-28 11:27:22 UTC (rev 97379)
@@ -25,7 +25,7 @@
     name='z3c.macro',
     version='1.2.0',
     author = "Roger Ineichen and the Zope Community",
-    author_email = "zope3-dev at zope.org",
+    author_email = "zope-dev at zope.org",
     description = "Simpler definition of ZPT macros.",
     long_description=(
         read('README.txt')
@@ -59,6 +59,7 @@
         test = ['z3c.template',
                 'z3c.pt>=1.0b4',
                 'lxml>=2.1.1',
+                'zope.app.pagetemplate',
                 'zope.app.testing',
                 'zope.testing'],
         ),
@@ -71,8 +72,7 @@
         'zope.publisher',
         'zope.schema',
         'zope.tales',
-        'zope.app.pagetemplate',
-        'z3c.pt.compat',
+        'z3c.ptcompat[zpt]',
         ],
     include_package_data = True,
     zip_safe = False,

Modified: z3c.macro/trunk/src/z3c/macro/README.txt
===================================================================
--- z3c.macro/trunk/src/z3c/macro/README.txt	2009-02-28 10:33:11 UTC (rev 97378)
+++ z3c.macro/trunk/src/z3c/macro/README.txt	2009-02-28 11:27:22 UTC (rev 97379)
@@ -90,7 +90,7 @@
   ...     def __call__(self, **kwargs):
   ...         return self.index(**kwargs)
 
-  >>> from z3c.pt.compat import ViewPageTemplateFile  
+  >>> from z3c.ptcompat import ViewPageTemplateFile  
   >>> def SimpleViewClass(path, name=u''):
   ...     return type(
   ...         "SimpleViewClass", (simple,),

Deleted: z3c.macro/trunk/src/z3c/macro/SETUP.cfg
===================================================================
--- z3c.macro/trunk/src/z3c/macro/SETUP.cfg	2009-02-28 10:33:11 UTC (rev 97378)
+++ z3c.macro/trunk/src/z3c/macro/SETUP.cfg	2009-02-28 11:27:22 UTC (rev 97379)
@@ -1,3 +0,0 @@
-<data-files zopeskel/etc/package-includes>
-  z3c.macro-*.zcml
-</data-files>

Modified: z3c.macro/trunk/src/z3c/macro/tales.py
===================================================================
--- z3c.macro/trunk/src/z3c/macro/tales.py	2009-02-28 10:33:11 UTC (rev 97378)
+++ z3c.macro/trunk/src/z3c/macro/tales.py	2009-02-28 11:27:22 UTC (rev 97379)
@@ -42,14 +42,12 @@
         return get_macro_template(context, view, request, name)
     
 try:
-    from chameleon.zpt.interfaces import IExpressionTranslator
+    from chameleon.zpt.expressions import ExpressionTranslator
     from chameleon.core import types
         
-    class Z3CPTMacroExpression(object):
+    class Z3CPTMacroExpression(ExpressionTranslator):
         """Collect named IMacroTemplate via a TAL namespace called ``macro``."""
 
-        zope.interface.implements(IExpressionTranslator)
-
         macro_regex = re.compile(r'^[A-Za-z][A-Za-z0-9_-]*$')
         symbol = '_get_macro_template'
         

Modified: z3c.macro/trunk/src/z3c/macro/tests.py
===================================================================
--- z3c.macro/trunk/src/z3c/macro/tests.py	2009-02-28 10:33:11 UTC (rev 97378)
+++ z3c.macro/trunk/src/z3c/macro/tests.py	2009-02-28 11:27:22 UTC (rev 97379)
@@ -26,14 +26,15 @@
 from zope.app.testing import setup
 from zope.configuration import xmlconfig
 
-import z3c.pt.compat
+import z3c.pt
+import z3c.ptcompat
 
 def setUp(test):
     root = setup.placefulSetUp(site=True)
     test.globs['root'] = root
 
 def setUpZPT(test):
-    z3c.pt.compat.config.disable()
+    z3c.ptcompat.config.disable()
     setUp(test)
     
     from zope.app.pagetemplate import metaconfigure
@@ -41,7 +42,7 @@
     metaconfigure.registerType('macro', tales.MacroExpression)
 
 def setUpZ3CPT(suite):
-    z3c.pt.compat.config.enable()
+    z3c.ptcompat.config.enable()
     setUp(suite)
     xmlconfig.XMLConfig('configure.zcml', z3c.pt)()
 

Deleted: z3c.macro/trunk/src/z3c/macro/z3c.macro-configure.zcml
===================================================================
--- z3c.macro/trunk/src/z3c/macro/z3c.macro-configure.zcml	2009-02-28 10:33:11 UTC (rev 97378)
+++ z3c.macro/trunk/src/z3c/macro/z3c.macro-configure.zcml	2009-02-28 11:27:22 UTC (rev 97379)
@@ -1,6 +0,0 @@
-<configure
-    xmlns:zcml="http://namespaces.zope.org/zcml">
-
-  <include package="z3c.macro" />
-
-</configure>

Deleted: z3c.macro/trunk/src/z3c/macro/z3c.macro-meta.zcml
===================================================================
--- z3c.macro/trunk/src/z3c/macro/z3c.macro-meta.zcml	2009-02-28 10:33:11 UTC (rev 97378)
+++ z3c.macro/trunk/src/z3c/macro/z3c.macro-meta.zcml	2009-02-28 11:27:22 UTC (rev 97379)
@@ -1,6 +0,0 @@
-<configure
-    xmlns:zcml="http://namespaces.zope.org/zcml">
-
-  <include package="z3c.macro" file="meta.zcml" />
-
-</configure>

Modified: z3c.macro/trunk/src/z3c/macro/zcml.py
===================================================================
--- z3c.macro/trunk/src/z3c/macro/zcml.py	2009-02-28 10:33:11 UTC (rev 97378)
+++ z3c.macro/trunk/src/z3c/macro/zcml.py	2009-02-28 11:27:22 UTC (rev 97379)
@@ -26,7 +26,7 @@
 from zope.publisher.interfaces.browser import IBrowserView
 from zope.publisher.interfaces.browser import IDefaultBrowserLayer
 
-from z3c.pt import compat
+import z3c.ptcompat as compat
 from z3c.macro import interfaces
 
 class IMacroDirective(zope.interface.Interface):

Modified: z3c.macro/trunk/src/z3c/macro/zcml.txt
===================================================================
--- z3c.macro/trunk/src/z3c/macro/zcml.txt	2009-02-28 10:33:11 UTC (rev 97378)
+++ z3c.macro/trunk/src/z3c/macro/zcml.txt	2009-02-28 11:27:22 UTC (rev 97379)
@@ -83,7 +83,7 @@
   ... </html>
   ... ''')
 
-  >>> from z3c.pt.compat import ViewPageTemplateFile, bind_template
+  >>> from z3c.ptcompat import ViewPageTemplateFile, bind_template
   >>> template = ViewPageTemplateFile(file)
   >>> print bind_template(template, view)(macro=macro)
   <html>



More information about the Checkins mailing list