From 3474dd507471898f9fd90fd2e659ec04063f9040 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Thu, 29 Aug 2024 21:22:33 +0200 Subject: [PATCH] Python 3.13: do not use removed module "pipes" This module has been removed in Python 3.13. There is no change in functionality: $ python3 Python 3.12.4 (main, Jun 12 2024, 19:06:53) [GCC 13.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import shlex, pipes :1: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13 >>> shlex.quote == pipes.quote True Change-Id: Ia4325a1c159812ed7879066e2803fbc68bb26665 --- oslo_privsep/tests/test_priv_context.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oslo_privsep/tests/test_priv_context.py b/oslo_privsep/tests/test_priv_context.py index 98f73c9..ec2b2d6 100644 --- a/oslo_privsep/tests/test_priv_context.py +++ b/oslo_privsep/tests/test_priv_context.py @@ -15,8 +15,8 @@ import logging import os -import pipes import platform +import shlex import sys import tempfile import time @@ -186,7 +186,7 @@ class RootwrapTest(testctx.TestContextTestCase): cmd.append('--debug') self.privsep_conf.set_override( - 'helper_command', ' '.join(map(pipes.quote, cmd)), + 'helper_command', ' '.join(map(shlex.quote, cmd)), group=testctx.context.cfg_section) testctx.context.start(method=priv_context.Method.ROOTWRAP)