← Back to issue list

Python plugin is broken in core24

View original Github issue

Metadata

Project
snapcraft
Number
#4942
Type
issue
State
closed
Author
tigarmo
Labels
—
Created
Updated
Closed

Current evaluation

Python plugin broke in core24 classic snaps due to Python 3.12 venv changes. Fixed by PR #4946 (squash-merged as 952a8e04d), which rewrites pyvenv.cfg's "home" key to /snap/<name>/current in snapcraft/parts/plugins/python_common.py.

Resolution: closed resolved

Reason: Maintainer tigarmo closed the report citing "Fixed in #4946". PR #4946 "fix: fix Python venv in core24 classic snaps" was squash-merged as 952a8e04d and added _fix_pyvenv logic in snapcraft/parts/plugins/python_common.py with unit tests, confirming the fix landed in the tree.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description See [https://forum.snapcraft.io/t/upgrading-classic-snap-to-core24-using-snapcraft-8-3-causes-python-3-12-errors-at-runtime/41045](https://forum.snapcraft.io/t/upgrading-classic-snap-to-core24-using-snapcraft-8-3-causes-python-3-12-errors-at-runtime/41045) In short, it looks like the changes to virtual environments in Python 3.12 are not working with the python plugin. ### To Reproduce . ### Environment . ### snapcraft.yaml ```shell . ``` ### Relevant log output ```shell . ``` ### Additional context We still need confirmation but [this fix](https://forum.snapcraft.io/t/upgrading-classic-snap-to-core24-using-snapcraft-8-3-causes-python-3-12-errors-at-runtime/41045/11?u=tigarmo) should work and is feasible for us.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Python plugin broke in core24 classic snaps due to Python 3.12 venv changes. Fixed by PR #4946 (squash-merged as 952a8e04d), which rewrites pyvenv.cfg's "home" key to /snap/<name>/current in snapcraft/parts/plugins/python_common.py.
stealth/space-bunny-alpha — closed resolved Python 3.12 venv breakage in core24 classic snaps fixed by rewriting pyvenv.cfg's 'home' key to /snap/<name>/current in PR #4946, squash-merged as 952a8e04d. Maintainer closed the issue as fixed.
stealth/space-bunny-alpha — closed resolved Python plugin broke venvs in core24 classic snaps due to Python 3.12 venv behaviour. Fixed by PR #4946 (commit 952a8e04d), which rewrites pyvenv.cfg 'home' to /snap/<name>/current; tracked as CRAFT-3162.
stealth/space-bunny-alpha — closed resolved Fixed Python 3.12 virtual environments for core24 classic snaps by correcting the pyvenv.cfg home path in PR #4946, squash-merged as 952a8e04d.
qwen/qwen3.6-35b-a3b — — Fixed the Python plugin failure in core24 caused by Python 3.12 virtual environment changes. The problem was resolved and merged in pull request #4946.
qwen/qwen3.6-35b-a3b — — The Python plugin core24 breakage from Python 3.12 venv changes was closed as fixed. The resolution was merged in pull request #4946.
qwen/qwen3.6-35b-a3b — — Python plugin breakage in core24 caused by Python 3.12 virtual environment changes was fixed in pull request #4946.
qwen3.6-35b-a3b-mtp-q6 — — Resolved a core24 Python plugin failure caused by Python 3.12 virtual environment changes. The fix was merged in pull request #4946.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#4946 (confidence 98%)

    Merged PR explicitly closes #4942; adds pyvenv.cfg 'home' rewrite in python_common.py plus tests/unit/parts/plugins/test_python_plugin.py::test_fix_pyvenv.

Related issues

Issue Project State Summary Similarity
#4946 fix: fix Python venv in core24 classic snaps snapcraft merged PR #4946 squash-merged as 952a8e04d, fixing the Python plugin in core24 classic snaps by rewriting pyvenv.cfg's "home" key to /snap/<name>/current. Closes bug #4942.
84%
#786 Python plugin. Python is broken in core24 classic snaps if snap is used on an older Ubuntu LTS version craft-parts open Core24 classic snaps using the Python plugin fail on older Ubuntu LTS hosts because staged Python cannot find its stdlib; Snapcraft 8.3.2's fix proved incomplete, with follow-up in snapcraft#5144.
78%
#4666 feat(plugins): support core24 in the Python plugin snapcraft merged Merged PR #4666 as commit 10352d96d, adding core24 Python plugin support with Python 3.12 for confined snaps and clearer strict/devmode interpreter selection.
72%
#5144 error out if core24 classic python snap is created with the non-staged python binary snapcraft open Add a Python-plugin guard for classic snaps staged without the python3-minimal symlink; current post_prime only rewrites pyvenv.cfg, leaving the core24 failure mode unresolved.
72%