Skip to content

deprecate passing classes as hookspecs, it shold be instances  #360

Open

Description

@RonnyPfannschmidt

we currently have self magic in place to handle unbound methods and passed in classes

ass signature (see #359) handles the bound methods so much better, we should ensure hook-specs are instances not types, and then generally handle them that way

followup to #359 (comment)_

Activity

  1. nicoddemus commented on Aug 3, 2022

    @nicoddemus
    Member

    Currently many hookspecs are actually modules... is the plan to force to move hookspec functions to methods of a class?

  2. RonnyPfannschmidt commented on Aug 3, 2022

    @RonnyPfannschmidt
    MemberAuthor

    @nicoddemus modules will still be allowed, but passing classes would be disallowed, instead they'd have to be instances (orf control of method vs bound method

    it may be permissible to allow types that don't take arguments

  3. nicoddemus commented on Aug 3, 2022

    @nicoddemus
    Member

    Currently we support modules, classes or instances, the plan is to support only modules or instances. Got it, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions