Opened 2 years ago

Last modified 2 years ago

#5725 enhancement new

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 (1)

publicstate.diff (4.6 KB) - added by itamar 2 years ago.
Patch to twisted.mail.smtp

Download all attachments as: .zip

Change History (3)

Changed 2 years ago by itamar

Patch to twisted.mail.smtp

comment:1 Changed 2 years 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.

comment:2 Changed 2 years 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.