Re: [Repoze-dev] Chameleon 1.1 and z3c.pt problems
On 27 February 2010 12:10, Uli Fouquet u...@gnufix.de wrote: While trying to make megrok.chameleon compatible with zopetoolkit and groktoolkit package versions, I noticed that latest z3c.pt (1.1.0) and trunk are not completely compatible with Chameleon = 1.1.0. The tests fail. Do you think you can find time to try and reproduce this in straight Chameleon? I tried to fix it and it turned out, that compatibility problems result from different code generated by chameleon.core.codegen.Suite (while evaluating expressions in templates). Certain things changed in this release. while Chameleon 1.1.2 generates for the same input:: 'options/test' result = econtext['econtext']['_path']( econtext['econtext']['options'], econtext['econtext']['request'], True, 'test') Seems like the code that does the name transformation (codegen.py:visit_Name) should include ``econtext`` to the list of globally known symbols. This means that when executing the generated code, one has to make sure that the used locals are setup differently: econtext['econtext'] must exist to make the generated code work. You're right that this shouldn't be necessary. \malthe ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
[Repoze-dev] repoze.bitblt 0.8 released
Hi, I've just uploaded a new release of repoze.bitblt to pypi. As noted in the changelog, it's quite a big change but resolves all the open issues with repoze.bitblt. For the lazy among us: http://pypi.python.org/pypi/repoze.bitblt -- Brian Sutherland ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Chameleon 1.1 and z3c.pt problems
Hi there, Malthe Borch wrote: On 27 February 2010 12:10, Uli Fouquet u...@gnufix.de wrote: While trying to make megrok.chameleon compatible with zopetoolkit and groktoolkit package versions, I noticed that latest z3c.pt (1.1.0) and trunk are not completely compatible with Chameleon = 1.1.0. The tests fail. Do you think you can find time to try and reproduce this in straight Chameleon? Sure, the following doctest example added to core/codegen.txt passes with Chameleon 1.0.8:: Syntax extension: ``econtext`` references - suite = Suite(\ ... result = _path(options, True, 'test') ... ) suite.source result = econtext['_path'](econtext['options'], True, 'test')\n But with Chameleon trunk gives:: -- File ...chameleon/trunk/src/chameleon/core/codegen.txt, line 48, in codegen.txt Failed example: suite.source Expected: result = econtext['_path'](econtext['options'], True, 'test')\n Got: result = econtext['econtext']['_path'](econtext['econtext']['options'], True, 'test')\n [snip] 'options/test' result = econtext['econtext']['_path']( econtext['econtext']['options'], econtext['econtext']['request'], True, 'test') Seems like the code that does the name transformation (codegen.py:visit_Name) should include ``econtext`` to the list of globally known symbols. Ah, I see. Thanks for the hint! Looks like this is really the crucial point. When I add ``'econtext'`` to ``CONSTANTS`` (just to inject it somewhere, probably not the right place), all tests pass, including the snippet above. This is true for both versions, the current trunk and 1.0.8 :-) [snip] Thanks for looking into this! If you think the mentioned behaviour is really a bug in Chameleon, I'd be glad to assist in fixing it. Best regards, -- Uli signature.asc Description: Dies ist ein digital signierter Nachrichtenteil ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Chameleon 1.1 and z3c.pt problems
I'm sure I'm speaking out of turn here, but what good is it to rely on the composition of generated source code? It would be a true shame if Chameleon internals became APIs. On 3/1/10 10:47 AM, Uli Fouquet wrote: Hi there, Malthe Borch wrote: On 27 February 2010 12:10, Uli Fouquetu...@gnufix.de wrote: While trying to make megrok.chameleon compatible with zopetoolkit and groktoolkit package versions, I noticed that latest z3c.pt (1.1.0) and trunk are not completely compatible with Chameleon= 1.1.0. The tests fail. Do you think you can find time to try and reproduce this in straight Chameleon? Sure, the following doctest example added to core/codegen.txt passes with Chameleon 1.0.8:: Syntax extension: ``econtext`` references - suite = Suite(\ ... result = _path(options, True, 'test') ... ) suite.source result = econtext['_path'](econtext['options'], True, 'test')\n But with Chameleon trunk gives:: -- File ...chameleon/trunk/src/chameleon/core/codegen.txt, line 48, in codegen.txt Failed example: suite.source Expected: result = econtext['_path'](econtext['options'], True, 'test')\n Got: result = econtext['econtext']['_path'](econtext['econtext']['options'], True, 'test')\n [snip] 'options/test' result = econtext['econtext']['_path']( econtext['econtext']['options'], econtext['econtext']['request'], True, 'test') Seems like the code that does the name transformation (codegen.py:visit_Name) should include ``econtext`` to the list of globally known symbols. Ah, I see. Thanks for the hint! Looks like this is really the crucial point. When I add ``'econtext'`` to ``CONSTANTS`` (just to inject it somewhere, probably not the right place), all tests pass, including the snippet above. This is true for both versions, the current trunk and 1.0.8 :-) [snip] Thanks for looking into this! If you think the mentioned behaviour is really a bug in Chameleon, I'd be glad to assist in fixing it. Best regards, ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev -- Chris McDonough Agendaless Consulting, Fredericksburg VA The repoze.bfg Web Application Framework Book: http://bfg.repoze.org/book ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] PyCon presentations...
On 3/1/10 3:54 PM, Chris McDonough wrote: On 3/1/10 8:09 AM, Matt Goodall wrote: Just a small comment about Carlos's talk ... Zope and BFG are not the only web frameworks that use URL traversal. Twisted Web and restish also split the URL into segments to walk the object (aka resource) graph allowing context-sensitive security to be applied (as well as other things). bobo, CherryPy and TurboGears all also offer some form of traversal. - C Why this didn't go to the list by default I do not know. ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev