Skip to content

Commit 6b9c7f7

Browse files
committed
Replace pipes.quote() with shlex.quote()
... as pipes was removed in Python 3.13.
1 parent ea14d75 commit 6b9c7f7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

executor/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import errno
4545
import logging
4646
import os
47-
import pipes
4847
import pprint
4948
import shlex
5049
import signal
@@ -1986,7 +1985,7 @@ def quote(*args):
19861985
"""
19871986
Quote a string or a sequence of strings to be used as command line argument(s).
19881987
1989-
This function is a simple wrapper around :func:`pipes.quote()` which
1988+
This function is a simple wrapper around :func:`shlex.quote()` which
19901989
adds support for quoting sequences of strings (lists and tuples). For
19911990
example the following calls are all equivalent::
19921991
@@ -2006,7 +2005,7 @@ def quote(*args):
20062005
else:
20072006
value = args[0]
20082007
if not isinstance(value, (list, tuple)):
2009-
return pipes.quote(value)
2008+
return shlex.quote(value)
20102009
return ' '.join(map(quote, value))
20112010

20122011

0 commit comments

Comments
 (0)