debian/0000775000000000000000000000000012332774135007177 5ustar debian/run_tests.sh0000664000000000000000000000005212332766651011562 0ustar pwd . ./test.env $PYTHON tools/testall.py debian/changelog0000664000000000000000000001222412332774130011045 0ustar pexpect (3.1-1ubuntu0.1) trusty; urgency=medium * d/patches/pr38.patch: Backport from upstream 3.2 the patch to fix an AttributeError on select.error handling. (LP: #1317660) -- Barry Warsaw Thu, 08 May 2014 17:07:35 -0400 pexpect (3.1-1) unstable; urgency=medium * Team upload. * New upstream release * debian/control: - In -doc, add breaks/replaces on python-pexcept <<3. Closes: #732915 - Drop python-pexcept-doc to Suggests in both other packages. Closes: #732889 - Bump standards-version to 3.9.5 (no changes) -- Jackson Doak Sun, 26 Jan 2014 11:22:03 +1100 pexpect (3.0-2) unstable; urgency=low * Team upload. * debian/copyright: Update to reflect upstreams change from Expat to ISC (Closes: #731945). -- Andrew Starr-Bochicchio Thu, 12 Dec 2013 16:53:35 -0500 pexpect (3.0-1) unstable; urgency=low * Team upload. [ Thomas Kluyver ] * New upstream release. Closes: #729518 * Add packaging for Python 3. * Use pybuild for packaging. [ Jakub Wilk ] * Use canonical URIs for Vcs-* fields. [ Jackson Doak ] * Create debian/python3-pexpect.docs [ Andrew Starr-Bochicchio ] * Remove empty debian/patches dir. * Move documentation and examples into a new python-pexpect-doc package. They are shared between the Python 2 and Python 3 packages, so there is no need to install them with both. -- Andrew Starr-Bochicchio Fri, 06 Dec 2013 20:20:26 -0500 pexpect (2.4-1) unstable; urgency=low * Team upload. [ Arthur de Jong ] * New upstream release (Closes: #609195). * Switch to 3.0 (quilt) source format. * Switch to dh-style debian/rules. * Moved packaging from python-central to dh_python2 (Closes: #616935, LP: #788514). * Drop Conflicts/Replaces on ancient versions which shipped in sarge. * Bump standards-version to 3.9.3. * Register documentation with doc-base. * Update debian/copyright (license is actually MIT instead of Python 2.3). * Fix syntax errors in one of the examples (closes: #580271) [ Piotr Ożarowski ] * Added Vcs-Svn and Vcs-Browser fields [ Sandro Tosi ] * debian/control - uniforming Vcs-Browser field * debian/control - switch Vcs-Browser field to viewsvn [ Carlos Galisteo ] * debian/control - Added Homepage field. -- Arthur de Jong Fri, 09 Mar 2012 11:43:41 +0100 pexpect (2.3-1) unstable; urgency=low * New upstream release. * Fix lintian warnings: - Move debhelper to Build-Depends from Build-Depends-Indep. - Remove DH_COMPAT in debian/rules. - Added debian/pycompat. - Added #! line for examples/ssh_session.py. * Updated standards version. -- Ganesan Rajagopal Sun, 27 Jul 2008 18:21:35 +0530 pexpect (2.1-1.1) unstable; urgency=low * NMU. Rebuild to move files to /usr/share/pyshared. Closes: #490482. -- Matthias Klose Fri, 18 Jul 2008 15:51:04 +0000 pexpect (2.1-1) unstable; urgency=low * New upstream version. * Included pxssh.py and fdpxpect.py (Closes: #356128). * Included docs and examples (Closes: #230850). * Updated for new python policy using python-central (Closes: #373476). * Added watch file. -- Ganesan Rajagopal Tue, 20 Jun 2006 09:54:09 +0530 pexpect (2.0-2) unstable; urgency=low * Included pexpect package into Python Modules repository. * Add python-modules-team@lists.alioth.debian.org to Uploaders. * Remove python2.2-pexpect package. -- Ganesan Rajagopal Sat, 15 Apr 2006 20:41:47 +0530 pexpect (2.0-1) unstable; urgency=low * New upstream release. * Fixed *.docs to take README instead of README.txt. * Updated standards version. -- Ganesan Rajagopal Wed, 28 Dec 2005 13:32:00 +0530 pexpect (0.999-5) unstable; urgency=low * Aargh. Install python2.4 binaries in the right place. * Added python2.4 to Build-depends. -- Ganesan Rajagopal Sat, 19 Feb 2005 08:17:09 +0530 pexpect (0.999-4) unstable; urgency=low * Really build pexpect for python 2.4. -- Ganesan Rajagopal Sat, 09 Jan 2005 22:15:36 +0530 pexpect (0.999-3) unstable; urgency=low * Build python 2.4 package. * python-pexpect now depends on ${python:Depends}. -- Ganesan Rajagopal Sat, 09 Jan 2005 22:10:36 +0530 pexpect (0.999-2) unstable; urgency=low * Build-depend on python (Closes: #258299). -- Ganesan Rajagopal Wed, 09 Jul 2004 09:45:36 +0530 pexpect (0.999-1) unstable; urgency=low * New upstream release (Closes: #257736). -- Ganesan Rajagopal Wed, 07 Jul 2004 11:48:36 +0530 pexpect (0.99-1) unstable; urgency=low * New upstream release -- Ganesan Rajagopal Tue, 14 Oct 2003 17:36:36 +0530 pexpect (0.98-2) unstable; urgency=low * Don't ship python bytecode files (closes: #207313). -- Ganesan Rajagopal Mon, 8 Sep 2003 12:57:01 +0530 pexpect (0.98-1) unstable; urgency=low * Initial packaging (Closes: #156784). -- Ganesan Rajagopal Wed, 13 Aug 2003 18:25:51 +0530 debian/rules0000775000000000000000000000121412332766651010261 0ustar #!/usr/bin/make -f PYTHON2_VERSIONS=$(shell pyversions -vr) PYTHON3_VERSIONS=$(shell py3versions -vr) PYTHON_VERSIONS=${PYTHON2_VERSIONS} ${PYTHON3_VERSIONS} %: dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild override_dh_auto_clean: dh_auto_clean rm -rf doc/_build rm -rf .coverage rm -rf tests/log ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) test-python%: PYTHON=python$* sh debian/run_tests.sh override_dh_auto_test: $(foreach pyversion,${PYTHON_VERSIONS},$(pyversion:%=test-python%)) endif override_dh_installdocs: PYTHONPATH=`pwd` make -C doc html dh_installdocs -ppython-pexpect-doc doc/_build/html dh_installdocs -A debian/python-pexpect.install0000664000000000000000000000002112332766651013553 0ustar usr/lib/python2* debian/patches/0000775000000000000000000000000012332774133010624 5ustar debian/patches/pr38.patch0000664000000000000000000000661012332770300012434 0ustar Subject: [PATCH 1/4] Fixing issue where errno does not exist on select.error Origin: https://github.com/pexpect/pexpect/commit/a97f580d5cdd0f479ea64d36edc164ea769d4084 Forwarded: not-needed --- pexpect/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/pexpect/__init__.py +++ b/pexpect/__init__.py @@ -1687,7 +1687,7 @@ return select.select(iwtd, owtd, ewtd, timeout) except select.error: err = sys.exc_info()[1] - if err.errno == errno.EINTR: + if err.args[0] == errno.EINTR: # if we loop back we have to subtract the # amount of time we already waited. if timeout is not None: --- /dev/null +++ b/tests/sleep_for.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +''' +PEXPECT LICENSE + + This license is approved by the OSI and FSF as GPL-compatible. + http://opensource.org/licenses/isc-license.txt + + Copyright (c) 2012, Noah Spurrier + PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY + PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE + COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES. + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +''' + +from __future__ import print_function + +import time +import sys + +def main(): + """ + This script sleeps for the number of seconds (float) specified by the + command line argument. + """ + if len(sys.argv) < 2: + print("Usage: %s seconds_to_sleep" % (sys.argv[0],)) + sys.exit(1) + timeout = float(sys.argv[1]) + print("READY") + time.sleep(timeout) + print("END") + +if __name__ == '__main__': + main() --- a/tests/test_expect.py +++ b/tests/test_expect.py @@ -25,6 +25,7 @@ import time import PexpectTestCase import sys +import signal #import pdb # Many of these test cases blindly assume that sequential directory @@ -490,6 +491,26 @@ p.expect_exact('def') p.expect(pexpect.EOF) + def test_signal_handling(self): + ''' + This tests the error handling of a signal interrupt (usually a + SIGWINCH generated when a window is resized), but in this test, we + are substituting an ALARM signal as this is much easier for testing + and is treated the same as a SIGWINCH. + + To ensure that the alarm fires during the expect call, we are + setting the signal to alarm after 1 second while the spawned process + sleeps for 2 seconds prior to sending the expected output. + ''' + def noop(x, y): + pass + signal.signal(signal.SIGALRM, noop) + + p1 = pexpect.spawn('%s sleep_for.py 2' % self.PYTHONBIN) + p1.expect('READY', timeout=10) + signal.alarm(1) + p1.expect('END', timeout=10) + if __name__ == '__main__': unittest.main() debian/patches/series0000664000000000000000000000001312332767233012036 0ustar pr38.patch debian/python-pexpect-doc.doc-base0000664000000000000000000000101212332766651014326 0ustar Document: pexpect Title: A Pure Python Expect-like module. Author: Noah Spurrier Abstract: Pexpect is a pure Python module for spawning child applications; controlling them; and responding to expected patterns in their output. Pexpect works like Don Libes' Expect. Pexpect allows your script to spawn a child application and control it as if a human were typing commands. Section: Programming/Python Format: HTML Index: /usr/share/doc/python-pexpect-doc/html/index.html Files: /usr/share/doc/python-pexpect-doc/html/* debian/compat0000664000000000000000000000000212332766651010401 0ustar 7 debian/copyright0000664000000000000000000000171312332766651011140 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: pexpect Upstream-Contact: Noah Spurrier Source: http://pypi.python.org/pypi/pexpect/ Files: * Copyright: Copyright (c) 2006-2013 Noah Spurrier License: ISC PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES. . THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. debian/control0000664000000000000000000000417012332771244010602 0ustar Source: pexpect Section: python Priority: optional Build-Depends: python-all (>= 2.6.6-3~), python3-all, python-sphinx, debhelper (>= 7.0.50~) Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Ganesan Rajagopal Uploaders: Debian Python Modules Team Standards-Version: 3.9.5 Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/pexpect/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/pexpect/trunk/ Homepage: http://www.noah.org/wiki/Pexpect X-Python-Version: >= 2.6 X-Python3-Version: >= 3.2 Package: python-pexpect Architecture: all Depends: ${misc:Depends}, ${python:Depends} Suggests: python-pexpect-doc Description: Python module for automating interactive applications Pexpect is a pure Python module for spawning child applications; controlling them; and responding to expected patterns in their output. Pexpect works like Don Libes' Expect. Pexpect allows your script to spawn a child application and control it as if a human were typing commands. Package: python3-pexpect Architecture: all Depends: ${misc:Depends}, ${python3:Depends} Suggests: python-pexpect-doc Description: Python 3 module for automating interactive applications Pexpect is a pure Python 3 module for spawning child applications; controlling them; and responding to expected patterns in their output. Pexpect works like Don Libes' Expect. Pexpect allows your script to spawn a child application and control it as if a human were typing commands. Package: python-pexpect-doc Architecture: all Section: doc Depends: ${misc:Depends}, ${sphinxdoc:Depends} Breaks: python-pexpect (<< 3) Replaces: python-pexpect (<< 3) Description: Python module for automating interactive applications (documentation) Pexpect is a pure Python module for spawning child applications; controlling them; and responding to expected patterns in their output. Pexpect works like Don Libes' Expect. Pexpect allows your script to spawn a child application and control it as if a human were typing commands. . This is the common documentation package. debian/source/0000775000000000000000000000000012332774133010475 5ustar debian/source/format0000664000000000000000000000001412332766651011711 0ustar 3.0 (quilt) debian/python3-pexpect.install0000664000000000000000000000002112332766651013636 0ustar usr/lib/python3* debian/python-pexpect-doc.examples0000664000000000000000000000001312332766651014467 0ustar examples/* debian/watch0000664000000000000000000000012012332766651010225 0ustar version=3 https://pypi.python.org/packages/source/p/pexpect/pexpect-(.*).tar.gz