-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-70039: smtplib: store the server name in ._host in .connect() #115259
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
base: main
Are you sure you want to change the base?
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Original patch by gigaplastik, extended with a few more tests. Addresses: python#70039 BPO 25852
5d822a0 to
5ea81fc
Compare
|
The PR adds 6 tests in addition to the functional change. Most of them fail without the change:
The one that does not fail describes a situation that could sometimes also fail in practice before the change, see e.g. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926900. The test marked with '*' above is meant to ensure this failure case won't be accidentally reintroduced in potential future changes. |
|
Any chance of getting this reviewed and merged? This bug has been open since 2019 and is still causing issues. This PR is excellent. It fixes the issue and adds several tests. |
|
Hi all, I'd like to echo the above as this is still an issue (going back to 2015). Caused an issue this week (December 2025) due to AWS SES eu-west-2 applying strict parsing in TLS of the self._host string (which they rolled back, in part due to this client bug). Specifically, the SMTP("host:port") constructor was used and it failed to connect, as the connect() parsing currently does not update self._host, which is then used in starttls(). |
Misc/NEWS.d/next/Library/2024-02-10-21-25-22.gh-issue-70039.6wvcAP.rst
Outdated
Show resolved
Hide resolved
|
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 |
There are already other tests for the functionality, therefore there is no need to test implementation details.
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @bitdancer: please review the changes made to this pull request. |
|
There seem to be failing tests with this PR now. I have looked into them but fail to see what is needed to fix them. Please let me know if you know more. |
|
I think all you need to do is update to the tip of main. Let's try that, at least. |
Original patch by gigaplastik, extended with a few more tests.
Addresses: