[Zope-dev] A suggestion for changing exception handler when loading 'c' optimisations to make modules more friendly for GAE

Tobias Rodäbel tobias.rodaebel at mac.com
Fri Jul 3 04:33:53 EDT 2009


Hi,

yes, I'd really appreciate such a modification. Then I could delete  
the regarding code in my rod.recipe.appengine, which provides a dummy  
implementation of imp.load_dynamic.

Tim, do you have a list of the concerning packages? I could help  
making these changes. A good reason to file an application for commit  
rights :-)

Regards

Tobias

On 03.07.2009, at 02:39, Tim Hoffman wrote:

> Hi all
>
> Can I make a suggestion that would make a couple of modules more gae
> friendly ;-)
> zope.interface and zope.i18nmessageid have 'c' optimisations which
> obviously don't work under app engine.
>
>
> When these modules are imported you get the following exception.
>
> gae/1.333250465889549129/zope/i18nmessageid/ 
> _zope_i18nmessageid_message.py",
> line 6, in __bootstrap__
>    imp.load_dynamic(__name__,__file__)
>  File "/base/python_dist/lib/python2.5/py_imp.py", line 116, in  
> load_dynamic
>    raise NotImplementedError('This function is not supported on App  
> Engine.')
>
> Unfortunately the code (in this case in zope.i18nmessageid.Message)
> does the following which doesn't deal with the Exception
> raised by the app engine runtime.
>
>
> try:
>    from _zope_i18nmessageid_message import Message
> except ImportError:
>    pass
>
> To make it more "gae friendly" I think we should change these  
> occurrences to
>
> try:
>    from _zope_i18nmessageid_message import Message
> except ImportError, NotImplementedError:
>    pass
>
> Regards
>
> Tim
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev at zope.org
> http://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope )



More information about the Zope-Dev mailing list