This change breaks Gadfly which doesn't seem to like 'null' at all. I poked around in ZGadflyDA/gadfly a bit, but it's not obvious to me how to fix the parser (*.mar files anyone?). Stefan [snip] File "/usr/local/Zope-2_8-branch/lib/python/Products/ZGadflyDA/ gadfly/kjParser.py", line 826, in ParseError raise SyntaxError, 'unexpected token sequence.' + data SyntaxError: unexpected token sequence.near :: "dca437824c3b0',"*" null, '', '" ******************************* current state = 252 expects: '?', 'numeric_literal', 'character_string_literal', '-', '+', ('nomatch1',) current token = ((-8, 'user_defined_name'), 'NULL') On 3. Sep 2005, at 01:20, Tres Seaver wrote:
Log message for revision 38276: Collector #556: sqlvar now returns 'null' rather than 'None'.
Changed: U Zope/trunk/lib/python/Shared/DC/ZRDB/sqlvar.py A Zope/trunk/lib/python/Shared/DC/ZRDB/tests/test_sqlvar.py
-=- Modified: Zope/trunk/lib/python/Shared/DC/ZRDB/sqlvar.py =================================================================== --- Zope/trunk/lib/python/Shared/DC/ZRDB/sqlvar.py 2005-09-02 23:15:46 UTC (rev 38275) +++ Zope/trunk/lib/python/Shared/DC/ZRDB/sqlvar.py 2005-09-02 23:20:49 UTC (rev 38276) @@ -98,6 +98,9 @@ raise raise ValueError, 'Missing input variable, <em>%s</ em>' % name
+ if v is None: + return 'null' + if t=='int': try: if type(v) is StringType:
-- Anything that happens, happens. --Douglas Adams