third_party/pexpect
10 years agoMerge pull request #70 from pexpect/more-exacting-which
Thomas Kluyver [Tue, 10 Jun 2014 19:40:22 +0000 (12:40 -0700)]
Merge pull request #70 from pexpect/more-exacting-which

new function is_exe() makes existing which() more correct

10 years agoMerge pull request #71 from pexpect/replwrap-test-fixes
Thomas Kluyver [Tue, 10 Jun 2014 19:24:52 +0000 (12:24 -0700)]
Merge pull request #71 from pexpect/replwrap-test-fixes

Fixing various prompt issues with bash ReplWrapper

10 years agoMake execute permission check more explicit
Thomas Kluyver [Tue, 10 Jun 2014 18:57:20 +0000 (11:57 -0700)]
Make execute permission check more explicit

10 years agoMinor fixes for replwrap tests
Thomas Kluyver [Tue, 10 Jun 2014 18:48:59 +0000 (11:48 -0700)]
Minor fixes for replwrap tests

10 years agoPR #66: TypeError thrown by spawnu.readline()
jquast [Mon, 9 Jun 2014 00:02:59 +0000 (17:02 -0700)]
PR #66: TypeError thrown by spawnu.readline()

Submitted by @auntieNeo, fixes exception, "TypeError:
got <type 'str'> ('\r\n') as pattern" in spawnu.readline().

Bytes b'\r\n' was concatenated to u'unicode', causing an
exception to be thrown when using readline().

10 years agosyntaxerr: missing r'literal' for unset PS1
jquast [Sun, 8 Jun 2014 09:09:48 +0000 (02:09 -0700)]
syntaxerr: missing r'literal' for unset PS1

10 years agoSolaris support, tested on SmartOS from cron(1).
Jeff Quast [Sun, 8 Jun 2014 08:07:03 +0000 (08:07 +0000)]
Solaris support, tested on SmartOS from cron(1).

10 years agoFixing various prompt issues with bash ReplWrapper
jquast [Sun, 8 Jun 2014 03:54:18 +0000 (20:54 -0700)]
Fixing various prompt issues with bash ReplWrapper

allow matching a regular expression,
use setUp and tearDown to putenv & getenv PS1, PS2
unset PROMPT_COMMAND

10 years agoProvide new 'is_exe' function used by 'which'
jquast [Sun, 8 Jun 2014 03:35:56 +0000 (20:35 -0700)]
Provide new 'is_exe' function used by 'which'

As noted by bug report http://bugs.python.org/issue14706,

"This is not a Python bug. os.access() is just a wrapper
 around the POSIX access() function"

http://pubs.opengroup.org/onlinepubs/9699919799/functions/faccessat.html

""" If any access permissions are checked, each shall be
    checked individually, as described in XBD File Access
    Permissions, except that where that description refers
    to execute permission for a process with appropriate
    privileges, an implementation may indicate success for
    X_OK even if execute permission is not granted to any
    user.
"""

10 years agoExpand on tests/test_which.py
jquast [Sun, 8 Jun 2014 03:35:05 +0000 (20:35 -0700)]
Expand on tests/test_which.py

Mainly, regarding os.defpath, os.environ['PATH'],
absolute, relative, and symlinks.

10 years agoSeparate which tests into test_which.py
jquast [Sun, 8 Jun 2014 02:47:17 +0000 (19:47 -0700)]
Separate which tests into test_which.py

10 years agoMerge branch 'interact-does-not-detect-eof' into issue-44-solaris-try-3
Jeff Quast [Fri, 6 Jun 2014 14:14:45 +0000 (14:14 +0000)]
Merge branch 'interact-does-not-detect-eof' into issue-44-solaris-try-3

10 years agoFor python3, exceptions should use "as err", not ", err"
jquast [Sun, 8 Jun 2014 04:45:22 +0000 (21:45 -0700)]
For python3, exceptions should use "as err", not ", err"

10 years agopython3.2 accommodations
jquast [Sun, 8 Jun 2014 04:37:36 +0000 (21:37 -0700)]
python3.2 accommodations

10 years agoDocument and detect EOF condition in interact()
jquast [Sun, 8 Jun 2014 04:35:16 +0000 (21:35 -0700)]
Document and detect EOF condition in interact()

10 years agoImprove EOF through test -> interact -> echo_prompt
jquast [Sun, 8 Jun 2014 04:25:20 +0000 (21:25 -0700)]
Improve EOF through test -> interact -> echo_prompt

10 years agoMerge branch 'more-exacting-which' into issue-44-solaris-try-3
Jeff Quast [Fri, 6 Jun 2014 14:14:39 +0000 (14:14 +0000)]
Merge branch 'more-exacting-which' into issue-44-solaris-try-3

10 years agoMerge branch 'replwrap-test-fixes' into issue-44-solaris-try-3
Jeff Quast [Fri, 6 Jun 2014 14:14:36 +0000 (14:14 +0000)]
Merge branch 'replwrap-test-fixes' into issue-44-solaris-try-3

10 years agoTests for wrapping Python shell
Thomas Kluyver [Thu, 5 Jun 2014 01:26:02 +0000 (18:26 -0700)]
Tests for wrapping Python shell

10 years agoSome more test coverage for fdpexpect
Thomas Kluyver [Thu, 5 Jun 2014 00:45:37 +0000 (17:45 -0700)]
Some more test coverage for fdpexpect

10 years agoMark a few unsupported code paths as not needed for test coverage
Thomas Kluyver [Thu, 5 Jun 2014 00:33:00 +0000 (17:33 -0700)]
Mark a few unsupported code paths as not needed for test coverage

10 years agoTest escaping interact mode
Thomas Kluyver [Thu, 5 Jun 2014 00:28:04 +0000 (17:28 -0700)]
Test escaping interact mode

10 years agoAdd another test for ANSI terminal emulation
Thomas Kluyver [Thu, 5 Jun 2014 00:10:53 +0000 (17:10 -0700)]
Add another test for ANSI terminal emulation

10 years agoRemove pexpect.psh - it was undocumented and seemingly unused
Thomas Kluyver [Wed, 4 Jun 2014 23:28:44 +0000 (16:28 -0700)]
Remove pexpect.psh - it was undocumented and seemingly unused

Closes gh-66

10 years agoMerge pull request #63 from takluyver/use-pytest
Thomas Kluyver [Mon, 2 Jun 2014 19:29:21 +0000 (12:29 -0700)]
Merge pull request #63 from takluyver/use-pytest

Use py.test for tests

10 years agoAllow subprocess tests to import pexpect
Thomas Kluyver [Mon, 2 Jun 2014 05:33:48 +0000 (22:33 -0700)]
Allow subprocess tests to import pexpect

10 years agoUse no_coverage_env() in some more tests
Thomas Kluyver [Mon, 2 Jun 2014 05:22:52 +0000 (22:22 -0700)]
Use no_coverage_env() in some more tests

10 years agoMerge pull request #46 from a-tal/master
Jeff Quast [Mon, 2 Jun 2014 03:52:21 +0000 (20:52 -0700)]
Merge pull request #46 from a-tal/master

remove redundant raise in __pty_make_controlling_tty()

10 years agoDon't install into virtualenv in Travis - test local copy
Thomas Kluyver [Mon, 2 Jun 2014 03:34:07 +0000 (20:34 -0700)]
Don't install into virtualenv in Travis - test local copy

10 years agoIgnore coverage env var if not set
Thomas Kluyver [Mon, 2 Jun 2014 03:29:24 +0000 (20:29 -0700)]
Ignore coverage env var if not set

10 years agoSkip performance tests on PyPy
Thomas Kluyver [Mon, 2 Jun 2014 03:25:42 +0000 (20:25 -0700)]
Skip performance tests on PyPy

10 years agoDon't try to measure coverage in some Python subprocesses
Thomas Kluyver [Mon, 2 Jun 2014 03:06:40 +0000 (20:06 -0700)]
Don't try to measure coverage in some Python subprocesses

10 years agoRemove 'make test' target
Thomas Kluyver [Mon, 2 Jun 2014 01:09:12 +0000 (18:09 -0700)]
Remove 'make test' target

10 years agoRemove ancient script for testing on Sourceforge compile farm (long since gone)
Thomas Kluyver [Mon, 2 Jun 2014 01:06:20 +0000 (18:06 -0700)]
Remove ancient script for testing on Sourceforge compile farm (long since gone)

10 years agoRemove old test runner machinery
Thomas Kluyver [Mon, 2 Jun 2014 01:05:25 +0000 (18:05 -0700)]
Remove old test runner machinery

10 years agoUpdate DEVELOPERS file
Thomas Kluyver [Mon, 2 Jun 2014 01:04:46 +0000 (18:04 -0700)]
Update DEVELOPERS file

10 years agoUse py.test on Travis
Thomas Kluyver [Mon, 2 Jun 2014 00:59:47 +0000 (17:59 -0700)]
Use py.test on Travis

10 years agoFix imports in tests for Python 3
Thomas Kluyver [Mon, 2 Jun 2014 00:51:34 +0000 (17:51 -0700)]
Fix imports in tests for Python 3

Closes gh-59

10 years agoDon't rely on environment variable set in test.env
Thomas Kluyver [Mon, 2 Jun 2014 00:35:23 +0000 (17:35 -0700)]
Don't rely on environment variable set in test.env

10 years agoRename platform checks so py.test doesn't try to run them
Thomas Kluyver [Mon, 2 Jun 2014 00:34:57 +0000 (17:34 -0700)]
Rename platform checks so py.test doesn't try to run them

10 years agoMove (/remove) platform_tests folder which doesn't contain real tests
Thomas Kluyver [Mon, 2 Jun 2014 00:22:11 +0000 (17:22 -0700)]
Move (/remove) platform_tests folder which doesn't contain real tests

10 years agoMerge pull request #62 from pexpect/pull-37-try-3
Jeff Quast [Mon, 2 Jun 2014 03:30:47 +0000 (20:30 -0700)]
Merge pull request #62 from pexpect/pull-37-try-3

folders should not be returned by pexpect.which()

10 years agorewrite history
jquast [Mon, 2 Jun 2014 00:57:26 +0000 (17:57 -0700)]
rewrite history

10 years agoremove all unnecessary imports
jquast [Mon, 2 Jun 2014 00:56:30 +0000 (17:56 -0700)]
remove all unnecessary imports

10 years agofolders should not be returned by pexpect.which()
jquast [Mon, 2 Jun 2014 00:33:50 +0000 (17:33 -0700)]
folders should not be returned by pexpect.which()

10 years agoMerge pull request #51 from takluyver/replwrap
Thomas Kluyver [Sun, 1 Jun 2014 06:10:41 +0000 (23:10 -0700)]
Merge pull request #51 from takluyver/replwrap

Add high level API for wrapping REPLs

10 years agoUse bash for testing replwrap, avoiding PyPy's different REPL
Thomas Kluyver [Sun, 1 Jun 2014 00:21:30 +0000 (17:21 -0700)]
Use bash for testing replwrap, avoiding PyPy's different REPL

10 years agoTry fixing Travis test runs
Thomas Kluyver [Mon, 19 May 2014 04:50:09 +0000 (21:50 -0700)]
Try fixing Travis test runs

10 years agoUse explicit positional string formatting for Python 2.6
Thomas Kluyver [Mon, 19 May 2014 04:48:37 +0000 (21:48 -0700)]
Use explicit positional string formatting for Python 2.6

10 years agoUpdate replwrap docs
Thomas Kluyver [Sun, 18 May 2014 22:31:25 +0000 (15:31 -0700)]
Update replwrap docs

10 years agoFormat the new prompts into the prompt change command, simplifying instantiation...
Thomas Kluyver [Sun, 18 May 2014 22:25:22 +0000 (15:25 -0700)]
Format the new prompts into the prompt change command, simplifying instantiation of a REPLWrapper

10 years agoFix another unicode literal for Python 3.2
Thomas Kluyver [Sun, 18 May 2014 22:16:30 +0000 (15:16 -0700)]
Fix another unicode literal for Python 3.2

