uv plugin fails if _get_system_python_interpreter returns None
Metadata
Current evaluation
Fixed by merged PR #1003 (commit 3fb0f270): uv now falls back to the parts Python interpreter when no system interpreter is specified. Backported via PR #1029.
Resolution: closed resolved
Reason: PR #1003 was merged with commit 3fb0f270, adding a fallback to ${PARTS_PYTHON_INTERPRETER} instead of stringifying None. The fix was also backported to the 2.4 hotfix through PR #1029.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
In the base abstract definition of `_get_system_python_interpreter()` below, it is possible to return `None`. https://github.com/canonical/craft-parts/blob/8907c070500729da894f3ffa43306abc9517e91a/craft_parts/plugins/base.py#L237
However, this line below attempts to stringify the return value of `_get_system_python_interpreter()`, which will always break if set to `None`. https://github.com/canonical/craft-parts/blob/8907c070500729da894f3ffa43306abc9517e91a/craft_parts/plugins/uv_plugin.py#L102
### To Reproduce
Override `UvPlugin`'s `_get_system_python_interpreter` to return `None`, then attempt to build a project.
### part yaml
```shell
```
### Relevant log output
```shell
N/A
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #1003 (commit 3fb0f270): uv now falls back to the parts Python interpreter when no system interpreter is specified. Backported via PR #1029. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by canonical/craft-parts#1003 (commit 3fb0f270), which stopped requiring a specific Python interpreter in the uv plugin. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed after syncing to Jira ticket CRAFT-4010. No code fix or pull request was merged to address the uv plugin crash when _get_system_python_interpreter returns None. The bug remains unresolved in this repository. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without a specified resolution. The uv plugin crashes when _get_system_python_interpreter returns None, causing a stringification error. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without a direct fix. An internal Jira ticket (CRAFT-4010) was created to track the uv_plugin.py crash when _get_system_python_interpreter returns None. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without a documented fix or merge. The report highlighted a bug where stringifying a None return value from _get_system_python_interpreter() caused uv plugin failures. No resolution was provided. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/craft-parts#1003
(confidence 100%)
Merged fix for #991, committed as 3fb0f270.
-
Likely Fixed By:
canonical/craft-parts#1029
(confidence 95%)
Backported the uv interpreter fix to the 2.4 hotfix branch.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1003 fix: don't require a specific python interpreter for uv | craft-parts | merged | PR #1003 by bepri merged into craft-parts, dropping uv's fixed Python-interpreter requirement (+18/-2, 3 files), closing bug #991. Backported to hotfix/2.4 via merged PR #1029. |