Skip to content

Commit 656e9f5

Browse files
author
Forest
committed
docs: imaplib: rephrase reference to MS Windows
1 parent 5682ef4 commit 656e9f5

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

Doc/library/imaplib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ An :class:`IMAP4` instance has the following methods:
373373

374374
.. warning::
375375

376-
Windows' :class:`IMAP4_stream` connections have no way to accurately
376+
On Windows, :class:`IMAP4_stream` connections have no way to accurately
377377
respect the *duration* or *interval* arguments, since Windows'
378378
``select()`` only works on sockets.
379379

Lib/imaplib.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -672,11 +672,11 @@ def idle(self, duration=None):
672672
EXISTS [b'1']
673673
RECENT [b'1']
674674
675-
Warning: Windows IMAP4_stream connections have no way to accurately
676-
respect 'duration', since Windows select() only works on sockets.
677-
However, if the server regularly sends status messages during IDLE,
678-
they will wake our selector and keep iteration from blocking for long.
679-
Dovecot's imap_idle_notify_interval is two minutes by default.
675+
Warning: On Windows, IMAP4_stream connections have no way to
676+
accurately respect 'duration', since Windows select() only works on
677+
sockets. However, if the server regularly sends status messages during
678+
IDLE, they will wake our selector and keep iteration from blocking for
679+
long. Dovecot's imap_idle_notify_interval is two minutes by default.
680680
Assuming that's typical of IMAP servers, subtracting it from the 29
681681
minutes needed to avoid server inactivity timeouts would make 27
682682
minutes a sensible value for 'duration' in this situation.
@@ -1576,11 +1576,12 @@ def burst(self, interval=0.1):
15761576
immediately without producing anything. Callers should consider
15771577
this if using it in a loop.
15781578
1579-
Warning: Windows IMAP4_stream connections have no way to accurately
1580-
respect the 'interval' argument, since Windows select() only works
1581-
on sockets. This will cause the generator to yield endless responses
1582-
and block indefinitely for each one. It is therefore advised not to
1583-
use burst() with an IMAP4_stream connection on Windows.
1579+
Warning: On Windows, IMAP4_stream connections have no way to
1580+
accurately respect the 'interval' argument, since Windows select()
1581+
only works on sockets. This will cause the generator to yield
1582+
endless responses and block indefinitely for each one. It is
1583+
therefore advised not to use burst() with an IMAP4_stream
1584+
connection on Windows.
15841585
"""
15851586
try:
15861587
yield next(self)

0 commit comments

Comments
 (0)