Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement __subclasshook__() for Finders and Loaders in importlib.abc #63062

Open
ericsnowcurrently opened this issue Aug 28, 2013 · 5 comments
Labels
easy stdlib Python modules in the Lib dir topic-importlib type-feature A feature request or enhancement

Comments

@ericsnowcurrently
Copy link
Member

ericsnowcurrently commented Aug 28, 2013

BPO 18862
Nosy @ncoghlan, @ericsnowcurrently
Files
  • issue18862-importlib-abc-subclasshooks.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2013-08-28.03:10:36.721>
    labels = ['easy', 'type-feature', 'library']
    title = 'Implement __subclasshook__() for Finders and Loaders in importlib.abc'
    updated_at = <Date 2020-03-06.20:29:42.464>
    user = 'https://github.com/ericsnowcurrently'

    bugs.python.org fields:

    activity = <Date 2020-03-06.20:29:42.464>
    actor = 'brett.cannon'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2013-08-28.03:10:36.721>
    creator = 'eric.snow'
    dependencies = []
    files = ['31960']
    hgrepos = []
    issue_num = 18862
    keywords = ['patch', 'easy']
    message_count = 2.0
    messages = ['196346', '198982']
    nosy_count = 2.0
    nosy_names = ['ncoghlan', 'eric.snow']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue18862'
    versions = ['Python 3.4']

    Linked PRs

    @ericsnowcurrently
    Copy link
    Member Author

    It would be helpful to have __subclasshook__() implemented on the finders and loaders in importlib.abc, following the approach taken by ABCs in collections.abc. This came up relative to PEP-431, but would be generally useful (if only to a limited audience <wink>).

    @ericsnowcurrently ericsnowcurrently added stdlib Python modules in the Lib dir easy type-feature A feature request or enhancement labels Aug 28, 2013
    @ericsnowcurrently
    Copy link
    Member Author

    Here's a patch.

    @furkanonder
    Copy link
    Contributor

    @ericsnowcurrently I opened a PR by reading your patch. Since the patch is a bit old, I couldn't add the __subclasshook__ for some classs because I got the deprecation warnings.

    @ericsnowcurrently
    Copy link
    Member Author

    Thanks for doing that! I'll take a look when I get a chance.

    @brettcannon
    Copy link
    Member

    Is this worth doing today, or would it be better to do #82963 ?

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    easy stdlib Python modules in the Lib dir topic-importlib type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants