[Twisted-web] Stackless and Nevow integration

Jean-Paul Calderone exarkun at divmod.com
Tue May 13 12:34:53 EDT 2008

On Tue, 13 May 2008 17:04:58 +0100, Simon Pickles <sipickles at googlemail.com> wrote:
>Jean-Paul Calderone wrote:
>>On Tue, 13 May 2008 08:34:51 +0100, Simon Pickles 
>><sipickles at googlemail.com> wrote:
>>>>On Mon, 12 May 2008 14:07:22 +0100, Simon Pickles <sipickles at 
>>>>googlemail.com <http://twistedmatrix.com/cgi- 
>>>>bin/mailman/listinfo/twisted- web>> wrote:
>>>>/>/has anyone managed to combined Nevow with Stackless Python?
>>>>/>/I have rebuilt stackless after satisfying all the extension libs (to 
>>>>include />/zLib), but now Nevow baulks at the mention of the global 
>>>>I don't understand how this could actually be related to Nevow.  Nevow is
>>>>just a Python library.  If you have NameErrors, it's because you wrote 
>>>>code using a name that wasn't defined. :)  Does adding, say, "import 
>>>>to the top of your program fix the problem?  If not, post some code that 
>>>>how it breaks.
>>>It looks like a nevow issue in some introspection process used to import 
>>>loaders. Looking at the callstack, its actually a twisted file which 
>>Ah.  I'd completely forgotten about that code.  I suspect it should just
>>be deleted.  Can you file a ticket for this and attach the traceback?
>Will do. Can you suggest a quick mod I can make (which lines to delete) so I 
>can progress? Thanks Jean

I think something like this should help:

Index: Nevow/nevow/__init__.py
--- Nevow/nevow/__init__.py     (revision 15766)
+++ Nevow/nevow/__init__.py     (working copy)
@@ -207,16 +207,6 @@
 nevow.i18n.flattenL10n              nevow.i18n.PlaceHolder

-flatteners_stackless = """
-nevow.flat.flatstan.FunctionSerializer            stackless.function
-nevow.flat.flatstan.MethodSerializer              stackless.instancemethod
-    import stackless
-    flatteners += flatteners_stackless
-except ImportError:
-    pass
 flatteners_2_4 = """
 nevow.flat.flatstan.StringCastSerializer          decimal.Decimal

More information about the Twisted-web mailing list