gh-124872: Refine contextvars documentation (#124773)
* 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.
* Expand the documentation for the `Py_CONTEXT_EVENT_ENTER` and
`Py_CONTEXT_EVENT_EXIT` events to clarify and to prepare for
planned changes. R
Richard Hansen committed
99400930ac1d4e5e10a5ae30f8202d8bc2661e39
Parent: 9429163
Committed by GitHub <noreply@github.com>
on 10/9/2024, 11:44:03 PM