https://github.com/python/cpython/commit/fba6c1a842f96151e4e216ec042ac695252d160f
commit: fba6c1a842f96151e4e216ec042ac695252d160f
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-07-02T07:26:21Z
summary:

[3.13] gh-79964: Clarify the imaplib fetch example in the docs (GH-152780) 
(GH-152861)

A FETCH response may contain additional or unsolicited data, so the
message is not always data[0][1].
(cherry picked from commit 50ae0be74988564fb09746a49eb4b8f8e740f3c3)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

files:
M Doc/library/imaplib.rst

diff --git a/Doc/library/imaplib.rst b/Doc/library/imaplib.rst
index a71b4553c3d387..987abf4d1e3234 100644
--- a/Doc/library/imaplib.rst
+++ b/Doc/library/imaplib.rst
@@ -649,3 +649,10 @@ retrieves and prints all messages::
    M.close()
    M.logout()
 
+.. note::
+
+   A ``FETCH`` response may contain additional or unsolicited data
+   (see :rfc:`3501`, section 7.4.2),
+   so production code should inspect the whole response
+   rather than rely on ``data[0][1]``.
+

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to