workaround spawnb missing from pexpect.__all__ #1101

Closed
wants to merge 1 commit into
from

2 participants

@minrk
IPython member

@takluyver's pexpect-u is unicode-ready, and we handle it, but
spawnb is not in __all__ (at least in the 2.5 release), so our
check for it here
fails, and we use the unicode output, calling decode on it directly,
which would raise UnicodeError on things like ls in a dir with unicode files.

This manually assigns pexpect.spawnb, not trusting that it will be included in
from pexpect import *.

@minrk minrk workaround spawnb missing from pexpect.__all__
@takluyver's pexpect-u is unicode-ready, and we handle it, but
spawnb is not in `__all__` (at least in the 2.5 release), so our
check for it [here](https://github.com/ipython/ipython/blob/master/IPython/utils/_process_posix.py#L151)
fails, and we use the unicode output, calling `decode` on it directly,
which would raise UnicodeError on things like `ls` in a dir with unicode files.

This manually assigns `pexpect.spawnb`, not trusting that it will be included in
`from pexpect import *`.
40b5719
@takluyver
IPython member

Since there's probably no-one using pexpect-u yet, would it make more sense to just add spawnb to __all__, and then release the corresponding version as 2.5.1?

@minrk
IPython member
@takluyver
IPython member
@minrk
IPython member

That's fine. I'll just close this, noting that IPython requires pexpect-u ≥ 2.5.1.

@minrk minrk closed this Dec 5, 2011
@takluyver
IPython member

Released pexpect 2.5.1, equivalent to the version we bundle in IPython.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment