Opened 14 years ago

Last modified 13 months ago

#344 enhancement closed fixed (fixed)

wchild_, getDynamicChild, etc should allow returning a Deferred

Reported by: jknight Owned by:
Priority: normal Milestone:
Component: web Keywords:
Cc: radix, itamarst, dp, Moshe Zadka, jknight Branch:


Change History (8)

comment:1 Changed 14 years ago by jknight

At least woven's wchild_ and getDynamicChild should allow returning a Deferred, which will get 
autowrapped in a DeferredResource.

Additionally, as many of the other get*Child* methods as make sense/are possible should similarly
work. (aka: if it's possible to put the autowrapping outside of woven-specific code that'd be extra-

[18:56] <stranger> (it would be nice if one could return a deferred that would become a page 
[18:57] <foom> returning a deferred from a wchild_ doesn't work? if not then return a 
[18:57] <itamar> foom: don't think it works, no
[18:57] <itamar> though it probably ought to
[18:57] <itamar> add an issue

comment:2 Changed 14 years ago by Moshe Zadka

They will when getChildWithDefault will allow returning a deferred,
and there's already a feature filed for that.
Why on earth should there be separate code in Woven?

comment:3 Changed 14 years ago by jknight

I think maybe I'm blind, because I don't see the other feature request filed? 

Also, my request was for a behavior, not an implementation. As I tried to say, if it makes the most 
sense to put the code outside woven, great!

comment:4 Changed 14 years ago by itamarst

1. The feature request is for render() AFAICT.

2. wchild_ may be be done in render(), for example, who knows, in which case
it'd need woven specific code. Probably not, but this is Woven, where EVERYTHING

comment:5 Changed 14 years ago by itamarst

Now that we have render_GET etc., they should be altered so that returning
Deferred is supported. Someone should investigate whether adding support for
getChild will break backwards compatability - my guess is that with the
appropriate checks in the resource-traversal loop it should be fine. Donovan
should probably be able to help with is.

comment:6 Changed 13 years ago by radix

WONTFIX; this stuff is already working in nevow.

comment:7 Changed 7 years ago by <automation>

Owner: radix deleted

comment:8 Changed 13 months ago by GitHub <noreply@…>

In 6e09379:

Merge pull request #344 from twisted/8468-rodrigc-exc_clear

Author: rodrigc
Reviewer: markrwilliams
Fixes: #8468

Do not call sys.exc_clear() on Python 3 in twisted/scripts/

Note: See TracTickets for help on using tickets.