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

All extras #5452

Merged
merged 8 commits into from
Jun 4, 2022
Merged

All extras #5452

merged 8 commits into from
Jun 4, 2022

Conversation

kroeschl
Copy link
Contributor

Add --all-extras flag to install command

Resolves: #3413

  • Added tests for changed code.
  • Updated documentation for changed code.

Add an --all-extras flag to the install command for projects which use multiple sets of extras. Update documentation for the new flag.

@abn abn added the area/cli Related to the command line label Apr 14, 2022
@kroeschl kroeschl mentioned this pull request Apr 15, 2022
2 tasks
@kroeschl kroeschl marked this pull request as ready for review April 15, 2022 14:46
abn
abn previously requested changes Apr 15, 2022
Copy link
Member

@abn abn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @kroeschl. Looks good, single comment.

src/poetry/console/commands/install.py Outdated Show resolved Hide resolved
@kroeschl kroeschl requested a review from abn April 18, 2022 18:38
assert tester.status_code == 1
assert (
tester.io.fetch_error()
== "You cannot specify explicit `--extras` while installing `--all-extras`.\n"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about using --all-extras as words rather than treating it as a single token in this error message. I'd expect something like "You can't specify both --extras and --all-extras.".

src/poetry/console/commands/install.py Show resolved Hide resolved
@pkulev
Copy link
Contributor

pkulev commented Apr 26, 2022

Will --extras all be a better choice?

@l0b0
Copy link

l0b0 commented Apr 26, 2022

Will --extras all a better choice?

No, that makes for a "magic" value which could break existing setups.

@kroeschl
Copy link
Contributor Author

Will --extras all a better choice?

No, that makes for a "magic" value which could break existing setups.

If we really wanted to go that route, --extras "*" or similar would work better since Poetry (at least 1.1.13) currently chokes on an extras group named *, so no one could be depending on it.

@l0b0
Copy link

l0b0 commented Apr 26, 2022

Will --extras all a better choice?

No, that makes for a "magic" value which could break existing setups.

If we really wanted to go that route, --extras "*" or similar would work better since Poetry (at least 1.1.13) currently chokes on an extras group named *, so no one could be depending on it.

I'd avoid that too:

  • It's another magic value, unfamiliar to anyone who isn't using globs.
  • People familiar with globs will complain that it can't be used like an actual glob, for example in --extras='backend-*'.

@neersighted
Copy link
Member

pre-commit.ci autofix

@neersighted neersighted merged commit 7ab0699 into python-poetry:master Jun 4, 2022
@abn abn mentioned this pull request Jun 6, 2022
@kroeschl
Copy link
Contributor Author

kroeschl commented Jun 7, 2022

Thanks for cleaning this up @neersighted. 👍

@rjurney
Copy link

rjurney commented Jul 19, 2022

@neersighted @kroeschl any idea when this will be released? It isn't in 1.1.14 I see.

@kroeschl
Copy link
Contributor Author

@neersighted @kroeschl any idea when this will be released? It isn't in 1.1.14 I see.

This is in 1.2.0b2 and later, but it was never ported it back to 1.1.x.

@kroeschl kroeschl deleted the all-extras branch July 27, 2022 17:42
kroeschl added a commit to kroeschl/poetry that referenced this pull request Jul 27, 2022
@neersighted
Copy link
Member

neersighted commented Dec 8, 2022

(in reply to a now deleted comment by @AiGeneratedUsername)

With this merge request you made Poetry functionality incomplete.

The addition of new features in Poetry proper does not relate to the implementation of new features in plugins. I don't think it's helpful or fair to say an accepted change that doesn't scratch your particular itch or do everything you would like to see is deficient in this situation.

In any case, there is an open request on python-poetry/poetry-plugin-export#153 to implement the same feature in the plugin; please add your 👍 there.

Copy link

This pull request 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 Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/cli Related to the command line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flag to install all extras
6 participants