Skip to content
This repository

shlex_split should return unicode #1115

Closed
jstenar opened this Issue December 07, 2011 · 2 comments

3 participants

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

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 December 12, 2011
Min RK 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 December 12, 2011
Brian E. Granger ellisonbg referenced this issue from a commit January 10, 2012
Commit has since been removed from the repository and is no longer available.
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.