poetry icon indicating copy to clipboard operation
poetry copied to clipboard

poetry show --outdated does not show outdated packages from "explicit" repositories

Open jclerman opened this issue 6 months ago • 1 comments

Description

Maybe I'm missing something, but try as I might, I can't seem to get poetry (version 2.1.3) to show output for outdated packages that come from a private repository that is set as priority = "explicit".

Example line in [tool.poetry.dependencies]:

my-private-package = {version = "^0.14.0", source = "MyRepo"}

in a pyproject.toml that also includes:

[[tool.poetry.source]]
name = "MyRepo"
url = "https://repo.shared.mycompany.com/repository/pypi-mycompany/simple"
priority = "explicit"

If MyRepo has another version of the package (say, 0.15.0) then I would expect poetry show -o to list the package as outdated. But... nope; it's simply not included in the output of poetry show -o, even though PyPi packages are correctly shown if they are outdated.

Workarounds

poetry show --outdated works correctly if I specify the private repo as supplemental - but not if I keep it as explicit. The latter is preferable since it should avoid poetry checking my private repo for packages that I don't want to source from there.

Poetry Installation Method

pipx

Operating System

MacOS Sequoia 15.5

Poetry Version

Poetry (version 2.1.3)

Poetry Configuration

cache-dir = "/Users/jclerman/Library/Caches/pypoetry"
data-dir = "/Users/jclerman/Library/Application Support/pypoetry"
installer.max-workers = null
installer.no-binary = null
installer.only-binary = null
installer.parallel = true
installer.re-resolve = true
keyring.enabled = true
python.installation-dir = "{data-dir}/python"  # /Users/jclerman/Library/Application Support/pypoetry/python
repositories.sirona.url = "https://repo.shared.sirona.com/repository/pypi-sirona/simple"
requests.max-retries = 0
solver.lazy-wheel = true
system-git-client = false
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /Users/jclerman/Library/Caches/pypoetry/virtualenvs
virtualenvs.prompt = "{project_name}-py{python_version}"
virtualenvs.use-poetry-python = false

Python Sysconfig

sysconfig.log
Paste the output of 'python -m sysconfig', over this line.

Example pyproject.toml

key lines are included in the bug description - let me know if that isn't enough to reproduce the issue.

Poetry Runtime Logs

poetry.log

jclerman avatar Jun 11 '25 21:06 jclerman

hi jclerman i had a read through some code and I believe its here why it is not showing up, when checking the outdated packages it doesn't consider the sources with explicit priority when using this property. i dont have as much experience so maybe a maintainer can provide more background on this https://github.com/python-poetry/poetry/blob/1c059eadbb4c2bf29e01a61979b7f50263c9e506/src/poetry/repositories/repository_pool.py#L75-L90

Aearsears avatar Aug 19 '25 21:08 Aearsears