Opened 23 months ago

Last modified 22 months 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:
Author: Launchpad Bug:


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 23 months ago by DefaultCC Plugin

  • Cc jknight added

comment:2 Changed 23 months ago by davidsarah

  • Cc davidsarah added

comment:3 Changed 23 months ago by itamar

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 22 months ago by exarkun

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.