Skip to content

Conversation

@voegelas
Copy link
Contributor

This pull requests modifies lxc_attach_python_exec and Container_attach_and_possibly_wait in lxc.c.
From Python 3.7 onwards, the functions PyOS_BeforeFork, PyOS_AfterFork_Parent and PyOS_AfterFork_Child are used instead of the deprecated function PyOS_AfterFork.

The PR also adds a GitHub Actions workflow that performs some tests with Python 3.8 and 3.13. Python 3.8 is the oldest Python release that GitHub provides for Ubuntu 24.04.

Fixes #35.

voegelas added 2 commits May 13, 2025 17:38
Signed-off-by: Andreas Vögele <andreas@andreasvoegele.com>
Container_attach_and_possibly_wait() fails in Python 3.13 with
"PyMutex_Unlock: unlocking mutex that is not locked" if PyOS_AfterFork()
is used.

Signed-off-by: Andreas Vögele <andreas@andreasvoegele.com>
@stgraber stgraber merged commit 018c4ed into lxc:main May 13, 2025
0 of 2 checks passed
@voegelas voegelas deleted the after-fork branch May 13, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

attach() fails in Python 3.13 with "unlocking mutex that is not locked"

2 participants