-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IMAP4 initialization api #50
Comments
sorry for the delay I was on another projects lately, that makes sense to me, I will see the implication for your third point soon |
Hi! Is there any update on the topic? I'm interested in moving the connection start out of |
This issue is about moving connection to 1. |
@filiphanes I'm talking about this:
The cause is simple enough. async def connect(...):
# code skipped
await loop.create_connection(
lambda: self.protocol, self.host, self.port, ssl=self.ssl_context
)
await self.wait_hello_from_server() in client code, we can easily catch connection exceptions, by just enclosing |
yes, I understand you. Does anybody else want/need second solution more then first? |
thank you @aleks-v-k for your comment and @filiphanes for your insights and issue. At the beginning I think that we've seen the constructor as instantiating objects with no network actions. It has the advantage also to not mix async and non async commands. So I'd be more inclined to go for the first proposal. |
Current connection code looks like:
1. new version
connect
is more readable and intuitive thanwait_hello_from_server
2. new version more like imaplib.IMAP4
What do you think about these updates?
The text was updated successfully, but these errors were encountered: