Skip to content

Top level dependencies not showing with --top-level/-T flag #8070

@jorgebodega

Description

@jorgebodega
  • 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 (-vvv option) and have included the output below.

Issue

First of all, as is a recently deployed feature, I didn't find anything in recent issues. If there is any existing issue, let me know.

In a newly created project, we are using the --top-level/-T to keep tracking of manually defined deps until we have some automation (like renovate), and we found a problem: the packages using extras are not being showed when the command poetry show -lT is executed.

In my example, the pyproject.toml is the following:

[tool.poetry]
name = "poetry-toplevel"
version = "0.1.0"
description = ""
authors = ["Jorge Bodega Fernanz <[email protected]>"]
license = "MIT"
readme = "README.md"
packages = [{ include = "poetry_toplevel" }]

[tool.poetry.dependencies]
python = "^3.11"
requests = "^2.31.0"
black = { extras = ["d"], version = "^23.3.0" }


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

With those packages installed, if I run poetry show -l, this is the result:

aiohttp            3.8.4    3.8.4    Async http client/server framework (asyncio)
aiosignal          1.3.1    1.3.1    aiosignal: a list of registered asynchronous callbacks
async-timeout      4.0.2    4.0.2    Timeout context manager for asyncio programs
attrs              23.1.0   23.1.0   Classes Without Boilerplate
black              23.3.0   23.3.0   The uncompromising code formatter.
certifi            2023.5.7 2023.5.7 Python package for providing Mozilla's CA Bundle.
charset-normalizer 3.1.0    3.1.0    The Real First Universal Charset Detector. Open, modern and actively main...
click              8.1.3    8.1.3    Composable command line interface toolkit
frozenlist         1.3.3    1.3.3    A list-like structure which implements collections.abc.MutableSequence
idna               3.4      3.4      Internationalized Domain Names in Applications (IDNA)
multidict          6.0.4    6.0.4    multidict implementation
mypy-extensions    1.0.0    1.0.0    Type system extensions for programs checked with the mypy type checker.
packaging          23.1     23.1     Core utilities for Python packages
pathspec           0.11.1   0.11.1   Utility library for gitignore style pattern matching of file paths.
platformdirs       3.5.1    3.5.1    A small Python package for determining appropriate platform-specific dirs...
requests           2.31.0   2.31.0   Python HTTP for Humans.
urllib3            2.0.2    2.0.2    HTTP library with thread-safe connection pooling, file post, and more.
yarl               1.9.2    1.9.2    Yet another URL library

Seems very normal. But this is the result using the new flag (poetry show -lT):

requests           2.31.0   2.31.0   Python HTTP for Humans.

Using the verbose flag (poetry show -lT -vvv), seems like black is being detected, but not printed:

Source (PyPI): 1 packages found for aiohttp >=3.8.4
Source (PyPI): 1 packages found for aiosignal >=1.3.1
Source (PyPI): 1 packages found for async-timeout >=4.0.2
Source (PyPI): 1 packages found for attrs >=23.1.0
Source (PyPI): 1 packages found for black >=23.3.0
Source (PyPI): 1 packages found for certifi >=2023.5.7
Source (PyPI): 1 packages found for charset-normalizer >=3.1.0
Source (PyPI): 1 packages found for click >=8.1.3
Source (PyPI): 1 packages found for frozenlist >=1.3.3
Source (PyPI): 1 packages found for idna >=3.4
Source (PyPI): 1 packages found for multidict >=6.0.4
Source (PyPI): 1 packages found for mypy-extensions >=1.0.0
Source (PyPI): 1 packages found for packaging >=23.1
Source (PyPI): 1 packages found for pathspec >=0.11.1
Source (PyPI): 1 packages found for platformdirs >=3.5.1
Source (PyPI): 1 packages found for requests >=2.31.0
Source (PyPI): 1 packages found for urllib3 >=2.0.2
Source (PyPI): 1 packages found for yarl >=1.9.2

Is this a bug? Or maybe I didn't understand well the functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions