This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push: new 99bede2dfb PHOENIX-7553 Python3.13 dropped support for pipes module (#2096) 99bede2dfb is described below commit 99bede2dfb0992640bc9b418fe63c1c6ff7e5790 Author: meszinorbi <104362890+meszino...@users.noreply.github.com> AuthorDate: Wed Apr 2 16:01:22 2025 +0200 PHOENIX-7553 Python3.13 dropped support for pipes module (#2096) --- bin/phoenix_utils.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/phoenix_utils.py b/bin/phoenix_utils.py index f10d27978a..e767c38a78 100755 --- a/bin/phoenix_utils.py +++ b/bin/phoenix_utils.py @@ -52,6 +52,15 @@ def tryDecode(input): except: return input +def tryQuote(unquoted_input): + """ Python 2/3 compatibility hack + """ + try: + from shlex import quote as cmd_quote + except ImportError: + from pipes import quote as cmd_quote + return cmd_quote(unquoted_input) + def findFileInPathWithoutRecursion(pattern, path): if not os.path.exists(path): return "" @@ -221,8 +230,7 @@ def shell_quote(args): return subprocess.list2cmdline(args) else: # pipes module isn't available on Windows - import pipes - return " ".join([pipes.quote(tryDecode(v)) for v in args]) + return " ".join([tryQuote(tryDecode(v)) for v in args]) def __set_java(): global java_home