Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency of children not resolved when extras after version #1138

Closed
3 tasks done
philippegr opened this issue May 30, 2019 · 5 comments
Closed
3 tasks done

Dependency of children not resolved when extras after version #1138

philippegr opened this issue May 30, 2019 · 5 comments
Labels
area/solver Related to the dependency resolver kind/bug Something isn't working as expected

Comments

@philippegr
Copy link

philippegr commented May 30, 2019

  • 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

@sdispater
Copy link
Member

It seems to be working on my end.

Could you provide a complete pyproject.toml or execute the install command in debug mode (-vvv) after deleting the lock file to see what happens?

@philippegr
Copy link
Author

philippegr commented May 30, 2019

You are right! Trying to have a minimal example, I overshoot it. My latest comment on the order matters is incorrect. I updated my initial post. Sorry about that.
However, the bug seem to exist no matter the order of the keywords for dask

Here is the pyproject.toml

And here is the output of install -vvv
Interesting bits are at the end IMO where it states that psutil has been skipped, which is one of the package that makes the from dask.distributed import Client complain and one of the package pip install dask[complete] (run after poetry install) would brought along

@sdispater
Copy link
Member

Commit 426dbdc should fix the issue.

The problem was the circular dependency between dask and distributed which caused Poetry to drop dependencies when building the dependency graph.

The fix will be available in the next bugfix release.

@sdispater sdispater added kind/bug Something isn't working as expected area/solver Related to the dependency resolver labels May 31, 2019
@philippegr
Copy link
Author

Thank you very much for your super quick fix.
Will test it as soon as the next preview is out :-)

Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/solver Related to the dependency resolver kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants