Skip to content

Dependency of children not resolved when extras after version  #1138

@philippegr

Description

@philippegr
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: in a docker from python:3.7-strech
  • Poetry version: we checkout master at docker build, issue has been around for at least the past few days
  • Link of a Gist with the contents of your pyproject.toml file: Line that cause the issue dask = {version = "^1.2",extras = ["complete"]}

Issue

This issue is related to the way dask gets installed. The default pip command is pip install dask corresponds to "most common uses of Dask", to have the complete set dependency with pip pip install dask[complete], this corresponds to a use case of the -E option as stated in this issue

Step to reproduce the problem:

  1. poetry add dask -E complete --> new line in pyproject .toml dask = {version = "^1.2",extras = ["complete"]}
  2. in python, try from dask.distributed import Client
    This will fail on a missing tblib library.
  3. But if you run pip install dask[complete], pip detects that tblib and psutil (among others) are not installed --> so the dependency resolution done by poetry was incomplete

What is potentially happening:
Per [this file from Dask] (https://github.com/dask/dask/blob/a6abe3ca75179a7264a15de043335e6dbed684ea/setup.py#L10-L17) it appears that poetry does indeed find the first level dependency of dask[complete] but not the second level (dependencies of the dependencies).

[edit: nope incorrect statement below]
Interestingly it seems that switching the order of version and extras in the pyproject.toml (for dask = {extras = ["complete"], version = "^1.2"} does fix this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/solverRelated to the dependency resolverkind/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