shlex_split should return unicode #1115

Closed
jstenar opened this Issue Dec 7, 2011 · 2 comments

Comments

Projects
None yet
3 participants
@jstenar
Member

jstenar commented Dec 7, 2011

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 Dec 7, 2011

Closed

Shlex unicode #1116

@rkern

This comment has been minimized.

Show comment
Hide comment
@rkern

rkern Dec 7, 2011

Contributor

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

Contributor

rkern commented Dec 7, 2011

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

@jstenar

This comment has been minimized.

Show comment
Hide comment
@jstenar

jstenar Dec 8, 2011

Member

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

Member

jstenar commented Dec 8, 2011

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 in 790cb14 Dec 12, 2011

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment