third_party/pexpect
4 years agoMerge pull request #173 from takluyver/update-tooling master
Jeff Quast [Mon, 19 Jan 2015 22:55:54 +0000 (14:55 -0800)]
Merge pull request #173 from takluyver/update-tooling

Update tooling

4 years agoUpdate tests README
Thomas Kluyver [Mon, 19 Jan 2015 22:52:18 +0000 (14:52 -0800)]
Update tests README

4 years agoRemove outdated Makefile
Thomas Kluyver [Mon, 19 Jan 2015 22:52:09 +0000 (14:52 -0800)]
Remove outdated Makefile

4 years agoMerge pull request #106 from pexpect/issue-104-cannot-exec-setuids
Thomas Kluyver [Sun, 21 Dec 2014 00:46:43 +0000 (16:46 -0800)]
Merge pull request #106 from pexpect/issue-104-cannot-exec-setuids

Issue 104 cannot exec setuids

4 years agoComment on the cause for 'group executable' == no
Jeff Quast [Sat, 20 Dec 2014 02:46:35 +0000 (18:46 -0800)]
Comment on the cause for 'group executable' == no

4 years agoMerge pull request #164 from takluyver/contextmanager
Jeff Quast [Sat, 20 Dec 2014 02:03:13 +0000 (18:03 -0800)]
Merge pull request #164 from takluyver/contextmanager

Allow spawn() and friends to be used as context managers

4 years agoMerge remote-tracking branch 'origin/master' into issue-104-cannot-exec-setuids
Jeff Quast [Sat, 20 Dec 2014 01:55:11 +0000 (17:55 -0800)]
Merge remote-tracking branch 'origin/master' into issue-104-cannot-exec-setuids

4 years agoMerge pull request #165 from takluyver/faster-travis
Jeff Quast [Sat, 20 Dec 2014 01:52:43 +0000 (17:52 -0800)]
Merge pull request #165 from takluyver/faster-travis

Speed up Travis builds

4 years agoSpeed up Travis builds
Thomas Kluyver [Sat, 20 Dec 2014 01:47:52 +0000 (17:47 -0800)]
Speed up Travis builds

Skip installing apt python-yaml package, pip reinstalls it anyway.

Use new Travis containerised stack.

4 years agoMerge pull request #158 from takluyver/preexec_fn
Thomas Kluyver [Sat, 20 Dec 2014 01:11:34 +0000 (17:11 -0800)]
Merge pull request #158 from takluyver/preexec_fn

Expose preexec_fn from ptyprocess

4 years agoAllow spawn() and friends to be used as context managers
Thomas Kluyver [Sat, 20 Dec 2014 01:05:18 +0000 (17:05 -0800)]
Allow spawn() and friends to be used as context managers

Closes gh-111

4 years agoUpdate test case for preexec_fn
Thomas Kluyver [Sat, 20 Dec 2014 00:47:54 +0000 (16:47 -0800)]
Update test case for preexec_fn

4 years agouninstall ptyprocess before install in runtests.sh
Jeff Quast [Fri, 19 Dec 2014 07:33:39 +0000 (23:33 -0800)]
uninstall ptyprocess before install in runtests.sh

4 years agoMerge remote-tracking branch 'origin/master' into issue-104-cannot-exec-setuids
Jeff Quast [Fri, 19 Dec 2014 01:36:05 +0000 (17:36 -0800)]
Merge remote-tracking branch 'origin/master' into issue-104-cannot-exec-setuids

Conflicts:
pexpect/__init__.py

4 years agoAllow the user to specify a preexec_fn, which will be passed to ptyprocess
Thomas Kluyver [Thu, 11 Dec 2014 21:50:11 +0000 (13:50 -0800)]
Allow the user to specify a preexec_fn, which will be passed to ptyprocess

4 years agoptyprocess API changed to a single preexec_fn function
Thomas Kluyver [Thu, 11 Dec 2014 21:40:40 +0000 (13:40 -0800)]
ptyprocess API changed to a single preexec_fn function

4 years agoAdd requirements file for docs build
Thomas Kluyver [Sat, 29 Nov 2014 19:05:44 +0000 (11:05 -0800)]
Add requirements file for docs build

