Skip to content
Discussion options

You must be logged in to vote

There is no equivalent to peerDependencies in Python packaging -- if you care about the version, it is now a top-level dependency. You could implement this as an optional group that you never install explicitly, but that won't work when you use external tools/build sdists and bdists of your package -- that would only work for poetry install.

While technically Poetry could add this as a first-class feature (rather than the groups trick), I don't think there's a ton of benefit as long as other tooling doesn't understand it.

If you want to keep 'peer' versions apart from 'real' deps, put them in a non-optional group so they're in one place in your pyproject.toml -- this was one of the intent…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by erikdstock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants