Does Poetry support recursive extras?
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
Issue
Does Poetry support recursive (for lack of a better term, it’s early) extras best exemplified by this pyproject.toml snippet?
[tool.poetry.dependencies]
attrs = "~19.3"
pandas = "~1.1"
# optional
quandl = { version = "~3.5.2", optional = true }
matplotlib = { version = "~3.3.0", optional = true }
networkx = { version = "~2.4.0", optional = true }
scikit-learn = { version = "~0.22.0", optional = true }
[tool.poetry.extras]
quandl = ["quandl"]
viz = ["matplotlib", "networkx"]
ml = ["viz", "scikit-learn"]
all = ["ml", "quandl"]
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
How to use poetry for recursive installation? - Stack Overflow
poetry add <packagename> adds and installs a dependency available on pypi (or if configured other package repositories) to you project.
Read more >Dependency Management With Python Poetry
Learn how Python Poetry will help you start new projects, maintain existing ones, and master dependency management.
Read more >History | Poetry - Python dependency management and ...
Fixed recursion errors when retrieving extras (#2787). Fixed PyPI always being displayed when publishing even for custom repositories (#2905). Fixed handling of ...
Read more >Recursive by Luisa A. Igloria - Poetry Foundation
Do not look for illumination. Mostly there is the twitch that precedes. gesture, the button's resistance. as you try to slide it into...
Read more >Making Python Packages Part 2: How to Publish & Test Your ...
Poetry is a Python library that we can use to create a package, publish it to PyPI more easily, AND it will deal...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

For comparison, this is how it can be done with setuptools
setup.cfg: https://stackoverflow.com/a/61610341/Personally I am not convinced there is a need for such a feature with such a notation. Seems to be adding more confusion. You may want to give the UX a second look
See if it would make sense in the context of the dependencies groups feature (planned for v1.2).
If I were to change extras in order to avoid repetition for dependencies that are in multiple extras (in a way this is what you are trying to solve, right?), this is what I would aim for, but I think the dependencies groups feature already covers this (I have not read the full discussion on this, so I might be wrong):