Ticket #5725 enhancement new

Opened 11 months ago

Last modified 11 months ago

Add public API to SMTPClient to control state transitions

Reported by: itamar Owned by:
Priority: normal Milestone:
Component: mail Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description

SMTPClient's state machine cannot be controlled by subclasses without setting private attributes; the attached patch switch to a public API for setting this.

Alternatively, maybe it's easier to just throw SMTPClient out and start from scratch.

Attachments

publicstate.diff Download (4.6 KB) - added by itamar 11 months ago.
Patch to twisted.mail.smtp

Change History

Changed 11 months ago by itamar

Patch to twisted.mail.smtp

1

Changed 11 months ago by itamar

I am uncertain whether these are minimal enough chances that the current unit tests cover it, and don't have time to check right now.

2

Changed 11 months ago by exarkun

Alternatively, maybe it's easier to just throw SMTPClient out and start from scratch.

This is attractive. (Of course, the order we go in is "start from scratch" and then "throw SMTPClient out".) The overall structure of SMTPClient is extremely cumbersome and the interface is obtuse.

Note: See TracTickets for help on using tickets.