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

install extra doesn't work for optional development dependencies #4062

Closed
3 tasks done
robin-moss opened this issue May 13, 2021 · 2 comments
Closed
3 tasks done

install extra doesn't work for optional development dependencies #4062

robin-moss opened this issue May 13, 2021 · 2 comments
Labels
kind/bug Something isn't working as expected

Comments

@robin-moss
Copy link

  • 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).
  • Ubuntu 20LTS:
  • 1.1.6:
  • Link of a Gist:

Issue

If the optional dependency is listed under dev dependencies, then calling install extra still skips the dependency:

$ poetry install -v
The currently activated Python version 3.8.5 is not supported by the project (^3.9).
Trying to find and use a compatible version. 
Using python3.9 (3.9.0)
Creating virtualenv gist-QVO4invi-py3.9 in /home/robin.moss/.cache/pypoetry/virtualenvs
Using virtualenv: /home/robin.moss/.cache/pypoetry/virtualenvs/gist-QVO4invi-py3.9
Updating dependencies
Resolving dependencies... (0.2s)

Writing lock file

Finding the necessary packages for the current system

Package operations: 0 installs, 0 updates, 0 removals, 1 skipped

  • Installing graphviz (0.16): Skipped for the following reason: Not required
$ poetry install -v -E bob
The currently activated Python version 3.8.5 is not supported by the project (^3.9).
Trying to find and use a compatible version. 
Using python3.9 (3.9.0)
Using virtualenv: /home/robin.moss/.cache/pypoetry/virtualenvs/gist-QVO4invi-py3.9
Installing dependencies from lock file

Finding the necessary packages for the current system

Package operations: 0 installs, 0 updates, 0 removals, 1 skipped

  • Installing graphviz (0.16): Skipped for the following reason: Not required

However, moving the dev dependency to dependency works. Is it intentional that extras do not work for dev dependencies? If so what is the standard way to install an optional dev dependency?

@robin-moss robin-moss added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 13, 2021
@finswimmer
Copy link
Member

Hello @robin-moss,

yes that behavior is expected. "extras" are only meant for normal deps. "extras" for dev dependencies is what is discussed as dependency groups and is planned for poetry 1.2.

fin swimmer

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented Mar 2, 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 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants