2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00

scripts/uninstall_module: import signal module

With Python 3.13, the `subprocess` module now uses the
`posix_spawn()` function [1], which requires the `signal`
module to be imported.

Fixes: #2607

[1] https://docs.python.org/3/whatsnew/3.13.html#subprocess

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
Radostin Stoyanov 2025-03-03 15:03:51 +00:00 committed by Andrei Vagin
parent 38b9807cd5
commit c298b51a69

View File

@ -10,6 +10,16 @@ import site
import subprocess
import sys
# With Python 3.13 the subprocess module now uses the `posix_spawn()`
# function which requires loading the `signal` module:
# https://docs.python.org/3/whatsnew/3.13.html#subprocess
#
# We need to load this module here, before PYTHONPATH and sys.path
# have been modified to use the path specified with `--prefix`.
#
# flake8: noqa: F401
import signal
import importlib_metadata