python-poetry / python-poetry/poetry

Poetry show: allow displaying source

Open
#10,967 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

Issue Kind

Brand new capability

Description

We want to be able to get all of a projects dependencies that use a specific source. For this effect, I propose adding a new option to poetry show: poetry show --source: to include the source of each dependency listed.

Impact

We want our CI process to ensure there are no outdated packages among our internal dependencies.

Workarounds

Our current workaround is to is to manually filter pyproject.toml with tomlq:

tomlq -r '           
  [.tool.poetry.dependencies, (.tool.poetry.group[]?.dependencies // {})]
  | add
  | to_entries[]
  | select(
      (.value | type=="object" and .source=="mysource")
      or
      (.value | type=="array" and any(.[]; type=="object" and .source=="mysource"))
    )
  | .key
' pyproject.toml

And then to filter poetry show -l's output for internal dependencies.

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 tracing the poetry show command and how dependency source metadata from pyproject.toml is represented. The work is done when an option displays each listed dependency's source, allowing users to identify dependencies from a specific source.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.