Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport PR #12932: remove use of deprecated pipes module #12935

Merged
merged 1 commit into from Apr 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions IPython/lib/editorhooks.py
Expand Up @@ -6,7 +6,6 @@
"""

import os
import pipes
import shlex
import subprocess
import sys
Expand Down Expand Up @@ -47,9 +46,9 @@ def install_editor(template, wait=False):
def call_editor(self, filename, line=0):
if line is None:
line = 0
cmd = template.format(filename=pipes.quote(filename), line=line)
cmd = template.format(filename=shlex.quote(filename), line=line)
print(">", cmd)
# pipes.quote doesn't work right on Windows, but it does after splitting
# shlex.quote doesn't work right on Windows, but it does after splitting
if sys.platform.startswith('win'):
cmd = shlex.split(cmd)
proc = subprocess.Popen(cmd, shell=True)
Expand Down