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

Jörgen Stenarson Robert Kern Min RK
Jörgen Stenarson
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.

Jörgen Stenarson jstenar referenced this issue
Closed

Shlex unicode #1116

Robert Kern
Collaborator

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

Jörgen Stenarson
Collaborator

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

Min RK minrk closed this issue from a commit
Min RK 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
Min RK minrk closed this in 790cb14
Brian E. Granger ellisonbg referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
matthew von rocketstein mattvonrocketstein referenced this issue from a commit in mattvonrocketstein/ipython
Min RK 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.