4 years agoMerge pull request #154 from pexpect/resolve-eof-unicode-osx-sunos
Thomas Kluyver [Fri, 28 Nov 2014 19:25:08 +0000 (11:25 -0800)]
Merge pull request #154 from pexpect/resolve-eof-unicode-osx-sunos

Resolve EOF error in test_interact.py for OSX and SunOs

4 years agorevert echo/interact sub-proc UTF8 wrappers
Jeff Quast [Thu, 27 Nov 2014 22:50:41 +0000 (14:50 -0800)]
revert echo/interact sub-proc UTF8 wrappers

4 years agoexport LANG=en_US.UTF-8 in teamcity-runtests.sh
Jeff Quast [Thu, 27 Nov 2014 22:50:07 +0000 (14:50 -0800)]
export LANG=en_US.UTF-8 in teamcity-runtests.sh

4 years agomove locale display before try-clause for non-ttys
Jeff Quast [Thu, 27 Nov 2014 22:47:34 +0000 (14:47 -0800)]
move locale display before try-clause for non-ttys

4 years agoDisplay locale in tools/display-terminalinfo.py
Jeff Quast [Thu, 27 Nov 2014 22:40:54 +0000 (14:40 -0800)]
Display locale in tools/display-terminalinfo.py

4 years agoutf8 stdin/stdout in interact and echo_w_prompt
Jeff Quast [Thu, 27 Nov 2014 22:38:28 +0000 (14:38 -0800)]
utf8 stdin/stdout in interact and echo_w_prompt

4 years agoexport PYTHONIOENCODING=UTF8 in test runner
Jeff Quast [Thu, 27 Nov 2014 22:25:09 +0000 (14:25 -0800)]
export PYTHONIOENCODING=UTF8 in test runner

4 years agoMerge pull request #151 from pexpect/teamcity-coverage-support
Thomas Kluyver [Tue, 25 Nov 2014 23:51:55 +0000 (15:51 -0800)]
Merge pull request #151 from pexpect/teamcity-coverage-support

Teamcity coverage support

4 years agoMerge pull request #79 from pexpect/doc-and-test-max-canon
Thomas Kluyver [Tue, 25 Nov 2014 20:03:39 +0000 (12:03 -0800)]
Merge pull request #79 from pexpect/doc-and-test-max-canon

Test and document PC_MAX_CANON.

4 years agoMerge pull request #153 from pexpect/make-run-timeout-explicit
Thomas Kluyver [Tue, 25 Nov 2014 19:58:47 +0000 (11:58 -0800)]
Merge pull request #153 from pexpect/make-run-timeout-explicit

Change run* timeout=-1 -> timeout=30

4 years agoMerge pull request #152 from pexpect/prevent-forking-testrunner
Thomas Kluyver [Tue, 25 Nov 2014 19:56:40 +0000 (11:56 -0800)]
Merge pull request #152 from pexpect/prevent-forking-testrunner

Propose test-runner fork-prevention scheme

4 years agoall together -> altogether (thanks TK)
Jeff Quast [Tue, 25 Nov 2014 19:01:24 +0000 (11:01 -0800)]
all together -> altogether (thanks TK)

4 years agoChange run* timeout=-1 -> timeout=30
Jeff Quast [Tue, 25 Nov 2014 07:27:52 +0000 (23:27 -0800)]
Change run* timeout=-1 -> timeout=30

Leave the "if timeout == -1" in spawn intact, for any
poor fool who explicitly set timeout of -1 to implicitly
mean timeout of 30.

4 years agoPropose test-runner fork prevention scheme
Jeff Quast [Tue, 25 Nov 2014 05:39:41 +0000 (21:39 -0800)]
Propose test-runner fork prevention scheme

4 years agoStrange intermittent travis-ci on-pypy failure
Jeff Quast [Tue, 25 Nov 2014 05:22:05 +0000 (21:22 -0800)]
Strange intermittent travis-ci on-pypy failure

4 years agoDisplay signal handlers on Travis-CI as well
Jeff Quast [Tue, 25 Nov 2014 05:12:10 +0000 (21:12 -0800)]
Display signal handlers on Travis-CI as well

4 years agoMore non-TTY support for display-terminalinfo.py
Jeff Quast [Tue, 25 Nov 2014 05:07:01 +0000 (21:07 -0800)]
More non-TTY support for display-terminalinfo.py

4 years agoTeamCity build agents, however, are not TTY's
Jeff Quast [Tue, 25 Nov 2014 05:05:03 +0000 (21:05 -0800)]
TeamCity build agents, however, are not TTY's

4 years agopy3 compatibility for display-terminalinfo.py
Jeff Quast [Tue, 25 Nov 2014 04:55:56 +0000 (20:55 -0800)]
py3 compatibility for display-terminalinfo.py

4 years agoMake some desperate attempts at partial-Travis-CI
Jeff Quast [Tue, 25 Nov 2014 04:53:01 +0000 (20:53 -0800)]
Make some desperate attempts at partial-Travis-CI

4 years agoDisplay terminal info on Travis-CI
Jeff Quast [Tue, 25 Nov 2014 04:48:07 +0000 (20:48 -0800)]
Display terminal info on Travis-CI

4 years agoThis should now pass on Linux
Jeff Quast [Tue, 25 Nov 2014 04:41:58 +0000 (20:41 -0800)]
This should now pass on Linux

4 years agodocstring grammer fixes in send*() function
Jeff Quast [Tue, 25 Nov 2014 04:32:57 +0000 (20:32 -0800)]
docstring grammer fixes in send*() function

4 years agoRevert back to N_TTY_BUF_SIZE + 1 for Linux
Jeff Quast [Tue, 25 Nov 2014 04:29:51 +0000 (20:29 -0800)]
Revert back to N_TTY_BUF_SIZE + 1 for Linux

4 years agoSeemingly, linux only BEL's on echo=True
Jeff Quast [Tue, 25 Nov 2014 04:25:59 +0000 (20:25 -0800)]
Seemingly, linux only BEL's on echo=True

4 years agoclarify title
Jeff Quast [Tue, 25 Nov 2014 04:18:29 +0000 (20:18 -0800)]
clarify title

4 years agoFix failing tests, on OSX at least. Pushing ..
Jeff Quast [Tue, 25 Nov 2014 04:17:41 +0000 (20:17 -0800)]
Fix failing tests, on OSX at least. Pushing ..

4 years agoTell about MAX_CANON in send*() functions
Jeff Quast [Tue, 25 Nov 2014 04:00:32 +0000 (20:00 -0800)]
Tell about MAX_CANON in send*() functions

4 years agoMerge remote-tracking branch 'origin/master' into doc-and-test-max-canon
Jeff Quast [Tue, 25 Nov 2014 04:00:09 +0000 (20:00 -0800)]
Merge remote-tracking branch 'origin/master' into doc-and-test-max-canon

Conflicts:
pexpect/__init__.py
tests/test_misc.py

4 years agoFix TeamCity Service Messages, 'key', not '<key>'
Jeff Quast [Tue, 25 Nov 2014 01:30:58 +0000 (17:30 -0800)]
Fix TeamCity Service Messages, 'key', not '<key>'

4 years agoFix quoting of TeamCity Service Message
Jeff Quast [Tue, 25 Nov 2014 01:25:49 +0000 (17:25 -0800)]
Fix quoting of TeamCity Service Message

4 years agoFix awk: redirect in coverage_file
Jeff Quast [Tue, 25 Nov 2014 01:22:39 +0000 (17:22 -0800)]
Fix awk: redirect in coverage_file

4 years agoFix TeamCity Service Message quoting
Jeff Quast [Tue, 25 Nov 2014 01:18:08 +0000 (17:18 -0800)]
Fix TeamCity Service Message quoting

4 years agoAllow teamcity to track coverage for builds
Jeff Quast [Tue, 25 Nov 2014 01:08:54 +0000 (17:08 -0800)]
Allow teamcity to track coverage for builds

We'll still use coveralls.io, though! This
just makes it so that TeamCity is aware of
change of code coverage when viewing build
results.

4 years agoMerge pull request #150 from nad2000/master
Thomas Kluyver [Tue, 25 Nov 2014 00:59:32 +0000 (16:59 -0800)]
Merge pull request #150 from nad2000/master

