python-poetry / python-poetry/poetry

Proposal: allow plugins to hook pre-post commands

Open
#5,443 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/plugin-api kind/feature status/triage
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.