Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a9c5e02

Browse files
committed
remove use of deprecated pipes module
pipes.quote is actually an alias to shlex.quote deprecated by PEP 594, to be removed in 3.10
1 parent e4ce502 commit a9c5e02

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

IPython/lib/editorhooks.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"""
77

88
import os
9-
import pipes
109
import shlex
1110
import subprocess
1211
import sys
@@ -47,9 +46,9 @@ def install_editor(template, wait=False):
4746
def call_editor(self, filename, line=0):
4847
if line is None:
4948
line = 0
50-
cmd = template.format(filename=pipes.quote(filename), line=line)
49+
cmd = template.format(filename=shlex.quote(filename), line=line)
5150
print(">", cmd)
52-
# pipes.quote doesn't work right on Windows, but it does after splitting
51+
# shlex.quote doesn't work right on Windows, but it does after splitting
5352
if sys.platform.startswith('win'):
5453
cmd = shlex.split(cmd)
5554
proc = subprocess.Popen(cmd, shell=True)

0 commit comments

Comments
 (0)