10 years agoHandle multiline commands in replwrap
Thomas Kluyver [Sun, 18 May 2014 22:11:10 +0000 (15:11 -0700)]
Handle multiline commands in replwrap

10 years agoWrap unicode literals in function calls for Python 3.2
Thomas Kluyver [Sun, 18 May 2014 21:36:23 +0000 (14:36 -0700)]
Wrap unicode literals in function calls for Python 3.2

10 years agoMerge pull request #53 from takluyver/rm-install-doc
Thomas Kluyver [Tue, 13 May 2014 18:57:04 +0000 (11:57 -0700)]
Merge pull request #53 from takluyver/rm-install-doc

Remove out of date INSTALL doc

10 years agoRemove out of date INSTALL doc
Thomas Kluyver [Tue, 13 May 2014 18:48:42 +0000 (11:48 -0700)]
Remove out of date INSTALL doc

Closes gh-52

10 years agoDocument when replwrap was added
Thomas Kluyver [Tue, 13 May 2014 00:30:17 +0000 (17:30 -0700)]
Document when replwrap was added

10 years agoAdd high level API for wrapping REPLs
Thomas Kluyver [Tue, 13 May 2014 00:11:08 +0000 (17:11 -0700)]
Add high level API for wrapping REPLs

10 years agoAdd long description (copied part of README)
Thomas Kluyver [Tue, 15 Apr 2014 01:34:32 +0000 (18:34 -0700)]
Add long description (copied part of README)

10 years agoBump version number for 3.2
Thomas Kluyver [Tue, 15 Apr 2014 01:31:30 +0000 (18:31 -0700)]
Bump version number for 3.2

10 years agoAdd release notes for 3.2
Thomas Kluyver [Mon, 14 Apr 2014 00:45:31 +0000 (17:45 -0700)]
Add release notes for 3.2

10 years agoremoves excepted raise
a-tal [Thu, 3 Apr 2014 20:48:49 +0000 (13:48 -0700)]
removes excepted raise

10 years agoMerge pull request #43 from pexpect/issue-42-cannot-implicit-bytes-to-str
Jeff Quast [Sat, 8 Mar 2014 01:28:15 +0000 (17:28 -0800)]
Merge pull request #43 from pexpect/issue-42-cannot-implicit-bytes-to-str

closes issue #42, self.buffer decoded implicitly

10 years agodisplay expected prompt as PROMPT, not PROMPT_SET_SH
jquast [Sat, 8 Mar 2014 01:22:01 +0000 (17:22 -0800)]
display expected prompt as PROMPT, not PROMPT_SET_SH

completes issue #44; thanks to @takluyver for keen eye.

10 years agoassertRaises is not 2.6->3.x compatible
jquast [Fri, 7 Mar 2014 07:05:43 +0000 (23:05 -0800)]
assertRaises is not 2.6->3.x compatible

10 years agocloses issue #42, self.buffer decoded implicitly
jquast [Fri, 7 Mar 2014 06:46:43 +0000 (22:46 -0800)]
closes issue #42, self.buffer decoded implicitly

create a unit tests which otherwise failed for python3 only: mock the
return value of set_unique_prompt for a value of False, which causes
ExceptionPxssh to raise.

previously, displaying self.buffer within the exception causes
bytes() to be implicitly decoded to str (unicode type in py3). python2
didn't care. it is implicitly decoded as 'ascii' encoding, without
warning.

Then, use the %r to represent it as b'xyz' in python3. Also, display
what we expected to be more helpful for the user. What is actually
happening here is the 'set PS1=' command is used so that pexpect can
more regularly understand when the prompt is awaiting command input, and
it is set to something more predictable. You'd be suprised what kind of
hackery can happen to prompt values even if PS1 is explicitly set,
especially in today's oh-my-zhs and git-prompt.sh extensions.

10 years agoMerge pull request #41 from chrismerck/patch-1
Thomas Kluyver [Thu, 20 Feb 2014 20:00:13 +0000 (12:00 -0800)]
Merge pull request #41 from chrismerck/patch-1

FAQ.rst: Removed redundant paragraph.

