Skip to content

Undeprecate typing.Callable and deprecate collections.abc.Callable #131040

@nathanielmanistaatgoogle

Description

Feature or enhancement

Proposal:

Callable doesn't seem to have much "idea overlap" with Collection - Callables don't deal with zero-or-more of a thing, or whether or not a thing appears among another population of things, or any of the other concerns that give conceptual coherence to Collection and the rest of the family (Set, Mapping, Sequence and so forth) in collections.abc.

Also old-issue-tracker issue 27598 seems to be the scope for the change that introduced Callable to collections.abc, but it doesn't give any insight into why Callable was included.

What might I be overlooking that would motivate a reason for Callable to "belong" in collections.abc?

If there's no particular reason for Callable to be in collections.abc, might typing.Callable be un-deprecated? And might collections.abc.Callable be deprecated?

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:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directorytopic-typingtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions