Doc: Clarify smtplib server reply bytes - #149970
savagemechanic wants to merge 1 commit into
Conversation
Documentation build overview
437 files changed ·
|
|
This PR is stale because it has been open for 90 days with no activity. |
bitdancer
left a comment
There was a problem hiding this comment.
Thanks for suggesting this.
What about docmd, connect, and sendmail?
| :class:`bytes` object. If the user address is valid, *code* is 250 and | ||
| *message* contains a full :rfc:`822` address (including human name). | ||
| Otherwise *code* is an SMTP error code of 400 or greater and *message* | ||
| contains the error response. |
There was a problem hiding this comment.
This is a good rewrite, but I think it would read better if we said "code is the response code from the server as an integer and message is..."
| and the accompanying error message sent by the server. | ||
| recipient that was refused. Each entry contains a ``(code, response)`` tuple, | ||
| where *code* is the SMTP error code and *response* is the accompanying server | ||
| error response as a :class:`bytes` object. |
There was a problem hiding this comment.
similarly here, "as an integer".
|
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 And if you don't make the requested changes, you will be put in the comfy chair! |
c740c99 to
8e57968
Compare
|
Thanks for the review. I rebased the change onto current
While checking the same response contract, I found two directly related stale docstrings and corrected them as well: I inspected the other reply-returning paths but left them unchanged where they do not make a conflicting type or return-shape claim; expanding those would be a broader consistency rewrite rather than part of this focused correction. 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. |
Docs-only change.
Clarifies that SMTP server reply messages returned by
smtplibAPIs arebytes, includingSMTP.verify()responses and refused-recipient entries fromSMTP.sendmail().Local check:
make -C Doc check SPHINXOPTS='-W --keep-going'