← Back to issue list

Fix poetry plugin for 25.04+

View original Github issue

Metadata

Project
craft-parts
Number
#1492
Type
issue
State
closed
Author
mr-cal
Labels
Status: Triaged Type: Bug
Created
Updated
Closed

Current evaluation

Craft-parts fixed Poetry 2 export compatibility by conditionally installing python3-poetry-plugin-export on Ubuntu 25.04+ in PR #1510 (commit 6d30ef14).

Resolution: closed resolved

Reason: PR #1510 was merged as commit 6d30ef14. It updates PoetryPlugin.get_build_packages() to detect Ubuntu 25.04+ and install the export plugin required by Poetry 2.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done Craft-parts should check the base OS and conditionally install python3-poetry-plugin-export. This should be tested downstream in Snapcraft with this spread test: https://github.com/canonical/snapcraft/blob/6ee41173cce17eccf0048737fcb18f868611baba/tests/spread/core26/python-hello/task.yaml#L8 ### Why it needs to get done `python3-poetry` was bumped to v2 in 25.04. It drops built-in support for the `poetry export` command.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Craft-parts fixed Poetry 2 export compatibility by conditionally installing python3-poetry-plugin-export on Ubuntu 25.04+ in PR #1510 (commit 6d30ef14).
stealth/space-bunny-alpha — closed resolved Craft-parts now installs python3-poetry-plugin-export on Ubuntu 25.04+ for Poetry 2 compatibility. Merged in canonical/craft-parts#1510.
qwen/qwen3.6-35b-a3b — — Fixed by detecting Ubuntu 25.04+ via OsRelease() and conditionally adding python3-poetry-plugin-export to build packages in poetry_plugin.py, resolving the poetry export command failure caused by python3-poetry v2.
qwen/qwen3.6-35b-a3b — — Implemented a fix that detects Ubuntu 25.04+ via OsRelease() and conditionally adds python3-poetry-plugin-export to build packages, resolving the dropped poetry export command support in python3-poetry v2.
qwen/qwen3.6-35b-a3b
Staleness: 65
Complexity: 20
Confidence: 85
Support Request: 5
keep open Bug report for updating the poetry plugin to handle Python Poetry v2 changes in Ubuntu 25.04+. Currently triaged but inactive for ~4.5 months with no assignee or maintainer discussion.
qwen3.6-35b-a3b-mtp-q6
Staleness: 55
Complexity: 30
Confidence: 85
Support Request: 5
keep open Bug tracking poetry plugin incompatibility on Ubuntu 25.04+ due to python3-poetry v2 dropping the export command. Issue is triaged by a maintainer and currently inactive for ~4 months.

Update history

Date Change
closed

Related work

  • Likely Fixed By: canonical/craft-parts#1510 (confidence 100%)

    Merged fix implementing OS-version detection and conditional installation of python3-poetry-plugin-export.

Related issues

Issue Project State Summary Similarity
#1510 fix(poetry): install export plugin on 25.04+ craft-parts merged Merged PR #1510 in commit 6d30ef14, adding python3-poetry-plugin-export on Ubuntu 25.04+ to preserve Poetry's export functionality.
87%
#1996 Poetry plugin fails on 20.04 base charmcraft closed Poetry plugin added python3-poetry-plugin-export to apt build-packages, unavailable on Ubuntu 20.04. Fixed upstream in craft-parts PR #1633 (commit cff4121b/fbe33c05); issue closed after upstream fix.
82%
#901 fix(poetry): don't install poetry with poetry-deps craft-parts merged PR #901 merged as commit 2eda2a5a: the Poetry plugin skips adding python3-poetry (and the export plugin) to build packages when a poetry-deps part supplies them. Fixes charmcraft#1996 (CRAFT-3687); noted in the 2.34.1 changelog.
76%
#1633 fix(poetry): don't install the export plugin from apt craft-parts merged Merged #1633 in commit fbe33c05: Poetry now installs the export plugin only when Poetry itself was not installed from apt.
73%
#1940 feat(docs): add python and poetry plugin docs charmcraft merged PR #1940 merged as commit 408650c8, adding Python and Poetry plugin documentation (+144 lines, 6 files). Builds on #1939 (craft-parts common docs) and required craft-parts#872 anchors; merged despite12 unresolved review comments.
71%
#5962 Update Poetry version snapcraft closed No Poetry upgrade was made. Maintainer bepri explained the plugin uses the base core's python3-poetry version (not changeable) and suggested overriding it or adding python3-poetry-plugin-export; reporter moved to uv and stopped testing, so the issue was closed.
70%
#18 Poetry integration charmcraft closed Poetry support was ultimately delivered as Charmcraft-specific python/poetry craft-parts plugins, added in PR #1899 (commit 8b748f3e, 2023), superseding the older build.py requirements.txt idea; issue closed once shipped.
70%
#1840 [EXPERIMENTAL]: poetry plugin charmcraft closed Experimental Poetry plugin PR closed unmerged in favour of charmcraft#1899, merged as commit 8b748f3e, adding charmcraft/parts/plugins/_poetry.py and _python.py with charm-oriented defaults.
70%
#820 feat(plugin): add poetry plugin craft-parts merged Merged Poetry plugin support in commit 8b0d76c8, adding first-class build-system handling via poetry install and resolving #707.
70%
#5025 Enable the poetry plugin snapcraft closed Poetry source support delivered by merged PR canonical/snapcraft#5090 (commit 5a42f0aa5), adding a Snapcraft-specific Poetry plugin for core22/core24, closing the request. Tracked internally as CRAFT-3363.
70%