python-poetry / python-poetry/poetry
Mechanism to reinstall (editable) dependencies to trigger metadata re-build
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
- Poetry version: 1.2.1
- Python version: 3.8.10
- OS version and name: Ubuntu 21.04
- I am on the latest stable Poetry version, installed using a recommended method.
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have consulted the FAQ and blog for any relevant entries or release notes.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption) and have included the output below.
Issue
When developing a project distributed over many repos that is connected by entrypoint plugins, consider that repo B depends on repo A, and thus contains:
repo-a = { path = "../repo-a/", develop = true }
Sometimes I need to change some entrypoints in repo-a.
For poetry to pick up the changes, I run poetry update repo-a (of course it can't otherwise know).
Unfortunately, it won't update entrypoints, so repo-b still sees the old ones (according to importlib_metadata, which I use to collect them).
The only workaround I know of is to:
- comment out the dependency
- run
poetry update - comment in the dependency
- run
poetry update
Which causes a lot of useless package removal and re-installations, but in the end repo-a is registered correctly.
I am not sure whether this should be a feature request or a bug, but chose bug because to me this is "unexpected behavior".
I expect poetry to pick up these changes for local dependencies when I ask to update, even if nothing else about the dependency changed. The fact that it is "blind" to them violates the purpose of having a local dependency (with develop = True) - making it as painless as possible to simultaneously work on multiple related repositories.
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
Start with the poetry update handling for local dependencies declared with develop = true, and examine how entrypoint metadata is exposed through importlib_metadata. Done means updating a local dependency can rebuild or refresh its metadata without requiring the dependency to be removed and reinstalled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100