cpython/Doc/library
Forest 0fef47e5bb
gh-55454: Add IMAP4 IDLE support to imaplib (#122542)
* gh-55454: Add IMAP4 IDLE support to imaplib

This extends imaplib with support for the rfc2177 IMAP IDLE command,
as requested in #55454.  It allows events to be pushed to a client as
they occur, rather than having to continually poll for mailbox changes.

The interface is a new idle() method, which returns an iterable context
manager.  Entering the context starts IDLE mode, during which events
(untagged responses) can be retrieved using the iteration protocol.
Exiting the context sends DONE to the server, ending IDLE mode.

An optional time limit for the IDLE session is supported, for use with
servers that impose an inactivity timeout.

The context manager also offers a burst() method, designed for programs
wishing to process events in batch rather than one at a time.

Notable differences from other implementations:

- It's an extension to imaplib, rather than a replacement.
- It doesn't introduce additional threads.
- It doesn't impose new requirements on the use of imaplib's existing methods.
- It passes the unit tests in CPython's test/test_imaplib.py module
  (and adds new ones).
- It works on Windows, Linux, and other unix-like systems.
- It makes IDLE available on all of imaplib's client variants
  (including IMAP4_stream).
- The interface is pythonic and easy to use.

Caveats:

- Due to a Windows limitation, the special case of IMAP4_stream running
  on Windows lacks a duration/timeout feature. (This is the stdin/stdout
  pipe connection variant; timeouts work fine for socket-based
  connections, even on Windows.) I have documented it where appropriate.

- The file-like imaplib instance attributes are changed from buffered to
  unbuffered mode. This could potentially break any client code that
  uses those objects directly without expecting partial reads/writes.
  However, these attributes are undocumented. As such, I think (and
  PEP 8 confirms) that they are fair game for changes.
  https://peps.python.org/pep-0008/#public-and-internal-interfaces

Usage examples:

https://github.com/python/cpython/issues/55454#issuecomment-2227543041

Original discussion:

https://discuss.python.org/t/gauging-interest-in-my-imap4-idle-implementation-for-imaplib/59272

Earlier requests and suggestions:

https://github.com/python/cpython/issues/55454

https://mail.python.org/archives/list/python-ideas@python.org/thread/C4TVEYL5IBESQQPPS5GBR7WFBXCLQMZ2/

* gh-55454: Clarify imaplib idle() docs

- Add example idle response tuples, to make the minor difference from other
  imaplib response tuples more obvious.
- Merge the idle context manager's burst() method docs with the IMAP
  object's idle() method docs, for easier understanding.
- Upgrade the Windows note regarding lack of pipe timeouts to a warning.
- Rephrase various things for clarity.

* docs: words instead of <=

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* docs: improve style in an example

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* docs: grammatical edit

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* docs consistency

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* comment -> docstring

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* docs: refer to imaplib as "this module"

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* imaplib: simplify & clarify idle debug message

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* imaplib: elaborate in idle context manager comment

* imaplib: re-raise BaseException instead of bare except

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* imaplib: convert private doc string to comment

* docs: correct mistake in imaplib example

This is a correction to 8077f2eab2, which
changed a variable name in only one place and broke the subsequent
reference to it, departed from the naming convention used in the rest of
the module, and shadowed the type() builtin along the way.

* imaplib: simplify example code in doc string

This is for consistency with the documentation change in 8077f2eab2
and subsequent correction in 013bbf18fc.

* imaplib: rename _Idler to Idler, update its docs

* imaplib: add comment in Idler._pop()

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* imaplib: remove unnecessary blank line

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* imaplib: comment on use of unbuffered pipes

* docs: imaplib: use the reStructuredText :class: role

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* Revert "docs: imaplib: use the reStructuredText :class: role"

This reverts commit f385e441df, because it
triggers CI failures in the docs by referencing a class that is
(deliberately) undocumented.

* docs: imaplib: use the reST :class: role, escaped

This is a different approach to f385e441df, which was reverted for
creating dangling link references.

By prefixing the reStructuredText role target with a ! we disable
conversion to a link, thereby passing continuous integration checks
even though the referenced class is deliberately absent from the
documentation.

* docs: refer to IMAP4 IDLE instead of just IDLE

This clarifies that we are referring to the email protocol, not the editor with the same name.

Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>

* imaplib: IDLE -> IMAP4 IDLE in exception message

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* docs: imaplib idle() phrasing and linking tweaks

* docs: imaplib: avoid linking to an invalid target

This reverts and rephrases part of a3f21cd75b
which created links to a method on a deliberately undocumented class.
The links didn't work consistently, and caused sphinx warnings that
broke cpython's continuous integration tests.

* imaplib: update test after recent exception change

This fixes a test that was broken by changing an exception in
b01de95171

* imaplib: rename idle() dur argument to duration

* imaplib: bytes.index() -> bytes.find()

This makes it more obvious which statement triggers the branch.

* imaplib: remove no-longer-necessary statement

Co-authored-by: Martin Panter <vadmium@users.noreply.github.com>

* docs: imaplib: concise & valid method links

The burst() method is a little tricky to link in restructuredText, due
to quirks of its parent class.  This syntax allows sphinx to generate
working links without generating warnings (which break continuous
integration) and without burdening the reader with unimportant namespace
qualifications.  It makes the reST source ugly, but few people read
the reST source, so it's a tolerable tradeoff.

* imaplib: note data types present in IDLE responses

* docs: imaplib: add comma to reST changes header

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* imaplib: sync doc strings with reST docs

* docs: imaplib: minor Idler clarifications

* imaplib: idle: emit (type, [data, ...]) tuples

This allows our iterator to emit untagged responses that contain literal
strings in the same way that imaplib's existing methods do, while still
emitting exactly one whole response per iteration.

* imaplib: while/yield instead of yield from iter()

* imaplib: idle: use deadline idiom when iterating

This simplifies the code, and avoids idle duration drift from time spent
processing each iteration.

* docs: imaplib: state duration/interval arg types

* docs: imaplib: minor rephrasing of a sentence

* docs: imaplib: reposition a paragraph

This might improve readability, especially when encountering Idler.burst()
for the first time.

* docs: imaplib: wrap long lines in idle() section

* docs: imaplib: note: Idler objects require 'with'

* docs: imaplib: say that 29 minutes is 1740 seconds

* docs: imaplib: mark a paragraph as a 'tip'

* docs: imaplib: rephrase reference to MS Windows

* imaplib: end doc string titles with a period

* imaplib: idle: socket timeouts instead of select()

IDLE timeouts were originally implemented using select() after
checking for the presence of already-buffered data.
That allowed timeouts on pipe connetions like IMAP4_stream.
However, it seemed possible that SSL data arriving without any
IMAP data afterward could cause select() to indicate available
application data when there was none, leading to a read() call
that would block with no timeout. It was unclear under what
conditions this would happen in practice. This change switches
to socket timeouts instead of select(), just to be safe.

This also reverts IMAP4_stream changes that were made to support IDLE
timeouts, since our new implementation only supports socket connections.

* imaplib: Idler: rename private state attributes

* imaplib: rephrase a comment in example code

* docs: imaplib: idle: use Sphinx code-block:: pycon

* docs: whatsnew: imaplib: reformat IMAP4.idle entry

* imaplib: idle: make doc strings brief

Since we generally rely on the reST/html documentation for details, we
can keep these doc strings short. This matches the module's existing doc
string style and avoids having to sync small changes between two files.

* imaplib: Idler: split assert into two statements

* imaplib: Idler: move assignment out of try: block

* imaplib: Idler: move __exit__() for readability

* imaplib: Idler: move __next__() for readability

* imaplib: test: make IdleCmdHandler a global class

* docs: imaplib: idle: collapse double-spaces

* imaplib: warn on use of undocumented 'file' attr

* imaplib: revert import reformatting

Since we no longer import platform or selectors, the original import
statement style can be restored, reducing the footprint of PR #122542.

* imaplib: restore original exception msg formatting

This reduces the footprint of PR #122542.

* docs: imaplib: idle: versionadded:: next

* imaplib: move import statement to where it's used

This import is only needed if external code tries to use an attribute
that it shouldn't be using. Making it a local import reduces module
loading time in supported cases.

* imaplib test: RuntimeWarning on IMAP4.file access

* imaplib: use stacklevel=2 in warnings.warn()

* imaplib test: simplify IMAP4.file warning test

* imaplib test: pre-idle-continuation response

* imaplib test: post-done untagged response

* imaplib: downgrade idle-denied exception to error

This makes it easier for client code to distinguish a temporary
rejection of the IDLE command from a server responding incorrectly to
IDLE.

* imaplib: simplify check for socket object

* imaplib: narrow the scope of IDLE socket timeouts

If an IDLE duration or burst() was in use, and an unsolicited response
contained a literal string, and crossed a packet boundary, and the
subsequent packet was delayed beyond the IDLE feature's time limit, the
timeout would leave the incoming protocol stream in a bad state (with
the tail of that response appearing where the start of a response is
expected).

This change moves the IDLE socket timeout to cover only the start
of a response, so it can no longer cause that problem.

* imaplib: preserve partial reads on exception

This ensures that short IDLE durations / burst() intervals
won't risk corrupting response lines that span multiple packets.

* imaplib: read/readline: save multipart buffer tail

For resilience if read() or readline() ever complete with more than one
bytes object remaining in the buffer. This is not expected to happen,
but it seems wise to be prepared for a future change making it possible.

* imaplib: use TimeoutError subclass only if needed

* doc: imaplib: elaborate on IDLE response delivery

* doc: imaplib: elaborate in note re: IMAP4.response

* imaplib: comment on benefit of reading in chunks

Our read() implementation designed to support IDLE replaces the one from
PR #119514, fixing the same problem it was addressing. The tests that it
added are preserved.

* imaplib: readline(): treat ConnectionError as EOF

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Guido van Rossum <guido@python.org>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Martin Panter <vadmium@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-02-06 19:15:11 -08:00
..
__future__.rst gh-125168: Fix typo in __future__.rst (#125183) 2024-10-09 16:17:18 +03:00
__main__.rst gh-128720: Fix doc inacurracy about __main__.__file__ existence in the REPL (#128721) 2025-01-21 19:52:21 +00:00
_thread.rst gh-125541: Make Ctrl-C interrupt threading.Lock.acquire() on Windows (#125546) 2024-10-17 20:10:55 +02:00
abc.rst gh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs (#124480) 2024-09-25 19:29:58 +00:00
aifc.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
allos.rst gh-126180: Remove getopt and optparse deprecation notices (GH-126227) 2024-12-23 14:17:19 +10:00
annotationlib.rst gh-119180: Add VALUE_WITH_FAKE_GLOBALS format to annotationlib (#124415) 2024-11-26 15:40:13 +00:00
archiving.rst
argparse.rst gh-126180: Remove getopt and optparse deprecation notices (GH-126227) 2024-12-23 14:17:19 +10:00
array.rst gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
ast.rst Clarify ast docs to use a less confusing example for ast.ParamSpec (#127955) 2024-12-15 12:28:43 +00:00
asynchat.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
asyncio-api-index.rst
asyncio-dev.rst gh-124694: Add concurrent.futures.InterpreterPoolExecutor (gh-124548) 2024-10-16 16:50:46 -06:00
asyncio-eventloop.rst gh-128308: pass **kwargs to asyncio task_factory (#128768) 2025-01-20 22:23:55 +05:30
asyncio-exceptions.rst
asyncio-extending.rst
asyncio-future.rst Docs: spelling and grammar fixes (#122084) 2024-07-22 09:14:25 +08:00
asyncio-graph.rst gh-91048: Improve example in asyncio-graph.rst doc (#129224) 2025-01-23 23:38:51 +05:30
asyncio-llapi-index.rst gh-124694: Add concurrent.futures.InterpreterPoolExecutor (gh-124548) 2024-10-16 16:50:46 -06:00
asyncio-platforms.rst GH-120804: add docs for removal for asyncio child watchers (#120895) 2024-06-23 13:14:12 +00:00
asyncio-policy.rst Python 3.14.0a4 2025-01-14 13:52:58 +02:00
asyncio-protocol.rst
asyncio-queue.rst gh-124433: fix docs for asyncio.Queue.task_done (#128669) 2025-01-09 17:50:12 +05:30
asyncio-runner.rst gh-127949: make deprecation of policy system more prominent (#128290) 2024-12-27 15:13:41 +00:00
asyncio-stream.rst gh-126896: Fix docs about asyncio.start_server() (#126897) 2024-11-17 11:32:35 -08:00
asyncio-subprocess.rst GH-120804: add docs for removal for asyncio child watchers (#120895) 2024-06-23 13:14:12 +00:00
asyncio-sync.rst Link to correct class methods in asyncio primitives docs (#127270) 2024-11-29 16:20:40 +00:00
asyncio-task.rst expand the asyncio.run_coroutine_threadsafe recipes (#127576) 2024-12-29 11:52:29 +05:30
asyncio.rst GH-91048: Add utils for capturing async call stack for asyncio programs and enable profiling (#124640) 2025-01-22 17:25:29 +01:00
asyncore.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
atexit.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
audioop.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
audit_events.rst
base64.rst Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409) 2024-05-24 00:11:45 +02:00
bdb.rst Format None, True, False and NotImplemented as literals (GH-118758) 2024-05-08 22:35:16 +03:00
binary.rst
binascii.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
bisect.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
builtins.rst gh-99030: Added documentation links for types and exceptions (GH-123857) 2024-10-20 17:36:27 -07:00
bz2.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
calendar.rst Python 3.14.0a4 2025-01-14 13:52:58 +02:00
cgi.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
cgitb.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
chunk.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
cmath.rst gh-69639: Add mixed-mode rules for complex arithmetic (C-like) (GH-124829) 2024-11-26 17:57:39 +02:00
cmd.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
cmdline.rst gh-123834: Add symtable to the list of modules with a CLI (#123835) 2024-09-09 13:45:43 +02:00
cmdlinelibs.rst gh-126180: Remove getopt and optparse deprecation notices (GH-126227) 2024-12-23 14:17:19 +10:00
code.rst gh-74929: PEP 667 general docs update (gh-119201) 2024-05-21 03:32:15 +00:00
codecs.rst gh-123803: Support arbitrary code page encodings on Windows (GH-123804) 2024-11-18 17:45:25 +00:00
codeop.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
collections.abc.rst gh-114990: Add missing mixin methods in collections.abc's document (GH-114991) 2024-10-30 13:17:20 -07:00
collections.rst gh-101100: Fix Sphinx warnings about list methods (#127054) 2024-12-02 15:51:35 +02:00
colorsys.rst gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
compileall.rst gh-123492: Remove unnecessary :func: parentheses (#123493) 2024-08-30 14:34:09 +03:00
concurrency.rst
concurrent.futures.rst Doc: Typo fix: nrace -> race (#127288) 2024-11-26 15:05:07 +02:00
concurrent.rst
configparser.rst gh-125436: Doc: Add missing `allow_unnamed_section parameter to ConfigParser` documentation (#125437) 2024-11-05 02:58:15 +00:00
constants.rst gh-103066: Add links and help in site.py constants (#103777) 2024-09-06 10:29:28 +03:00
contextlib.rst Fix indentation for contextlib.asynccontextmanager docs (#127333) 2024-11-27 06:38:55 -08:00
contextvars.rst gh-124872: Refine contextvars documentation (#124773) 2024-10-09 16:44:03 -07:00
copy.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
copyreg.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
crypt.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
crypto.rst
csv.rst Format None, True, False and NotImplemented as literals (GH-118758) 2024-05-08 22:35:16 +03:00
ctypes.rst gh-128156: Guard use of ffi_type_complex_double on macOS system libffi (GH-128680) 2025-01-21 10:59:18 +01:00
curses.ascii.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
curses.panel.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
curses.rst gh-116622: Complete Android documentation (#124259) 2024-09-23 23:09:53 +00:00
custominterp.rst
dataclasses.rst gh-118974: Add decorator argument to make_dataclass (gh-122723) 2024-10-01 09:51:51 -04:00
datatypes.rst
datetime.rst Use roles :data: and :const: for referencing module variables (GH-129507) 2025-02-04 16:16:41 +02:00
dbm.rst gh-116622: Complete Android documentation (#124259) 2024-09-23 23:09:53 +00:00
debug.rst
decimal.rst Use roles :data: and :const: for referencing module variables (GH-129507) 2025-02-04 16:16:41 +02:00
development.rst
devmode.rst
dialog.rst
difflib.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
dis.rst Revert "GH-128914: Remove conditional stack effects from bytecodes.c and the code generators (GH-128918)" (GH-129202) 2025-01-23 09:26:25 +00:00
distribution.rst
distutils.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
doctest.rst gh-127221: Add colour to unittest output (#127223) 2024-12-05 21:10:46 +02:00
email.charset.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
email.compat32-message.rst gh-123517: Remove unnecessary `:meth:` parentheses (#123518) 2024-09-01 05:59:42 +01:00
email.contentmanager.rst gh-121542: Document trailing newline behavior in set_content() (#121543) 2025-01-18 20:34:40 +02:00
email.encoders.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
email.errors.rst gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) 2024-07-31 00:19:48 +02:00
email.examples.rst
email.generator.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
email.header.rst gh-120276: Fix incorrect email.header.Header maxlinelen default (GH-120277) 2024-06-08 20:18:58 +03:00
email.headerregistry.rst gh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs (#124480) 2024-09-25 19:29:58 +00:00
email.iterators.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
email.message.rst gh-123517: Remove unnecessary `:meth:` parentheses (#123518) 2024-09-01 05:59:42 +01:00
email.mime.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
email.parser.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
email.policy.rst Docs: fix MessageDefect references in email.policy docs (#128468) 2025-01-05 22:58:31 +01:00
email.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
email.utils.rst gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
ensurepip.rst gh-116622: Complete Android documentation (#124259) 2024-09-23 23:09:53 +00:00
enum.rst gh-112328: Make EnumDict usable on its own and document it (GH-123669) 2024-12-20 11:40:58 -08:00
errno.rst gh-85046: Document errno constants (#126420) 2025-01-28 01:12:45 +01:00
exceptions.rst gh-129407: Clarify that a SystemError isn't always CPython's fault (#129410) 2025-02-03 12:46:13 +01:00
faulthandler.rst Python 3.14.0a4 2025-01-14 13:52:58 +02:00
fcntl.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
filecmp.rst Use roles :data: and :const: for referencing module variables (GH-129507) 2025-02-04 16:16:41 +02:00
fileformats.rst
fileinput.rst gh-120345: Fix incorrect use of the :class: role with the "()" suffix (GH-120347) 2024-06-12 17:23:03 +03:00
filesys.rst gh-126180: Remove getopt and optparse deprecation notices (GH-126227) 2024-12-23 14:17:19 +10:00
fnmatch.rst gh-123345: improve fnmatch docs (#123346) 2025-01-13 11:21:22 +01:00
fractions.rst gh-121797: Add class method Fraction.from_number() (GH-121800) 2024-10-14 07:54:59 +00:00
frameworks.rst
ftplib.rst gh-120823: Fix doc for ftplib.FTP.retrbinary() (GH-121697) 2024-07-13 16:16:26 +02:00
functional.rst
functions.rst gh-119793: Add optional length-checking to map() (GH-120471) 2024-11-04 15:00:19 +01:00
functools.rst gh-128650: Fix incorrect statement in partial documentation (gh-128651) 2025-01-09 13:32:00 -06:00
gc.rst GH-127010: Don't lazily track and untrack dicts (GH-127027) 2024-11-20 16:41:20 +00:00
getopt.rst gh-126180: Remove getopt and optparse deprecation notices (GH-126227) 2024-12-23 14:17:19 +10:00
getpass.rst gh-123492: Remove unnecessary :func: parentheses (#123493) 2024-08-30 14:34:09 +03:00
gettext.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
glob.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
graphlib.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
grp.rst gh-116622: Complete Android documentation (#124259) 2024-09-23 23:09:53 +00:00
gzip.rst gh-125260: Change the default `gzip.compress()` mtime to 0 (#125261) 2024-10-12 18:18:48 +01:00
hashlib-blake2-tree.png
hashlib.rst GH-103484: Fix permanently redirects reported by linkcheck (GH-124144) 2024-09-17 02:53:38 +00:00
heapq.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
hmac.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
html.entities.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
html.parser.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
html.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
http.client.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
http.cookiejar.rst GH-103484: Fix permanently redirects reported by linkcheck (GH-124144) 2024-09-17 02:53:38 +00:00
http.cookies.rst gh-112713 : Add support for 'partitioned' attribute in http.cookies (GH-112714) 2025-01-24 22:31:52 +00:00
http.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
http.server.rst gh-123517: Remove unnecessary `:meth:` parentheses (#123518) 2024-09-01 05:59:42 +01:00
i18n.rst
idle.rst Docs: fix typos in documentation (#118752) 2024-05-08 12:20:40 -06:00
imaplib.rst gh-55454: Add IMAP4 IDLE support to imaplib (#122542) 2025-02-06 19:15:11 -08:00
imghdr.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
imp.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
importlib.metadata.rst Use roles :data: and :const: for referencing module variables (GH-129507) 2025-02-04 16:16:41 +02:00
importlib.resources.abc.rst gh-97850: Remove the mention of removal from ResourceReader docs (#128602) 2025-01-08 18:38:02 -05:00
importlib.resources.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
importlib.rst Use roles :data: and :const: for referencing module variables (GH-129507) 2025-02-04 16:16:41 +02:00
index.rst gh-126180: Remove getopt and optparse deprecation notices (GH-126227) 2024-12-23 14:17:19 +10:00
inspect.rst GH-91048: Add utils for capturing async call stack for asyncio programs and enable profiling (#124640) 2025-01-22 17:25:29 +01:00
internet.rst
intro.rst gh-116622: Complete Android documentation (#124259) 2024-09-23 23:09:53 +00:00
io.rst gh-109523: Raise a BlockingIOError if reading text from a non-blocking stream cannot immediately return bytes. (GH-122933) 2024-12-02 14:18:30 +01:00
ipaddress.rst gh-118710: Make IPv*Address.version & max_prefixlen available on the class (GH-120698) 2024-09-04 15:51:12 +02:00
ipc.rst
itertools.rst Add multinomial to the itertools recipes docs (gh-129760) 2025-02-06 18:35:55 -06:00
json.rst gh-87506: Amend json.loads() post PR #127355 (#128609) 2025-01-08 09:36:44 +01:00
kde_example.png
keyword.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
language.rst
linecache.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
locale.rst gh-126727: Fix locale.nl_langinfo(locale.ERA) (GH-126730) 2024-11-21 13:16:08 +02:00
logging.config.rst gh-124653: Relax (again) detection of queue API for logging handlers (GH-124897) 2024-10-07 19:42:19 +01:00
logging.handlers.rst gh-126400: Add TCP socket timeout to SysLogHandler to prevent blocking (GH-126716) 2025-01-29 19:37:43 +00:00
logging.rst Use roles :data: and :const: for referencing module variables (GH-129507) 2025-02-04 16:16:41 +02:00
lzma.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
mailbox.rst Docs: spelling and grammar fixes (#122084) 2024-07-22 09:14:25 +08:00
mailcap.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
markup.rst
marshal.rst Python 3.14.0a2 2024-11-19 16:52:44 +02:00
math.rst gh-126719: Clarify math.fmod docs (#127741) 2025-01-04 18:38:57 +01:00
mimetypes.rst gh-111637: Clarify MIME type recognition behavior in mimetypes documentation (GH-129546) 2025-02-03 16:42:12 +00:00
mm.rst
mmap.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
modulefinder.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
modules.rst
msilib.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
msvcrt.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
multiprocessing.rst Fix a few typos found in the docs (GH-127126) 2024-11-22 16:02:51 -08:00
multiprocessing.shared_memory.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
netdata.rst
netrc.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
nis.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
nntplib.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
numbers.rst docs: fix a few typos identified by codespell (#119516) 2024-05-25 18:13:31 -07:00
numeric.rst
operator.rst gh-115808: Add `is_none and is_not_none to operator` (#115814) 2024-08-10 20:16:34 +01:00
optparse.rst gh-126180: Remove getopt and optparse deprecation notices (GH-126227) 2024-12-23 14:17:19 +10:00
os.path.rst Doc: Improve wording of `os.path.commonpath()` (#122627) 2024-08-03 11:18:59 +00:00
os.rst gh-129205: Add os.readinto() API for reading data into a caller provided buffer (#129211) 2025-01-26 14:21:03 +01:00
ossaudiodev.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
pathlib-inheritance.png
pathlib-inheritance.svg
pathlib.rst GH-125413: Revert addition of pathlib.Path.scandir() method (#127377) 2024-12-05 21:39:43 +00:00
pdb.rst gh-128409: Document that pdb.post_mortem() accepts exceptions (#128410) 2025-01-10 10:54:45 -05:00
persistence.rst
pickle.rst gh-118830: Bump pickle.DEFAULT_PROTOCOL to 5 (GH-119340) 2024-07-19 16:47:10 +02:00
pickletools.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
pipes.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
pkgutil.rst gh-97850: remove `find_loader and get_loader from pkgutil` (#119656) 2024-11-01 18:35:22 +02:00
platform.rst gh-122549: Add platform.invalidate_caches() (#122547) 2024-11-15 13:52:56 +00:00
plistlib.rst Use roles :data: and :const: for referencing module variables (GH-129507) 2025-02-04 16:16:41 +02:00
poplib.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
posix.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
pprint.rst gh-126731: Update outdated project information in pprint.pp doc (#126732) 2024-11-13 20:58:06 -08:00
profile.rst gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
pty.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
pwd.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
py_compile.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
pyclbr.rst Format None, True, False and NotImplemented as literals (GH-118758) 2024-05-08 22:35:16 +03:00
pydoc.rst Doc: Note that pydoc uses and prefers `MANPAGER` (#125362) 2024-10-29 23:12:02 +00:00
pyexpat.rst Python 3.14.0a4 2025-01-14 13:52:58 +02:00
python.rst gh-119180: Documentation for PEP 649 and 749 (#122235) 2024-09-11 07:49:59 -07:00
queue.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
quopri.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
random.rst gh-123968: fix -f/--float command line option description (#124517) 2024-09-25 09:47:45 -07:00
re.rst Python 3.14.0a4 2025-01-14 13:52:58 +02:00
readline.rst gh-116622: Complete Android documentation (#124259) 2024-09-23 23:09:53 +00:00
removed.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
reprlib.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
resource.rst gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
rlcompleter.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
runpy.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
sched.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
secrets.rst gh-123789: secrets.randbits returns only non-negative int (#123801) 2024-09-07 21:17:59 -07:00
security_warnings.rst
select.rst Use roles :data: and :const: for referencing module variables (GH-129507) 2025-02-04 16:16:41 +02:00
selectors.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
shelve.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
shlex.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
shutil.rst gh-81340: Use copy_file_range in shutil.copyfile copy functions (GH-93152) 2025-02-03 10:23:27 +00:00
signal.rst gh-123014: Disable pidfd API on older Android versions (#124458) 2024-09-25 16:23:30 +02:00
site.rst Use roles :data: and :const: for referencing module variables (GH-129507) 2025-02-04 16:16:41 +02:00
smtpd.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
smtplib.rst gh-120662: Improve smtplib example (#120668) 2024-06-18 13:56:58 +02:00
sndhdr.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
socket.rst Remove an inaccurate note from socket.recv (GH-129733) 2025-02-06 16:39:37 +00:00
socketserver.rst gh-112020: Rework socketserver examples to be correct (#129741) 2025-02-06 09:42:47 -08:00
spwd.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
sqlite3.rst gh-126259: Fix "unclosed database" warning in sqlite3 doctest (#126260) 2024-11-01 08:17:05 +01:00
ssl.rst Use roles :data: and :const: for referencing module variables (GH-129507) 2025-02-04 16:16:41 +02:00
stat.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
statistics.rst gh-121977: Add tips for handling unhashable data (#122075) 2024-07-21 05:53:26 +00:00
stdtypes.rst gh-129559: Add bytearray.resize() (GH-129560) 2025-02-05 11:33:17 -08:00
string.rst gh-67206: Document that string.printable is not printable in the POSIX sense (#128820) 2025-01-14 17:07:37 +01:00
stringprep.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
struct.rst gh-121249: Support _Complex types in the struct module (#121613) 2024-10-07 13:53:02 +02:00
subprocess.rst gh-116622: Complete Android documentation (#124259) 2024-09-23 23:09:53 +00:00
sunau.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
superseded.rst gh-126180: Remove getopt and optparse deprecation notices (GH-126227) 2024-12-23 14:17:19 +10:00
symtable.rst Python 3.14.0a1 2024-10-15 22:34:54 +03:00
sys.monitoring.rst GH-122548: Implement branch taken and not taken events for sys.monitoring (GH-122564) 2024-12-19 16:59:51 +00:00
sys.rst gh-128509: Add sys._is_immortal for identifying immortal objects (#128510) 2025-01-31 15:27:08 +00:00
sys_path_init.rst GH-126985: move pyvenv.cfg detection from site to getpath (#126987) 2024-11-26 13:46:33 +00:00
sysconfig.rst gh-128696: Add arm64 to the get_platform return val description (#128701) 2025-01-11 01:03:12 +00:00
syslog.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
tabnanny.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
tarfile.rst gh-123492: Remove unnecessary :func: parentheses (#123493) 2024-08-30 14:34:09 +03:00
telnetlib.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
tempfile.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
termios.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
test.rst gh-127933: Add option to run regression tests in parallel (gh-128003) 2025-02-04 17:44:59 -05:00
text.rst
textwrap.rst docs: fix a few typos identified by codespell (#119516) 2024-05-25 18:13:31 -07:00
threading.rst gh-59705: Document OS thread name change (#128800) 2025-01-14 16:31:13 +01:00
time.rst gh-125997: suggest efficient alternatives for time.sleep(0) (#128752) 2025-01-18 12:02:43 +01:00
timeit.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
tk.rst
tk_msg.png
tkinter.colorchooser.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
tkinter.dnd.rst Format None, True, False and NotImplemented as literals (GH-118758) 2024-05-08 22:35:16 +03:00
tkinter.font.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
tkinter.messagebox.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
tkinter.rst GH-103484: Fix permanently redirects reported by linkcheck (GH-124144) 2024-09-17 02:53:38 +00:00
tkinter.scrolledtext.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
tkinter.ttk.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
token-list.inc
token.rst gh-127303: Add docs for token.EXACT_TOKEN_TYPES (#127304) 2024-11-29 04:00:50 -05:00
tokenize.rst gh-129020: Remove ambiguous sentence from tokenize.untokenize docs (#129021) 2025-01-20 00:05:22 +00:00
tomllib.rst Python 3.14.0a2 2024-11-19 16:52:44 +02:00
trace.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
traceback.rst Fix typo in traceback docs (#127884) 2024-12-12 21:43:44 +00:00
tracemalloc.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
tty.rst Format None, True, False and NotImplemented as literals (GH-118758) 2024-05-08 22:35:16 +03:00
tulip_coro.dia
tulip_coro.png
turtle-star.pdf
turtle-star.png
turtle-star.ps
turtle.rst gh-126349: Add 'fill', 'poly', and 'no_animation' context managers to turtle (#126350) 2025-01-18 11:27:22 +01:00
types.rst gh-101100: Consolidate documentation on ModuleType attributes (#124709) 2024-10-09 10:53:57 +00:00
typing.rst gh-126543: Docs: change "bound type var" to "bounded" when used in the context of the 'bound' kw argument to TypeVar (#126584) 2024-11-10 16:40:25 -08:00
unicodedata.rst closes gh-124016: update Unicode to 16.0.0 (#124017) 2024-09-13 07:47:04 -07:00
unittest.mock-examples.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
unittest.mock.rst gh-101100: Fix Sphinx warnings in library/unittest.mock.rst (#124106) 2024-10-09 17:02:18 +03:00
unittest.rst Python 3.14.0a4 2025-01-14 13:52:58 +02:00
unix.rst
urllib.error.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
urllib.parse.rst Added a warning to the urljoin docs, indicating that it is not safe to use with attacker controlled URLs (GH-126659) 2024-11-15 18:09:05 -05:00
urllib.request.rst gh-128192: support HTTP sha-256 digest authentication as per RFC-7617 (GH-128193) 2024-12-28 21:05:34 +00:00
urllib.robotparser.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
urllib.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
uu.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
uuid.rst gh-128427: Add uuid.NIL and uuid.MAX (#128429) 2025-01-27 18:17:17 +02:00
venv.rst GH-126985: move pyvenv.cfg detection from site to getpath (#126987) 2024-11-26 13:46:33 +00:00
warnings.rst gh-125761: Clarify repeated warning suppression criteria in warnings module (gh-126326) 2024-11-02 21:37:26 +10:00
wave.rst gh-123517: Remove unnecessary `:meth:` parentheses (#123518) 2024-09-01 05:59:42 +01:00
weakref.rst Docs: Standardise versionchanged text in weakref.rst (#122898) 2024-08-11 21:40:11 +01:00
webbrowser.rst gh-116622: Complete Android documentation (#124259) 2024-09-23 23:09:53 +00:00
windows.rst
winreg.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
winsound.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
wsgiref.rst Use pep role instead of url (#121611) 2024-09-17 16:02:14 +03:00
xdrlib.rst Docs: re-create pages for removed modules to document their removal. (#126622) 2024-11-11 17:49:48 -05:00
xml.dom.minidom.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
xml.dom.pulldom.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
xml.dom.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
xml.etree.elementtree.rst Fix typo in XMLParser doc (#124129) 2024-09-20 12:42:44 +02:00
xml.rst Docs: add link roles with Sphinx extlinks (#117850) 2024-04-15 21:22:00 +03:00
xml.sax.handler.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
xml.sax.reader.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
xml.sax.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
xml.sax.utils.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
xmlrpc.client.rst Docs: Fix indents in xmlrpc.client.rst (#127782) 2024-12-10 19:35:00 +02:00
xmlrpc.rst gh-101100: Fix sphinx warnings in whatsnew/3.0.rst (#127662) 2024-12-10 12:22:37 +02:00
xmlrpc.server.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
zipapp.rst gh-123492: Remove unnecessary :func: parentheses (#123493) 2024-08-30 14:34:09 +03:00
zipfile.rst gh-123424: add ZipInfo._for_archive to set suitable default properties (#123429) 2024-12-29 18:30:53 +00:00
zipimport.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
zlib.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00
zoneinfo.rst docs: module page titles should not start with a link to themselves (#117099) 2024-05-08 20:34:40 +01:00