marimo icon indicating copy to clipboard operation
marimo copied to clipboard

improvement: poetry package list support for v2

Open robd518 opened this issue 3 weeks ago • 5 comments

Fixes #7090

📝 Summary

Poetry 1.x and 2.x handle the poetry show command differently. The current PoetryPackageManager implementation is fine but with the release of Poetry 2.0 in January the current implementation breaks. This PR will fix issue #7090 - and as a side benefit - improve the PoetryPackageManager class.

🔍 Description of Changes

Poetry version detection:

The manager now detects the installed Poetry version (1.x vs 2.x) at runtime.

Adaptive command generation:

  • For Poetry 1.x, use poetry show --no-dev.
    • If no dev dependencies exist, this command still succeeds.
  • For Poetry 2.x, attempt poetry show --without dev.
    • If the command succeeds, we use its output.
    • If it fails with Group(s) not found, this indicates that no dev group is defined — in that case, fall back to poetry show to capture all installed packages.

Fallback behavior:

If version detection or command inference fails for any reason, default gracefully to poetry show.

This ensures PoetryPackageManager works consistently across Poetry versions 1.x → 2.x and avoids breaking when no dependency groups are defined.

📋 Checklist

  • [x] I have read the contributor guidelines.
  • [x] For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • [x] I have added tests for the changes made.
  • [x] I have run the code and verified that it works as expected.

robd518 avatar Nov 10 '25 21:11 robd518

I have read the CLA Document and I hereby sign the CLA

robd518 avatar Nov 10 '25 21:11 robd518

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
marimo-docs Ready Ready Preview Comment Nov 15, 2025 9:26pm

vercel[bot] avatar Nov 10 '25 21:11 vercel[bot]

Hey @dmadisetti 👋 I think I've handled them but please let me know. I'm still trying to familiarize myself with the dev environment so let me know if there's something I'm missing!

image

robd518 avatar Nov 12 '25 20:11 robd518

@robd518 I think that was the only issue (which is now fine) I'm good with this once we handle the -1 !! Thanks! Hope this has been working for you

dmadisetti avatar Nov 12 '25 21:11 dmadisetti

@dmadisetti If you're referring to this line, I believe it's committed and ready to go but let me know if you're seeing seomthing different or if I'm just missing something. :)

robd518 avatar Nov 13 '25 04:11 robd518