]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-124872: Refine contextvars documentation (GH-124773) (#125233)
authorRichard Hansen <rhansen@rhansen.org>
Wed, 30 Oct 2024 20:48:02 +0000 (16:48 -0400)
committerGitHub <noreply@github.com>
Wed, 30 Oct 2024 20:48:02 +0000 (20:48 +0000)
commit2db2b5ea9cc689644bc7bc93f27a3e154228848a
treee6718667717746eda6bfaae21944b8c49f6db4c1
parent5f4218418bc8a7fda88adca509d828cd9dc6783a
[3.13] gh-124872: Refine contextvars documentation (GH-124773) (#125233)

[3.13] gh-124872: Refine contextvars documentation

  * Add definitions for "context", "current context", and "context
    management protocol".
  * Update related definitions to be consistent with the new
    definitions.
  * Restructure the documentation for the `contextvars.Context` class
    to prepare for adding context manager support, and for consistency
    with the definitions.
  * Use `testcode` and `testoutput` to test the `Context.run` example.

(cherry-picked from commit 99400930ac1d4e5e10a5ae30f8202d8bc2661e39)

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Doc/glossary.rst
Doc/library/contextvars.rst
Misc/NEWS.d/next/Documentation/2024-10-10-02-56-24.gh-issue-124872.0mDDOq.rst [new file with mode: 0644]