Since both submitting a command no longer requires a cancellable, and it is desirable to avoid sending a queued command that has already been cancelled beforehand, add a new `Command.should_send` Cancellable property to specify if a command should (still) be sent or not, and stop passing a cancellable to ClientSession when submitting commands. Allow call sites to pass in existing cancellable objects, and thus also add it it as a ctor property to the Command class and all subclasses. Lastly, throw a cancelled exception in `wait_until_complete` if send was cancelled so that the caller knows what happened. Remove redundant cancellable argument from `Imap.Client.command_transaction_async` and rename it to `submit_command` to make it more obvious about what it does. |
||
|---|---|---|
| .. | ||
| command | ||
| message | ||
| parameter | ||
| response | ||
| transport | ||