davidhalter/jedi — pull request #58 by tkf (2012-11-10 19:16:44+00:00)
Title: Please support multi-byte string source

As current release of Jedi does not support unicode object for jedi.Script, I need to pass str object to it for Python 2.x. Also you commented "normally no unicode objects are being used." in TestRegression.test_unicode_script, so I suppose it is better to pass str object always. However, as you don't specify codec when calling `unicode` [1], passing multi-byte source fails with UnicodeDecodeError in current dev branch.

If you keep support for str object, I think the test I added must pass. I assume it fails. I think the failure can be fixed by passing `'replace'` or `'ignore'` to the third `errors` argument of `unicode`. You will need to wrap that in `if is_py3k`.

By the way, I couldn't check if the test fails or not, as I couldn't make your test suite work. Let's see how it works on travis...

[1] https://github.com/davidhalter/jedi/blob/8dd9952288cb29deaf36157ea466de5a97a5c669/jedi/api.py#L65