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

Closed
opened 2020-09-18 18:04:34 +00:00 by exarkun · 2 comments

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.

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.
exarkun added the
unknown
normal
defect
n/a
labels 2020-09-18 18:04:34 +00:00
exarkun added this to the undecided milestone 2020-09-18 18:04:34 +00:00
exarkun self-assigned this 2020-10-14 17:15:21 +00:00
Author
(https://github.com/tahoe-lafs/tahoe-lafs/pull/864)
exarkun removed their assignment 2020-10-16 18:36:53 +00:00
GitHub <noreply@github.com> commented 2020-10-21 14:05:18 +00:00
Owner

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
In [fb45289/trunk](/tahoe-lafs/trac-2024-07-25/commit/fb4528945c99ada5766e81dd215cc0e9a8a59e43): ``` 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 ```
tahoe-lafs added the
fixed
label 2020-10-21 14:05:18 +00:00
GitHub <noreply@github.com> closed this issue 2020-10-21 14:05:18 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#3428
No description provided.