[Zope3-checkins] SVN: Zope3/trunk/ - removed internal concept of 'warnings' from TAL as it was cruft

Christian Theune ct at gocept.com
Fri Sep 1 11:01:57 EDT 2006


Log message for revision 69922:
   - removed internal concept of 'warnings' from TAL as it was cruft
  

Changed:
  U   Zope3/trunk/doc/CHANGES.txt
  U   Zope3/trunk/src/zope/pagetemplate/pagetemplate.py
  U   Zope3/trunk/src/zope/tal/htmltalparser.py
  U   Zope3/trunk/src/zope/tal/talparser.py

-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt	2006-09-01 13:49:02 UTC (rev 69921)
+++ Zope3/trunk/doc/CHANGES.txt	2006-09-01 15:01:51 UTC (rev 69922)
@@ -29,8 +29,11 @@
 
     Restructuring
 
+      - Removed internal concept of 'warnings' from TAL interpreter as it
+        wasn't used at all and does not belongt to any public interface.
+
     Bug fixes
-    
+
       - Fixed issue 676, utilities defined in Zope 3.2 weren't
         converted properly.
 
@@ -63,7 +66,7 @@
 
       - Fixed issue 572: Dict fields with key_type or value_type set
         didn't handle binding correctly.
-      
+
       - Fixed issue 576: The icon directive title attribute wasn't implemented.
 
       - TAL interpreter didn't translate i18n Messages when inserted
@@ -104,7 +107,7 @@
 
     Much thanks to everyone who contributed to this release:
 
-      Jim Fulton, Dmitry Vasiliev, Martijn Faassen
+      Jim Fulton, Dmitry Vasiliev, Martijn Faassen, Christian Theune
 
   ------------------------------------------------------------------
 

Modified: Zope3/trunk/src/zope/pagetemplate/pagetemplate.py
===================================================================
--- Zope3/trunk/src/zope/pagetemplate/pagetemplate.py	2006-09-01 13:49:02 UTC (rev 69921)
+++ Zope3/trunk/src/zope/pagetemplate/pagetemplate.py	2006-09-01 15:01:51 UTC (rev 69922)
@@ -63,7 +63,6 @@
     content_type = 'text/html'
     expand = 1
     _v_errors = ()
-    _v_warnings = ()
     _v_program = None
     _v_macros = None
     _v_cooked = 0
@@ -127,10 +126,6 @@
         except:
             return ('Macro expansion failed', '%s: %s' % sys.exc_info()[:2])
 
-    def pt_warnings(self):
-        self._cook_check()
-        return self._v_warnings
-
     def write(self, text):
         # We accept both, since the text can either come from a file (and the
         # parser will take care of the encoding) or from a TTW template, in
@@ -199,7 +194,6 @@
         except:
             self._v_errors = ["Compilation failed",
                               "%s: %s" % sys.exc_info()[:2]]
-        self._v_warnings = parser.getWarnings()
         self._v_cooked = 1
 
 
@@ -235,11 +229,7 @@
 
     def __init__(self, pt, namespace):
         self.manageable_object = pt
-        try:
-            w = pt.pt_warnings()
-        except: # We're already trying to report an error, don't make another.
-            w = ()
+        self.warnings = []
         e = pt.pt_errors(namespace)
         if e:
-            w = list(w) + list(e)
-        self.warnings = w
+            self.warnings.extend(e)

Modified: Zope3/trunk/src/zope/tal/htmltalparser.py
===================================================================
--- Zope3/trunk/src/zope/tal/htmltalparser.py	2006-09-01 13:49:02 UTC (rev 69921)
+++ Zope3/trunk/src/zope/tal/htmltalparser.py	2006-09-01 15:01:51 UTC (rev 69922)
@@ -134,9 +134,6 @@
     def getCode(self):
         return self.gen.getCode()
 
-    def getWarnings(self):
-        return ()
-
     # Overriding HTMLParser methods
 
     def handle_starttag(self, tag, attrs):

Modified: Zope3/trunk/src/zope/tal/talparser.py
===================================================================
--- Zope3/trunk/src/zope/tal/talparser.py	2006-09-01 13:49:02 UTC (rev 69921)
+++ Zope3/trunk/src/zope/tal/talparser.py	2006-09-01 15:01:51 UTC (rev 69922)
@@ -36,9 +36,6 @@
     def getCode(self):
         return self.gen.getCode()
 
-    def getWarnings(self):
-        return ()
-
     def StartNamespaceDeclHandler(self, prefix, uri):
         self.nsStack.append(self.nsDict.copy())
         self.nsDict[uri] = prefix



More information about the Zope3-Checkins mailing list