allow user to specify SSH options via pxssh.options dictionary

4 years agoallow user to specify SSH options via the constructor parametere options
Radomirs Cirskis [Tue, 25 Nov 2014 00:05:33 +0000 (13:05 +1300)]
allow user to specify SSH options via the constructor parametere options

4 years agoallow user to specify SSH options via pxssh.options dictionary
Rad Cirskis [Mon, 24 Nov 2014 23:20:34 +0000 (12:20 +1300)]
allow user to specify SSH options via pxssh.options dictionary

4 years agoMerge pull request #148 from jquast/unset-buildagent-signal-handlers
Jeff Quast [Mon, 24 Nov 2014 23:17:17 +0000 (15:17 -0800)]
Merge pull request #148 from jquast/unset-buildagent-signal-handlers

Unset ignored signal handlers by build agents

4 years agospellfix of 'exit'
Jeff Quast [Mon, 24 Nov 2014 23:08:27 +0000 (15:08 -0800)]
spellfix of 'exit'

4 years agoMerge pull request #149 from jquast/increase-replwrap-timeout
Thomas Kluyver [Mon, 24 Nov 2014 19:40:50 +0000 (11:40 -0800)]
Merge pull request #149 from jquast/increase-replwrap-timeout

Increase timeout of replwrap test from 2=>5

4 years agoIncrease timeout of replwrap test from 2=>5
Jeff Quast [Mon, 24 Nov 2014 05:41:57 +0000 (21:41 -0800)]
Increase timeout of replwrap test from 2=>5

The OSX build slave is almost as bad as travis, its very
sluggish -- Anyway this timeout condition occurs
intermittently presumably because it is too short

https://teamcity-master.pexpect.org/viewLog.html?buildId=782&buildTypeId=Pexpect_MacOs&tab=buildLog#_focus=499

4 years agoexit 0 for for runtests, #test failures dominate
Jeff Quast [Mon, 24 Nov 2014 05:07:43 +0000 (21:07 -0800)]
exit 0 for for runtests, #test failures dominate

4 years agoAllow coverage to report even on failing tests
Jeff Quast [Mon, 24 Nov 2014 04:56:21 +0000 (20:56 -0800)]
Allow coverage to report even on failing tests

This prevents the obscure "artifact dependencies could
not be resolved" message in TeamCity and is favored by
the more appropriate "such and such tests failed".

4 years agouse signal_value, resolving TypeError of getattr()
Jeff Quast [Mon, 24 Nov 2014 04:45:30 +0000 (20:45 -0800)]
use signal_value, resolving TypeError of getattr()

4 years agoResolve AttributeError in restore_ignored_signals
Jeff Quast [Mon, 24 Nov 2014 04:17:35 +0000 (20:17 -0800)]
Resolve AttributeError in restore_ignored_signals

4 years agoSet default signal handlers for SIGINT and SIGHUP.
Jeff Quast [Mon, 24 Nov 2014 04:14:16 +0000 (20:14 -0800)]
Set default signal handlers for SIGINT and SIGHUP.

According to test_misc.py comments, fedora's build
agent has the same problem as ours.  We use the setUp
and tearDown methods to set and restore these signals,
if ignored.

4 years agoMerge pull request #147 from jquast/teamcity-integration
Thomas Kluyver [Mon, 24 Nov 2014 03:10:52 +0000 (19:10 -0800)]
Merge pull request #147 from jquast/teamcity-integration

Teamcity integration

4 years agoResolve pip --upgrade command
Jeff Quast [Mon, 24 Nov 2014 02:52:50 +0000 (18:52 -0800)]
Resolve pip --upgrade command

Double requirement given: pytest (already in pytest, name='pytest')

4 years agoInstall pytest & friends to virtualenv
Jeff Quast [Mon, 24 Nov 2014 02:50:08 +0000 (18:50 -0800)]
Install pytest & friends to virtualenv

4 years agoFixes and error detection for runtests.sh
Jeff Quast [Mon, 24 Nov 2014 02:43:49 +0000 (18:43 -0800)]
Fixes and error detection for runtests.sh

4 years agoIntroduce script to display all signal handlers
Jeff Quast [Mon, 24 Nov 2014 02:26:26 +0000 (18:26 -0800)]
Introduce script to display all signal handlers

Having a strange issue that only occurs on teamcity
agents, but not from a local shell.  I suspect it
may have to do with isatty() or the build agent
"launcher" which monitors and restarts the agent
should it disappear.

4 years agoDelete unused files from tools/
Jeff Quast [Mon, 24 Nov 2014 02:20:40 +0000 (18:20 -0800)]
Delete unused files from tools/

Many are related to sourceforge (websync, sfupload),
or related to documentation building (we use readthedocs),
noah's dotfiles are also in here (256K), or contain
NameError (pyed).

This leaves getkey and step, which do not seem terribly
useful to include in the pexpect archive.

4 years agoProvide test-runner for teamcity
Jeff Quast [Mon, 24 Nov 2014 02:10:53 +0000 (18:10 -0800)]
Provide test-runner for teamcity

4 years agoMerge pull request #123 from pexpect/use-ptyprocess
Thomas Kluyver [Mon, 24 Nov 2014 01:21:34 +0000 (17:21 -0800)]
Merge pull request #123 from pexpect/use-ptyprocess

Start adapting pexpect to use ptyprocess

4 years agoMerge pull request #143 from pexpect/setecho-in-bash-replwrap-sunos
Thomas Kluyver [Mon, 24 Nov 2014 01:04:31 +0000 (17:04 -0800)]
Merge pull request #143 from pexpect/setecho-in-bash-replwrap-sunos

Bugfix for solaris in replwrap.bash()

4 years agoMerge pull request #145 from pexpect/simple-ftp-example-fix
Thomas Kluyver [Mon, 24 Nov 2014 01:02:55 +0000 (17:02 -0800)]
Merge pull request #145 from pexpect/simple-ftp-example-fix

Simple fix for ftp.openbsd.org example

4 years agoGet version without importing pexpect
Thomas Kluyver [Mon, 24 Nov 2014 01:01:29 +0000 (17:01 -0800)]
Get version without importing pexpect

4 years agoFix failure in str(spawnobj) before any output
Jeff Quast [Mon, 24 Nov 2014 00:47:25 +0000 (16:47 -0800)]
Fix failure in str(spawnobj) before any output

4 years agoNot all spawn classes have a kill method
Thomas Kluyver [Mon, 13 Oct 2014 21:11:48 +0000 (14:11 -0700)]
Not all spawn classes have a kill method

4 years agoRecord control characters in log files
Thomas Kluyver [Sat, 11 Oct 2014 22:44:23 +0000 (15:44 -0700)]
Record control characters in log files

4 years agoDelegate sending control characters to ptyprocess
Thomas Kluyver [Sat, 11 Oct 2014 01:51:10 +0000 (18:51 -0700)]
Delegate sending control characters to ptyprocess

4 years agoRefactor, creating SpawnBaseUnicode class
Thomas Kluyver [Sat, 11 Oct 2014 01:32:21 +0000 (18:32 -0700)]
Refactor, creating SpawnBaseUnicode class

4 years agoRefactor, creating SpawnBase class
Thomas Kluyver [Sat, 11 Oct 2014 01:21:58 +0000 (18:21 -0700)]
Refactor, creating SpawnBase class

4 years agoMove code out of __init__
Thomas Kluyver [Sat, 11 Oct 2014 00:28:39 +0000 (17:28 -0700)]
Move code out of __init__

4 years agoRemove some long-dead code
Thomas Kluyver [Sat, 11 Oct 2014 00:06:19 +0000 (17:06 -0700)]
Remove some long-dead code

4 years agoAdd ptyprocess to Travis installation
Thomas Kluyver [Fri, 10 Oct 2014 00:21:29 +0000 (17:21 -0700)]
Add ptyprocess to Travis installation

4 years agoDelegate more methods to ptyprocess
Thomas Kluyver [Fri, 10 Oct 2014 00:15:34 +0000 (17:15 -0700)]
Delegate more methods to ptyprocess

