python-poetry / python-poetry/poetry
Proposal: allow plugins to hook pre-post commands
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
Feature Request
I got the idea for more "advanced" plugins. From what I have seen, right now plugins are run no matter what they do, or what process they are part of. My idea would be to allow plugins to expose in some way that they are only involved in a specific part of a process and for those not to be run when unnecessary. For example, I only want my plugin to do something pre- or post- package building. That way, with a significant number of plugins, there would be less chance of poetry having a long startup because of running all the installed plugins and it would be easier to integrate with poetry built-in commands.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by locating Poetry's plugin loading and package-building command entry points, then determine how pre- and post-command hooks would be represented and selected. Done means the proposal has a defined plugin interface, lifecycle behavior, and tests for running hooks only for relevant commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100