Skip to content

Class based plugins and entrypoints #357

Description

@chevignon93

This is not a bug report but more of a general question about pluggy.

I know there was talks a few years ago of changing the way entry_points are loaded but it hasn't been implemented.

As the developer of the host application, I can easily create a class that contains hook implementations (what the example from the documentation calls "A hook implementation namespace") and register it with the PluginManager but unless I'm missing something obvious, plugin authors can only define their hook implementations as functions (at least this is what all the examples I've seen seem to suggest).

So my question is, is there any plans of allowing/facilitating "Class based plugins" to be loaded via entry_points?

I "hacked" pluggy (just added a couple lines of code) to be able to do it for my program but maybe a solution from the developers could also be useful to others.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions