-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
extras installed by default #1340
Comments
Following my comment at #1145 (comment) , isn't Should it not have generated this in # ~~ snip ~~
[tool.poetry.dependencies]
behave = {version = "^1.2", optional = true}
[tool.poetry.extras]
bdd = ["behave"]
# ~~ snip ~~ |
Closing as See #1145 (comment). |
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. |
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). N/AOS version and name: macos mojave 10.14.6
Poetry version: 0.12.17
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/esciara/aee9b5ed11f9af7b907df9ae6d656caa
Issue
Expected behavior
Following the
extras
documentation statement:Extras should not be installed by default when performing a
poetry install
, but should be installable only explicitly through apoetry install -E <extra>
.Actual behavior
Extras added with
poetry add <package> -E <extra>
are installed by default when doing apoetry install
.Further explanations
Performing a
poetry add behave -E bdd
generates the following in thepyproject.toml
file adds the following:The generated line is without an
optional = true
, which leads to the package being installed by default with apoetry install
.Workaround
Adding package with
poetry add <package> -E <extra> --optional
.Resolution
Change the default behavior of
poetry add <package> -E <extra>
to be equivalent topoetry add <package> -E <extra> --optional
.The text was updated successfully, but these errors were encountered: