Skip to content
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

bpo-42756: Configure LMTP Unix-domain socket to use global default timeout when timeout not provided #23969

Merged
merged 10 commits into from Jan 1, 2021

Conversation

@rrhodes
Copy link
Contributor

@rrhodes rrhodes commented Dec 27, 2020

What?

  1. Configure LMTP Unix-domain socket to use socket global default timeout when a timeout is not explicitly provided.
  2. Removed unused "int_port" from the mock socket create_connection method.

Why?

To allow users to apply the default timeout without explicitly needing to pass in None.

https://bugs.python.org/issue42756

@rrhodes rrhodes requested a review from python/email-team as a code owner Dec 27, 2020
@rrhodes rrhodes force-pushed the rrhodes:fix-issue-42756 branch from bdba551 to 5097ec0 Dec 27, 2020
Lib/test/test_smtplib.py Outdated Show resolved Hide resolved
Lib/test/mock_socket.py Outdated Show resolved Hide resolved
Lib/test/mock_socket.py Outdated Show resolved Hide resolved
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Jan 1, 2021

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.

Lib/smtplib.py Outdated Show resolved Hide resolved
@corona10
Copy link
Member

@corona10 corona10 commented Jan 1, 2021

@vstinner Can you please take a look also?
This PR is following what socket.create_connection doing.

if timeout is not _GLOBAL_DEFAULT_TIMEOUT:

@rrhodes rrhodes requested review from corona10 and removed request for python/email-team Jan 1, 2021
@corona10 corona10 merged commit 3bf0532 into python:master Jan 1, 2021
11 checks passed
11 checks passed
Docs
Details
Check for source changes
Details
Check if generated files are up to date
Details
Windows (x86)
Details
Windows (x64)
Details
macOS
Details
Ubuntu
Details
Azure Pipelines PR #20210101.33 succeeded
Details
Travis CI - Pull Request Build Passed
Details
bedevere/issue-number Issue number 42756 found
Details
bedevere/news News entry found in Misc/NEWS.d
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jan 1, 2021

Thanks @rrhodes for the PR, and @corona10 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒🤖

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jan 1, 2021

Sorry @rrhodes and @corona10, I had trouble checking out the 3.9 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 3bf05327c2b25d42b92795d9d280288c22a0963d 3.9

@corona10
Copy link
Member

@corona10 corona10 commented Jan 1, 2021

@rrhodes Thank you for working on this!

@rrhodes rrhodes deleted the rrhodes:fix-issue-42756 branch Jan 1, 2021
corona10 added a commit to corona10/cpython that referenced this pull request Jan 1, 2021
…ult timeout when timeout not provided (pythonGH-23969)

(cherry picked from commit 3bf0532)

Co-authored-by: Ross <rrhodes@users.noreply.github.com>
@corona10
Copy link
Member

@corona10 corona10 commented Jan 1, 2021

@rrhodes Would you like to submit the backport patch for this?

@rrhodes
Copy link
Contributor Author

@rrhodes rrhodes commented Jan 1, 2021

@rrhodes Would you like to submit the backport patch for this?

Sure, first time backporting so bear with me please.

@corona10
Copy link
Member

@corona10 corona10 commented Jan 1, 2021

@rrhodes
Using the cherry-picker is the easy way

https://pypi.org/project/cherry-picker/#about

rrhodes added a commit to rrhodes/cpython that referenced this pull request Jan 1, 2021
…ult timeout when timeout not provided (pythonGH-23969)

(cherry picked from commit 3bf0532)

Co-authored-by: Ross <rrhodes@users.noreply.github.com>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Jan 1, 2021

GH-24050 is a backport of this pull request to the 3.9 branch.

corona10 pushed a commit that referenced this pull request Jan 2, 2021
…ult timeout when timeout not provided (GH-23969) (GH-24050)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.