4 years agoStart adapting pexpect to use ptyprocess
Thomas Kluyver [Wed, 8 Oct 2014 22:24:56 +0000 (15:24 -0700)]
Start adapting pexpect to use ptyprocess

4 years agoSimple fix for ftp.openbsd.org example
Jeff Quast [Sun, 23 Nov 2014 12:31:14 +0000 (04:31 -0800)]
Simple fix for ftp.openbsd.org example

4 years agoMerge remote-tracking branch 'origin/master' into issue-104-cannot-exec-setuids
Jeff Quast [Sun, 23 Nov 2014 12:23:31 +0000 (04:23 -0800)]
Merge remote-tracking branch 'origin/master' into issue-104-cannot-exec-setuids

Conflicts:
doc/history.rst

4 years agoBugfix for solaris in replwrap.bash()
Jeff Quast [Sun, 23 Nov 2014 11:53:49 +0000 (03:53 -0800)]
Bugfix for solaris in replwrap.bash()

Forgot to set ``echo=False`` when calling spawnu()
directly in replwrap.bash(), resulting in IOError
on SunOs:

    IOError: [Errno 22] Invalid argument: setecho() may not be called on this platform.

4 years agoMerge pull request #139 from rickhau/master
Jeff Quast [Sun, 23 Nov 2014 05:16:48 +0000 (21:16 -0800)]
Merge pull request #139 from rickhau/master

Remove confusing comment in daemonize() of example/cgishell.cgi

4 years agoMerge pull request #142 from pexpect/failed-str-self
Jeff Quast [Sun, 23 Nov 2014 05:16:13 +0000 (21:16 -0800)]
Merge pull request #142 from pexpect/failed-str-self

Failure in __str__() before any output.

4 years agoUse str(p) and not p.__str__()
Jeff Quast [Sun, 23 Nov 2014 05:10:22 +0000 (21:10 -0800)]
Use str(p) and not p.__str__()

4 years agoMerge pull request #115 from takluyver/replwrap-bash-robustness
Jeff Quast [Sat, 22 Nov 2014 20:31:21 +0000 (12:31 -0800)]
Merge pull request #115 from takluyver/replwrap-bash-robustness

Make replwrap.bash() robust against custom prompts in bashrc

4 years agoUse ternary if/else in spawn.__str__
Jeff Quast [Sat, 22 Nov 2014 20:29:15 +0000 (12:29 -0800)]
Use ternary if/else in spawn.__str__

4 years agoMerge pull request #140 from pexpect/occasionally-failing-testcases
Thomas Kluyver [Sat, 22 Nov 2014 20:05:48 +0000 (12:05 -0800)]
Merge pull request #140 from pexpect/occasionally-failing-testcases

Resolve occasionally failing testcases

4 years agouse isinstance of 'str', not 'basestring'
Jeff Quast [Sat, 22 Nov 2014 19:42:49 +0000 (11:42 -0800)]
use isinstance of 'str', not 'basestring'

4 years agoFailure in __str__() before any output.
Jeff Quast [Sat, 22 Nov 2014 19:33:55 +0000 (11:33 -0800)]
Failure in __str__() before any output.

When calling str() on a spawn class object before
it has any command output, the __str__() override
attempts to truncate long command output while the
value of self.before is still None, raising:

    TypeError: 'NoneType' object has no attribute '__getitem__'

4 years agoFix 2nd and 3rd expect/response PS1 prompt
Jeff Quast [Sat, 22 Nov 2014 08:56:13 +0000 (00:56 -0800)]
Fix 2nd and 3rd expect/response PS1 prompt

4 years agoMake sure when overriding setUp to call super's
Jeff Quast [Sat, 22 Nov 2014 08:36:58 +0000 (00:36 -0800)]
Make sure when overriding setUp to call super's

4 years agoremove TODO about ls and change to use uname
Jeff Quast [Sat, 22 Nov 2014 08:32:28 +0000 (00:32 -0800)]
remove TODO about ls and change to use uname

4 years agowrite b'bytes' to rcfile, not 'str/unicode'
Jeff Quast [Sat, 22 Nov 2014 08:31:49 +0000 (00:31 -0800)]
write b'bytes' to rcfile, not 'str/unicode'