Opened 2 months ago

Last modified 3 days ago

#9679 defect new

Deferred object created from future returns wrong CancelledError type

Reported by: Adam Wierzbicki Owned by:
Priority: normal Milestone:
Component: core Keywords: review
Cc: Branch:
Author:

Description

Caller of Deferred.cancel() expects the cancelled deferred object to return twisted.internet.defer.CancelledError. On the other hand, calling Future.cancel() results in concurrent.futures.CancelledError. This causes problems with deferred objects created with Deferred.fromFuture(). E.g. setting timeout for such objects won't work because _cancelledToTimedOutError only traps twisted.internet.defer.CancelledError and not concurrent.futures.CancelledError.

Change History (2)

comment:1 Changed 7 weeks ago by Glyph

Keywords: review added

comment:2 Changed 3 days ago by Kyle Altendorf

Note: See TracTickets for help on using tickets.