[Twisted-web] Re: NamedAnyError

Paul Moore pf_moore at yahoo.co.uk
Tue May 10 06:04:07 MDT 2005

Paul Moore <pf_moore at ...> writes:

> Given that stackless is non-standard, can these warnings be
> suppressed unless stackless is present? (When they presumably won't
> be generated anyway!)

I think the attached patch does the right thing (if it didn't get mangled by 
the web interface I'm using :-() Obviously (!) I can't test it with stackless, 
as I don't have that...

Oh, and by the way - nevow.url.URLPath doesn't exist (also referenced in the 
list of flatteners in __init__.py). I don't know what replaces it' so I can't 
include that in my patch.

Hope this helps (at least it's better than just whingeing :-))

--- nevow\__init__.py.orig	2005-04-28 20:55:12.000000000 +0100
+++ nevow\__init__.py	2005-05-10 12:59:59.926640800 +0100
@@ -165,10 +165,8 @@
 nevow.flat.flatstan.ListSerializer                __builtin__.tuple
 nevow.flat.flatstan.ListSerializer                __builtin__.generator
 nevow.flat.flatstan.FunctionSerializer            __builtin__.function
-nevow.flat.flatstan.FunctionSerializer            stackless.function
 nevow.flat.flatstan.FunctionSerializer            __builtin__.type
 nevow.flat.flatstan.MethodSerializer              __builtin__.instancemethod
-nevow.flat.flatstan.MethodSerializer              stackless.instancemethod
 nevow.flat.flatstan.RendererSerializer            nevow.inevow.IRenderer
 nevow.flat.flatstan.DirectiveSerializer           nevow.stan.directive
 nevow.flat.flatstan.SlotSerializer                nevow.stan.slot
@@ -201,6 +199,16 @@
 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