Skip to content

Commit

Permalink
scripts/uninstall_module: import signal module
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rst0git committed Mar 3, 2025
1 parent da7f5b7 commit 235ec54
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/uninstall_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
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

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'signal' is not used.
# have been modified to use the path specified with `--prefix`.
#
# flake8: noqa: F401
import signal

import importlib_metadata


Expand Down

0 comments on commit 235ec54

Please sign in to comment.