Skip to content

Using --all-extras does not install from project.optional-dependencies #7556

@mbrancato

Description

@mbrancato
  • 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

The documentation indicates that poetry install --all-extras will install all "optional dependencies". Those in both the main group marked as optional, and the dev group. I've noticed that other tools with optional dependencies are not installed when using --all-extras.

Example in attached gist, summary:

  • FastAPI is a direct dependency
  • FastAPI depends on starlette
  • starlette uses pyproject.toml and has httpx as an optional dependency
  • FastAPI / starlette has a TestClient class
  • The TestClient class uses httpx
  • httpx is defined in pyproject.toml
  • Using the TestClient fails as httpx is not installed.
  • Workaround is that httpx must be added as a direct dependency

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expectedstatus/triageThis issue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions