Skip to content

register contextvars.Context to collections.abc.Mapping #126451

Closed
@tungol

Description

@tungol

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

Metadata

Metadata

Assignees

Labels

stdlibPython modules in the Lib dirtopic-typingtype-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions