poetry-plugin-export icon indicating copy to clipboard operation
poetry-plugin-export copied to clipboard

Circular dependency between poetry and poetry-plugin-export

Open joshgc opened this issue 2 years ago • 2 comments

Note:

  1. poetry depends on poetry-plugin-export https://github.com/python-poetry/poetry/blob/master/pyproject.toml#L36
  2. poetry-plugin-export depends on poetry https://github.com/python-poetry/poetry-plugin-export/blob/main/pyproject.toml#L21

This prevents bazel, which is circular-dependency-phobic, from building targets which depend on poetry. I believe the motivation for the dependencies are that

  1. Its nice if everyone who installs poetry just gets this export functionality. plugin-export makes poetry better
  2. Who would install plugin-export and not poetry? This dependency makes pip install do something reasonable.

I see three possible remediations: A) Inline poetry-plugin-export since its not too much python and is always installed now anyway B) Break the plugin-export dependency on poetry. This may add friction but the error messages should be obvious about whats going on. C) Break the poetry dependency on plugin-export. This would probably require some code change so that poetry would discover if the extra package was present.

I think B is the easiest, but I'm really not sure. Would love to hear your thoughts.

joshgc avatar Oct 13 '23 18:10 joshgc

See python-poetry/poetry#5980 and python-poetry/poetry#6441 for some discussion.

radoering avatar Oct 14 '23 04:10 radoering

of those three B is the one that is definitely wrong! the plugin definitely does depend on poetry.

dimbleby avatar Oct 14 '23 17:10 dimbleby