mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
typing.Mapping is not a protocol, which has caused problems in the past. (E.g. python/typeshed#3569, see also python/typeshed#3576.) This introduces a few narrow protocols to _typeshed.pyi that can be used in place of Mapping. Not all uses of Mapping can be replaced. For example, cgi.FieldStorage explictly checks whether the supplied headers argument is a Mapping instance.