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

remove use of deprecated pipes module #12932

Merged
merged 2 commits into from Apr 30, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion IPython/core/magics/script.py
Expand Up @@ -213,7 +213,7 @@ async def _stream_communicate(process, cell):
*cmd,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
stdin=asyncio.subprocess.PIPE
stdin=asyncio.subprocess.PIPE,
)
)
except OSError as e:
Expand Down
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