Skip to content

[1.8 backport] [1.8 backport] Add example for dependency with multiple extras#9217

Closed
neersighted wants to merge 1 commit intopython-poetry:1.8from
neersighted:backport/9215-1.8
Closed

[1.8 backport] [1.8 backport] Add example for dependency with multiple extras#9217
neersighted wants to merge 1 commit intopython-poetry:1.8from
neersighted:backport/9215-1.8

Conversation

@neersighted
Copy link
Copy Markdown
Member

Backport #9215 to 1.8


Backport #9138 to 1.8


The currently existing example on how to install dependency extras only shows a single dependency:
fastapi = {version="^0.92.0", extras=["all"]}

Since right before this example it is shown how to install multiple extras using the command line interface, this can be confusing and lead to hard to understand missing dependencies:
poetry install --extras "mysql pgsql"

Note that the CLI has quotes around both extras and no commas, while in pyproject.toml each extra must be quoted and comma-separated, which is currently not documented.

Thus the change adds an example with more than one extra, based on pandas.

Pull Request Check List

Resolves: -

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

Not applicable, pure documentation change.

The currently existing example on how to install dependency extras only shows a single dependency:
`fastapi = {version="^0.92.0", extras=["all"]}`

Since right before this example it is shown how to install multiple extras using the command line interface, this can be confusing and lead to hard to understand missing dependencies:
`poetry install --extras "mysql pgsql"`

Note that the CLI has quotes around both extras and no commas, while in pyproject.toml each extra *must* be quoted and comma-separated, which is currently not documented.

(cherry picked from commit 9cda043)
Signed-off-by: Bjorn Neergaard <bjorn@neersighted.com>
(cherry picked from commit 88311c9)
@neersighted neersighted added area/docs Documentation issues/improvements impact/docs Contains or requires documentation changes labels Mar 24, 2024
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 24, 2024

Deploy preview for website ready!

✅ Preview
https://website-b8lwsj3z2-python-poetry.vercel.app

Built with commit 27fbab2.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link
Copy Markdown

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 Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area/docs Documentation issues/improvements impact/docs Contains or requires documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants