#3428 closed defect (fixed)

twisted.web.resource.Resource subclasses should not return Deferreds

Reported by: exarkun Owned by: GitHub <noreply@…>
Priority: normal Milestone: undecided
Component: unknown Version: n/a
Keywords: review Cc:
Launchpad Bug:

Description

Twisted Web supports a Deferred return value from neither Resource.getChild nor Resource.render. allmydata/web/ contains a number of Resource subclasses which were switched away from Nevow Page - which *does* support a Deferred result from these methods.

The Resource subclasses still work because Nevow's "appserver" is still being used but as soon as that is switched to Twisted's "Site" this code will all break.

To make that transition as smooth as possible, change all of this application code away from returning Deferred.

Change History (4)

comment:1 Changed at 2020-10-14T17:15:21Z by exarkun

  • Owner set to exarkun
  • Status changed from new to assigned

comment:3 Changed at 2020-10-16T18:36:53Z by exarkun

  • Owner exarkun deleted
  • Status changed from assigned to new

comment:4 Changed at 2020-10-21T14:05:18Z by GitHub <noreply@…>

  • Owner set to GitHub <noreply@…>
  • Resolution set to fixed
  • Status changed from new to closed

In fb45289/trunk:

Merge pull request #864 from tahoe-lafs/3428.dont-return-deferred-to-twistedweb.2

Don't return Deferreds to Twisted Web

Fixes: ticket:3428
Fixes: ticket:3314

Note: See TracTickets for help on using tickets.