Opened 9 years ago

Last modified 9 years ago

#6300 defect new

ResponseDone should be a subclass of ConnectionDone

Reported by: davidsarah Owned by:
Priority: normal Milestone:
Component: web Keywords:
Cc: jknight, davidsarah Branch:


twisted.web.[_new]client.ResponseDone should be a subclass of twisted.internet.error.ConnectionLost, so that when it is passed to the connectionLost method of a protocol, the API for IProtocol.connectionLost is followed.

This should not have any backward compatibility impact, I think (ResponseDone currently directly subclasses Exception).

Change History (4)

comment:1 Changed 9 years ago by DefaultCC Plugin

Cc: jknight added

comment:2 Changed 9 years ago by davidsarah

Cc: davidsarah added

comment:3 Changed 9 years ago by Itamar Turner-Trauring

I think the interface documentation should change, rather than the code. First, we have other places where exceptions that don't inherit from ConnectionLost are passed to the protocol. Second, it's not clear to me what benefit inheriting from ConnectionLost gives you.

Can you give an example use case motivating this change?

comment:4 Changed 9 years ago by Jean-Paul Calderone

Future readers might observe that ConnectionLost is not the same as ConnectionDone. I think itamar meant to write ConnectionDone, since that's what the ticket description actually proposes.

Note: See TracTickets for help on using tickets.