10 years agoFAQ.rst: Removed redundant paragraph.
Chris Merck [Thu, 20 Feb 2014 15:47:26 +0000 (10:47 -0500)]
FAQ.rst: Removed redundant paragraph.

10 years agoMerge pull request #40 from emaste/master
Thomas Kluyver [Thu, 13 Feb 2014 20:11:22 +0000 (12:11 -0800)]
Merge pull request #40 from emaste/master

Remove workaround for bug affecting very old platforms

10 years agoRemove workaround for bug affecting very old platforms
Ed Maste [Thu, 13 Feb 2014 18:35:20 +0000 (13:35 -0500)]
Remove workaround for bug affecting very old platforms

https://github.com/pexpect/pexpect/issues/39

10 years agoMerge pull request #38 from mattprintz/master
Thomas Kluyver [Fri, 7 Feb 2014 17:50:57 +0000 (09:50 -0800)]
Merge pull request #38 from mattprintz/master

Bug: AttributeError: 'error' object has no attribute 'errno'

10 years agoFixing test for signal interrupt exception
Matthew Printz [Thu, 6 Feb 2014 23:49:09 +0000 (17:49 -0600)]
Fixing test for signal interrupt exception

10 years agoAdding test to for signal handling error
Matthew Printz [Thu, 6 Feb 2014 18:25:43 +0000 (12:25 -0600)]
Adding test to for signal handling error

10 years agoSimplifying code to use format of select.error arguments that works in both Py27...
Matthew Printz [Wed, 5 Feb 2014 23:58:13 +0000 (17:58 -0600)]
Simplifying code to use format of select.error arguments that works in both Py27 and Py3

10 years agoFixing issue where errno does not exist on select.error
Matthew Printz [Tue, 4 Feb 2014 19:16:27 +0000 (13:16 -0600)]
Fixing issue where errno does not exist on select.error

10 years agoMerge pull request #36 from takluyver/pxssh-docs
Thomas Kluyver [Tue, 28 Jan 2014 02:26:41 +0000 (18:26 -0800)]
Merge pull request #36 from takluyver/pxssh-docs

Pxssh docs

10 years agoUpdate pxssh example for Python 3
Thomas Kluyver [Fri, 24 Jan 2014 00:05:11 +0000 (16:05 -0800)]
Update pxssh example for Python 3

10 years agoDocument force_password attribute
Thomas Kluyver [Fri, 24 Jan 2014 00:02:33 +0000 (16:02 -0800)]
Document force_password attribute

10 years agoPolish pxssh docstrings
Thomas Kluyver [Thu, 23 Jan 2014 23:54:59 +0000 (15:54 -0800)]
Polish pxssh docstrings

10 years agoMake code style more regular
Thomas Kluyver [Thu, 23 Jan 2014 23:40:48 +0000 (15:40 -0800)]
Make code style more regular

10 years agoFix documentation of using auto_prompt_reset.
Thomas Kluyver [Thu, 23 Jan 2014 23:36:39 +0000 (15:36 -0800)]
Fix documentation of using auto_prompt_reset.

Closes gh-35

10 years agoPrepare for 3.1 release
Thomas Kluyver [Wed, 22 Jan 2014 18:44:23 +0000 (10:44 -0800)]
Prepare for 3.1 release

10 years agoSquash some Sphinx warnings
Thomas Kluyver [Wed, 22 Jan 2014 18:33:47 +0000 (10:33 -0800)]
Squash some Sphinx warnings

10 years agoMerge pull request #29 from takluyver/examples-main-blocks
Thomas Kluyver [Wed, 8 Jan 2014 00:35:36 +0000 (16:35 -0800)]
Merge pull request #29 from takluyver/examples-main-blocks

Don't catch unhandled exceptions in examples.

10 years agoMerge pull request #31 from takluyver/stdout-bytes-py3
Thomas Kluyver [Tue, 7 Jan 2014 23:08:07 +0000 (15:08 -0800)]
Merge pull request #31 from takluyver/stdout-bytes-py3

Allow importing when sys.stdout is reassigned on Python 3

