python-poetry / python-poetry/poetry

Speed up lock file update when path dep lock file gets updated

Open
#8,221 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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 FAQ and general documentation and believe that my question is not already covered.

Feature Request

I use poetry in a python monorepo, where the packages in it depend on each other using a path dependency.
For example package C -> B -> A, where folderstructure is
root
|- packageA
|- packageB
|- packageC

If I add a dependency to A, it (as expected) does not get added to package B, nor C's poetry lock files.
The only way I've found to update the lock files of B & C is by running poetry update within B, and then within C.

With many such projects, and each with many dependencies, this can become very slow (which I know is because of the PyPI way of dependency specification).

However, as this happens all within a single repo, where the dependency of C->B->A are all specified by relative paths, would it be possible

  • that a poetry check or poetry lock --no-update inspects the lock file of A (just as it could inspect the pyproject.toml of A)?
  • to run a poetry update on B which will only inspect the (new) dependencies of A?

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

Start by reproducing the packageA → packageB → packageC path-dependency layout described in the issue and compare the behavior of poetry check, poetry lock --no-update, and poetry update. Determine how lock files are currently refreshed across path dependencies; done should mean dependent projects can incorporate updated transitive dependencies without repeatedly resolving unrelated packages.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
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.