Skip to content

bpo-39259: smtp.SMTP/SMTP_SSL now reject timeout = 0 #17958

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

Merged
merged 1 commit into from
Jan 14, 2020

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Jan 12, 2020

@corona10
Copy link
Member Author

corona10 commented Jan 12, 2020

@vstinner
Discussion needed:

During I work on this PR, I've noticed that LMTP does not support the timeout parameter.
See: https://docs.python.org/3.9/library/smtplib.html#smtplib.LMTP

However, LMTP also able to use the socket which is created from SMTP.

return SMTP.connect(self, host, port, source_address=source_address)

IMHO LMTP needs to support the timeout parameter.

>>> import socket
>>> sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
>>> sock.settimeout(30)
>>> sock.gettimeout()
30.0
>>> b = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
>>> b.gettimeout()
>>>

Also AFAIK, Unix Socket also able to set a timeout which is used for LMTP protocol
If you agree, I would like to create an issue for this.

@vstinner
Copy link
Member

IMHO LMTP needs to support the timeout parameter.

If you think so, please open a separated issue. It's not directly related to https://bugs.python.org/issue39259

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

And if you don't make the requested changes, you will be put in the comfy chair!

@corona10 corona10 requested a review from vstinner January 14, 2020 01:46
Copy link
Member Author

@corona10 corona10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made the requested changes; please review again

@vstinner vstinner merged commit 62e3973 into python:master Jan 14, 2020
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants