Status of Google App Engine branch?

11 views
Skip to first unread message

shday

unread,
Jul 22, 2008, 9:45:28 PM7/22/08
to Genshi
Hello,

There is a branch of Genshi that is supposed to be working toward App
Engine compatability:

http://genshi.edgewall.org/wiki/AppEngine

I see there hasn't been any work done on it in a while, and I'm
assuming it isn't currently working at all (I've tried with the App
Engine SDK).

Are there still plans to make Genshi work on App Engine?

Thanks,

Steve

Jeroen Ruigrok van der Werven

unread,
Jul 23, 2008, 6:06:04 AM7/23/08
to gen...@googlegroups.com
-On [20080723 05:19], shday (stephe...@gmail.com) wrote:
>Are there still plans to make Genshi work on App Engine?

For all I know Chris' intent he does want to make it work.

Last time around though part of the problem was Google not allowing ast.py
and workarounds had to be sought. Not sure what the status is on that.

--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B
Teaching should be such that what is offered is perceived as a valuable
gift and not as a hard duty...

Christopher Lenz

unread,
Jul 23, 2008, 6:30:24 AM7/23/08
to gen...@googlegroups.com

Definitely.

However I'm not sure the approach used on the branch is the right one.
Google is likely to enable the _ast module in the future, and in the
meantime, a dirty but working hack is available to make use of _ast on
App Engine.

The long term fix for App Engine support would be to switch to Python
code generation instead of AST transformation, and use _ast to get the
AST as the basis for the code generation, falling back to the compiler
package on Python 2.4.

In the short term, it should be relatively easy to complete that
branch by implementing the py:with and py:for directives in an AST-
less manner. That's really all that's missing right now. But that
branch is very unlikely to be merged back into the mainline, as I'd
rather go the codegen+_ast route described above.

Cheers,
--
Christopher Lenz
cmlenz at gmx.de
http://www.cmlenz.net/

Dirk Holtwick

unread,
Aug 28, 2008, 9:23:07 AM8/28/08
to Genshi
Hi,

since I love Genshi but didn't get it to work on Google App Engine
(GAE) I wrote my own kind of Genshi which uses its owm code generation
part ;) You can see it in action here: http://pyxer.appspot.com/ and
the source code may be found here
http://code.google.com/p/pyxer/source/browse/trunk/src/pyxer/template/templatestream.py

But the Genshi 0.5.1 installation fails loading on GAE because of some
missing global variables while importing genshi._speedups. I commented
this line out and everything works fine:

from genshi._speedups import Markup

Here is the error message:

File '/base/data/home/apps/pyxer/1.21/Lib/site-packages/pyxer-0.5.2-
py2.5.egg/pyxer/template/templatestream.py', line 25 in <module>
from genshi import XML, HTML, Stream, QName, Attrs
File '/base/data/home/apps/pyxer/1.21/Lib/site-packages/genshi-0.5.1-
py2.5-win32.egg/genshi/__init__.py', line 32 in <module>
from genshi.core import *
File '/base/data/home/apps/pyxer/1.21/Lib/site-packages/genshi-0.5.1-
py2.5-win32.egg/genshi/core.py', line 543 in <module>
from genshi._speedups import Markup
File '/base/data/home/apps/pyxer/1.21/Lib/site-packages/genshi-0.5.1-
py2.5-win32.egg/genshi/_speedups.py', line 7 in <module>
__bootstrap__()
File '/base/data/home/apps/pyxer/1.21/Lib/site-packages/genshi-0.5.1-
py2.5-win32.egg/genshi/_speedups.py', line 5 in __bootstrap__
del __bootstrap__, __loader__
NameError: global name '__loader__' is not defined

It would be great if you could consider writing a workaround for this
in your next Genshi release so that the working parts like Parsing and
XPath can be used on GAE.

If something of my template language implementation is useful for
Genshi feel free to use it, it is published under the MIT license. But
I saw some better implementations of code generation in older branches
of the SVN repository of Genshi.

Thanks
Dirk

On 23 Jul., 12:30, Christopher Lenz <cml...@gmx.de> wrote:
> On 23.07.2008, at 03:45, shday wrote:
>
> > Hello,
>
> > There is a branch of Genshi that is supposed to be working toward App
> > Engine compatability:
>
> >http://genshi.edgewall.org/wiki/AppEngine
>
> > I see there hasn't been any work done on it in a while, and I'm
> > assuming it isn't currently working at all (I've tried with the App
> > Engine SDK).
>
> > Are there still plans to make Genshi work on App Engine?
>
> Definitely.
>
> However I'm not sure the approach used on the branch is the right one.  Googleis likely to enable the _ast module in the future, and in the  

noah.gift

unread,
Aug 31, 2008, 3:15:41 PM8/31/08
to Genshi
Hopefully, when a solution on the status of Genshi on appengine is
released someone can post a recipe on the new Google cookbook spot:

http://appengine-cookbook.appspot.com/

On Aug 28, 9:23 am, Dirk Holtwick <dirk.holtw...@gmail.com> wrote:
> Hi,
>
> since I love Genshi but didn't get it to work on Google App Engine
> (GAE) I wrote my own kind of Genshi which uses its owm code generation
> part ;) You can see it in action here:http://pyxer.appspot.com/and
> the source code may be found herehttp://code.google.com/p/pyxer/source/browse/trunk/src/pyxer/template...
Reply all
Reply to author
Forward
0 new messages