Closed
Description
Feature or enhancement
Proposal:
contextvars.Context
is documented as implementing the collections.abc.Mapping interface. I believe we should register it to the abc, so an isinstance
check can work.
This is similar to #126417 .
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
A small amount of prior discussion occurred in an issue for typeshed: python/typeshed#12873
Linked PRs
- gh-126451: Register contextvars.Context to collections.abc.Mapping #126452
- [3.13] gh-126451: Register contextvars.Context to collections.abc.Mapping (GH-126452) #126518
- [3.12] gh-126451: Register contextvars.Context to collections.abc.Mapping (GH-126452) #126519
- [3.13] gh-126451: Revert backports of ABC registrations for
contextvars.Context
and multiprocessing proxies #126734 - [3.12] gh-126451: Revert backports of ABC registrations for contextvars.Context and multiprocessing proxies #126735