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

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

Open
RonnyPfannschmidt opened this issue Aug 3, 2022 · 3 comments
Open

Comments

@RonnyPfannschmidt
Copy link
Member

RonnyPfannschmidt commented Aug 3, 2022

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)_

@nicoddemus
Copy link
Member

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

@RonnyPfannschmidt
Copy link
Member Author

@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

@nicoddemus
Copy link
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
Projects
None yet
Development

No branches or pull requests

2 participants