Skip to content

poetry 1.7 ignores extra dependencies of extra dependencies #8639

Description

@pmav99
Poetry
Version: 1.7.0
Python:  3.11.5

Virtualenv
Python:         3.10.12
Implementation: CPython
Path:           /tmp/asdf/.venv
Executable:     /tmp/asdf/.venv/bin/python
Valid:          True

System
Platform:   linux
OS:         posix
Python:     3.10.12
Path:       /usr
Executable: /usr/bin/python3.10
[tool.poetry]
name = "asdf"
version = "0.1.0"
description = ""
authors = ["pmav99"]
readme = "README.md"
 
[tool.poetry.dependencies]
python = "^3.11"
xarray = {version = "^2023.10.1", extras = ["parallel"]}
 
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
  • 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

This is similar to #5862 but that one was affecting an older version of poetry and according to the report it had been resolved. So this is probably a regression. For the record, I tested the following with poetry 1.6.1 and it is an issue there, too.

xarray[parallel] is pulling dask[complete]. Nevertheless poetry only install the basic dependencies of dask and ignores dask's extras.
For example dask[complete] should install e.g. bokeh. Nevertheless, poetry does not install it:

poetry init -n
poetry add xarray -E parallel
python -c 'import bokeh'  # fails

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expectedstatus/duplicateDuplicate issues

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions