-
Notifications
You must be signed in to change notification settings - Fork 126
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
Can't load instances which define hook specs #19
Comments
This was referenced Sep 6, 2017
This was referenced Nov 24, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You currently can't instantiate a class which defines hook specs prior to loading
because
pluggy.varnames()
doesn't successfully detect and remove theself
name.I realize this is an odd usage (and implied to be illegal based on the argname to
add_hookspecs()
) but it is conceivable. A contrived example might be where a user wishes to define the spec and the default hook implementation using the same function:I guess it's kind of silly...
Either way the implementation of
pluggy.varnames
is quite outdated and should be changed to more properly levarage theinspect
module. If we prefer to not ever allow instances then a more explicit error should be thrown inPluginManager.add_hookspecs()
The text was updated successfully, but these errors were encountered: