Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

shlex_split should return unicode #1115

Closed
jstenar opened this Issue · 2 comments

3 participants

@jstenar
Collaborator

I get tracebacks when completing on filenames with non-ascii characters in the %run command. I have traced it to shlex_split that converts its argument to string on python 2.x due to a bug in the underlying shlex.split for unicode arguments. However it should convert the result back to unicode after the call.

@jstenar jstenar referenced this issue
Closed

Shlex unicode #1116

@rkern

We have a unicode-safe version of shlex.split() in IPython/utils/_process_common.py as arg_split().

@jstenar
Collaborator

My latest push to #1116 remove the old shlex_split and calls arg_split instead. Added some tests for magic_run_completer.

@minrk minrk closed this issue from a commit
@minrk minrk Merge shlex PRs (#1130, #1116)
* arg_split now takes optional strict flag, to ignore ValueErrors in
  shlex parsing
* %timeit uses strict=False, to avoid errors parsing python code
* %run completer uses arg_split(strict=False) for its unicode behavior, instead
  of custom shlex derivative, which is now redundant.

closes #1109
closes #1115
closes #1116
closes #1130
790cb14
@minrk minrk closed this in 790cb14
@ellisonbg ellisonbg referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@mattvonrocketstein mattvonrocketstein referenced this issue from a commit in mattvonrocketstein/ipython
@minrk minrk Merge shlex PRs (#1130, #1116)
* arg_split now takes optional strict flag, to ignore ValueErrors in
  shlex parsing
* %timeit uses strict=False, to avoid errors parsing python code
* %run completer uses arg_split(strict=False) for its unicode behavior, instead
  of custom shlex derivative, which is now redundant.

closes #1109
closes #1115
closes #1116
closes #1130
5799471
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.