10 years agoMerge pull request #34 from offby1/master
Thomas Kluyver [Tue, 7 Jan 2014 22:21:22 +0000 (14:21 -0800)]
Merge pull request #34 from offby1/master

ExceptionPexpect.__init__: invoke super's init

10 years agoTest for previous commit
Eric Hanchrow [Tue, 7 Jan 2014 20:46:56 +0000 (12:46 -0800)]
Test for previous commit

10 years agoMerge pull request #33 from aho-iridium/master
Thomas Kluyver [Tue, 7 Jan 2014 20:13:00 +0000 (12:13 -0800)]
Merge pull request #33 from aho-iridium/master

Correctly handle when select in spawn returns with an error (e.g. SIGWINCH...

10 years agoExceptionPexpect.__init__: invoke super's init
Eric Hanchrow [Tue, 7 Jan 2014 00:06:02 +0000 (16:06 -0800)]
ExceptionPexpect.__init__: invoke super's init

This avoids an exception in the following:

        import pexpect
        import pickle
        pickle.loads(pickle.dumps(pexpect.EOF('hey you')))

10 years agoCorrect handle when select in spawn returns with an error (e.g. SIGWINCH)
Alex Ho [Tue, 31 Dec 2013 05:44:06 +0000 (21:44 -0800)]
Correct handle when select in spawn returns with an error (e.g. SIGWINCH)

10 years agoAllow importing when sys.stdout is reassigned on Python 3
Thomas Kluyver [Thu, 19 Dec 2013 00:26:30 +0000 (16:26 -0800)]
Allow importing when sys.stdout is reassigned on Python 3

Closes gh-30

10 years agoDon't catch unhandled exceptions in examples.
Thomas Kluyver [Fri, 13 Dec 2013 17:53:11 +0000 (09:53 -0800)]
Don't catch unhandled exceptions in examples.

Let Python handle printing a traceback and exiting in these cases.

10 years agoMerge pull request #28 from joeledwards/master
Thomas Kluyver [Wed, 11 Dec 2013 19:07:07 +0000 (11:07 -0800)]
Merge pull request #28 from joeledwards/master

pxssh prompt synchronization and new parameters

10 years agoMerge branch 'master' of github.com:joeledwards/pexpect
Joel Edwards [Wed, 11 Dec 2013 14:39:47 +0000 (07:39 -0700)]
Merge branch 'master' of github.com:joeledwards/pexpect

Conflicts:
pexpect/pxssh.py

10 years agoCleanup of unused import and loop exit strategy in try_read_prompt
Joel Edwards [Tue, 10 Dec 2013 22:58:47 +0000 (15:58 -0700)]
Cleanup of unused import and loop exit strategy in try_read_prompt

10 years agoSwitched to a simpler approache for appending to the prompt
Joel Edwards [Tue, 10 Dec 2013 21:22:11 +0000 (14:22 -0700)]
Switched to a simpler approache for appending to the prompt
in try_read_prompt thanks to a suggestion from takluyver

10 years agoRemoved call to self._coerce_read_string in try_read_prompt
Joel Edwards [Tue, 10 Dec 2013 21:18:07 +0000 (14:18 -0700)]
Removed call to self._coerce_read_string in try_read_prompt
This was an artifact from my attempt at adding support for non ASCII
character encodings in a prior commit.

10 years agoRemoved coerce_result argument from pexpect read_nonblocking method.
Joel Edwards [Tue, 10 Dec 2013 20:38:11 +0000 (13:38 -0700)]
Removed coerce_result argument from pexpect read_nonblocking method.

10 years ago__init__.py (pexpect)
Joel Edwards [Tue, 10 Dec 2013 12:46:47 +0000 (05:46 -0700)]
__init__.py (pexpect)
- updated the read_nonblocking method to take a new boolean coerce_result
  argument

pxssh.py
- updated try_read_prompt to support python 2.x/3.x results from os.read
  (string/binary respectively)

10 years agoCleaned up prompt synchronization
Joel Edwards [Wed, 4 Dec 2013 10:01:39 +0000 (03:01 -0700)]
Cleaned up prompt synchronization