Proposal: Use additional metadata class for plugins #23
Labels
No Label
🛃 types
👪 users
invalid
wontfix
🚀 announcement
🎒 backend
🐞 bug
🐋 docker
💡 enhancement
📺 frontend
🤔 question
🔗duplicate
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Flaschengeist/flaschengeist#23
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem:
Loading a plugin's entry point is done to fetch metadata, such as ID / version ...
But if the plugin requires additional packages, those have to be lazy imported.
E.g. auth_ldap is optional, so the ldap packages are also optional, but the
__init__.py
imports it -> fails, so lazy import would be needed.Proposed solution:
Add a metadata class just for, as the name implies, the meta data of a plugin.
Only information is provided and a class loader for the real plugin.
A sample implementation is provided here: Example implementation
Example new Plugin entry point: auth_ldap