From 18a82a137b0ce74e72ddac6d07bded2e8d0ff416 Mon Sep 17 00:00:00 2001 From: tarikgta2 Date: Sat, 19 Oct 2024 22:15:30 +0200 Subject: [PATCH] [analyzer] Remove use of deprecated python module pipes (#292). The analyzer currently uses pipes in older versions of python, and shlex only when it's available. A prior commit to IKOS required Python 3.3, where shlex was introduced, so it is safe to assume that it's available unconditionally. Additionally, the module pipes was deprecated in python 3.11 and finally removed in python 3.13. This is making ikos not work with modern versions of Python. This commit replaces uses of pipes' quote method with shlex's quote. --- analyzer/python/ikos/analyzer.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/analyzer/python/ikos/analyzer.py b/analyzer/python/ikos/analyzer.py index 75b66ae0..967881bd 100644 --- a/analyzer/python/ikos/analyzer.py +++ b/analyzer/python/ikos/analyzer.py @@ -45,7 +45,6 @@ import json import os import os.path -import pipes import shlex import shutil import signal @@ -553,10 +552,7 @@ def parse_arguments(argv): return opt -if hasattr(shlex, 'quote'): - sh_quote = shlex.quote -else: - sh_quote = pipes.quote +sh_quote = shlex.quote def command_string(cmd):