Hello community,

here is the log from the commit of package python-pexpect for openSUSE:Factory 
checked in at 2017-11-17 10:35:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pexpect (Old)
 and      /work/SRC/openSUSE:Factory/.python-pexpect.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pexpect"

Fri Nov 17 10:35:59 2017 rev:21 rq:541215 version:4.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pexpect/python-pexpect.changes    
2017-07-30 11:20:24.488410230 +0200
+++ /work/SRC/openSUSE:Factory/.python-pexpect.new/python-pexpect.changes       
2017-11-17 10:36:03.245318392 +0100
@@ -1,0 +2,27 @@
+Fri Nov 10 22:59:10 UTC 2017 - [email protected]
+
+- update to version 4.3.0:
+  * The async= parameter to integrate with asyncio has become async_=
+    (PR #431), as async is becoming a Python keyword from Python
+    3.6. Pexpect will still recognise async as an alternative
+    spelling.
+  * Similarly, the module pexpect.async became pexpect._async (PR
+    #450). This module is not part of the public API.
+  * Fix problems with asyncio objects closing file descriptors during
+    garbage collection (#347, PR #376).
+  * Set the .pid attribute of a PopenSpawn object (PR #417).
+  * Fix passing Windows paths to PopenSpawn (PR #446).
+  * PopenSpawn on Windows can pass string commands through to Popen
+    without splitting them into a list (PR #447).
+  * Stop shlex trying to read from stdin when PopenSpawn is passed
+    cmd=None (#433, PR #434).
+  * Ensure that an error closing a Pexpect spawn object raises a
+    Pexpect error, rather than a Ptyprocess error (#383, PR #386).
+  * Cleaned up invalid backslash escape sequences in strings (PR #430,
+    PR #445).
+  * The pattern for a password prompt in pexpect.pxssh changed from
+    password to password: (PR #452).
+  * Correct docstring for using unicode with spawn (PR #395).
+  * Various other improvements to documentation.
+
+-------------------------------------------------------------------

Old:
----
  pexpect-4.2.1.tar.gz

New:
----
  pexpect-4.3.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pexpect.spec ++++++
--- /var/tmp/diff_new_pack.CcZHrI/_old  2017-11-17 10:36:03.913293943 +0100
+++ /var/tmp/diff_new_pack.CcZHrI/_new  2017-11-17 10:36:03.917293796 +0100
@@ -20,17 +20,17 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pexpect
-Version:        4.2.1
+Version:        4.3.0
 Release:        0
 Summary:        Pure Python Expect-like module
 License:        ISC
 Group:          Development/Libraries/Python
 Url:            http://pexpect.readthedocs.org/en/latest/
 Source:         
https://files.pythonhosted.org/packages/source/p/pexpect/pexpect-%{version}.tar.gz
-BuildRequires:  fdupes
-BuildRequires:  python-rpm-macros
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module ptyprocess}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
 %if %{with tests}
 BuildRequires:  %{python_module pytest}
 %endif

++++++ pexpect-4.2.1.tar.gz -> pexpect-4.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/PKG-INFO new/pexpect-4.3.0/PKG-INFO
--- old/pexpect-4.2.1/PKG-INFO  2016-08-21 22:16:37.000000000 +0200
+++ new/pexpect-4.3.0/PKG-INFO  2017-11-09 17:58:42.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pexpect
-Version: 4.2.1
+Version: 4.3.0
 Summary: Pexpect allows easy control of interactive console applications.
 Home-page: https://pexpect.readthedocs.io/
 Author: Noah Spurrier; Thomas Kluyver; Jeff Quast
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/README.rst new/pexpect-4.3.0/README.rst
--- old/pexpect-4.2.1/README.rst        2016-07-09 23:34:08.000000000 +0200
+++ new/pexpect-4.3.0/README.rst        2017-11-09 16:52:00.000000000 +0100
@@ -1,4 +1,4 @@
-.. image:: https://travis-ci.org/pexpect/pexpect.png?branch=master
+.. image:: https://travis-ci.org/pexpect/pexpect.svg?branch=master
    :target: https://travis-ci.org/pexpect/pexpect
    :align: right
    :alt: Build status
@@ -38,7 +38,7 @@
 
     http://opensource.org/licenses/isc-license.txt
 
-    Copyright (c) 2013-2014, Pexpect development team
+    Copyright (c) 2013-2016, Pexpect development team
     Copyright (c) 2012, Noah Spurrier <[email protected]>
 
     PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/doc/conf.py 
new/pexpect-4.3.0/doc/conf.py
--- old/pexpect-4.2.1/doc/conf.py       2016-08-21 21:59:23.000000000 +0200
+++ new/pexpect-4.3.0/doc/conf.py       2017-11-09 17:48:34.000000000 +0100
@@ -52,9 +52,9 @@
 # built documents.
 #
 # The short X.Y version.
-version = '4.2'
+version = '4.3'
 # The full version, including alpha/beta/rc tags.
-release = '4.2.1'
+release = version
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/doc/history.rst 
new/pexpect-4.3.0/doc/history.rst
--- old/pexpect-4.2.1/doc/history.rst   2016-08-21 22:01:44.000000000 +0200
+++ new/pexpect-4.3.0/doc/history.rst   2017-11-09 17:46:14.000000000 +0100
@@ -4,6 +4,31 @@
 Releases
 --------
 
+Version 4.3
+```````````
+
+* The ``async=`` parameter to integrate with asyncio has become ``async_=``
+  (:ghpull:`431`), as *async* is becoming a Python keyword from Python 3.6.
+  Pexpect will still recognise ``async`` as an alternative spelling.
+* Similarly, the module ``pexpect.async`` became ``pexpect._async``
+  (:ghpull:`450`). This module is not part of the public API.
+* Fix problems with asyncio objects closing file descriptors during garbage
+  collection (:ghissue:`347`, :ghpull:`376`).
+* Set the ``.pid`` attribute of a :class:`~.PopenSpawn` object (:ghpull:`417`).
+* Fix passing Windows paths to :class:`~.PopenSpawn` (:ghpull:`446`).
+* :class:`~.PopenSpawn` on Windows can pass string commands through to 
``Popen``
+  without splitting them into a list (:ghpull:`447`).
+* Stop ``shlex`` trying to read from stdin when :class:`~.PopenSpawn` is
+  passed ``cmd=None`` (:ghissue:`433`, :ghpull:`434`).
+* Ensure that an error closing a Pexpect spawn object raises a Pexpect error,
+  rather than a Ptyprocess error (:ghissue:`383`, :ghpull:`386`).
+* Cleaned up invalid backslash escape sequences in strings (:ghpull:`430`,
+  :ghpull:`445`).
+* The pattern for a password prompt in :mod:`pexpect.pxssh` changed from
+  ``password`` to ``password:`` (:ghpull:`452`).
+* Correct docstring for using unicode with spawn (:ghpull:`395`).
+* Various other improvements to documentation.
+
 Version 4.2.1
 `````````````
 
@@ -200,7 +225,7 @@
 * Changed the name of ``send_eof()`` to ``sendeof()``.
 * Modified ``kill()`` so that it checks to make sure the pid ``isalive()``.
 * modified ``spawn()`` (really called from ``__spawn()``) so that it does not
-  raise an expection if ``setwinsize()`` fails. Some platforms such as Cygwin
+  raise an exception if ``setwinsize()`` fails. Some platforms such as Cygwin
   do not like setwinsize. This was a constant problem and since it is not a
   critical feature I decided to just silence the error.  Normally I don't like
   to do that, but in this case I'm making an exception.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/doc/overview.rst 
new/pexpect-4.3.0/doc/overview.rst
--- old/pexpect-4.2.1/doc/overview.rst  2015-12-08 19:43:59.000000000 +0100
+++ new/pexpect-4.3.0/doc/overview.rst  2017-08-22 15:45:35.000000000 +0200
@@ -249,9 +249,19 @@
 
 Pexpect can be used on Windows to wait for a pattern to be produced by a child
 process, using :class:`pexpect.popen_spawn.PopenSpawn`, or a file descriptor,
-using :class:`pexpect.fdpexpect.fdspawn`. This should be considered 
experimental
-for now.
+using :class:`pexpect.fdpexpect.fdspawn`.
 
 :class:`pexpect.spawn` and :func:`pexpect.run` are *not* available on Windows,
 as they rely on Unix pseudoterminals (ptys). Cross platform code must not use
 these.
+
+``PopenSpawn`` is not a direct replacement for ``spawn``. Many programs only
+offer interactive behaviour if they detect that they are running in a terminal.
+When run by ``PopenSpawn``, they may behave differently.
+
+.. seealso::
+
+   `winpexpect <https://pypi.python.org/pypi/winpexpect>`__ and
+   `wexpect <https://gist.github.com/anthonyeden/8488763>`__
+     Two unmaintained pexpect-like modules for Windows, which work with a
+     hidden console.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/examples/README 
new/pexpect-4.3.0/examples/README
--- old/pexpect-4.2.1/examples/README   2015-12-08 19:43:59.000000000 +0100
+++ new/pexpect-4.3.0/examples/README   2017-07-19 15:56:08.000000000 +0200
@@ -18,7 +18,7 @@
     CVS. This script scans the given path to find binary files;
     checks with CVS to see if the sticky options are set to -kb;
     finally if sticky options are not -kb then uses 'cvs admin'
-    to set the -kb option. 
+    to set the -kb option.
 
 ftp.py
     This demonstrates an FTP "bookmark".
@@ -51,9 +51,6 @@
     removing interlace artifacts, fitting to a target file size, etc.
     There are lots of options, but the process is simple and easy to use.
 
-sshls.py
-    This lists a directory on a remote machine.
-
 ssh_tunnel.py
     This starts an SSH tunnel to a remote machine. It monitors the connection
     and restarts the tunnel if it goes down.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/examples/astat.py 
new/pexpect-4.3.0/examples/astat.py
--- old/pexpect-4.2.1/examples/astat.py 2015-12-08 19:43:59.000000000 +0100
+++ new/pexpect-4.3.0/examples/astat.py 2017-11-09 16:52:00.000000000 +0100
@@ -90,7 +90,7 @@
     p = pxssh.pxssh()
     p.login(hostname, username, password)
     p.sendline('apachectl status')
-    p.expect('([0-9]+\.[0-9]+)\s*requests/sec')
+    p.expect(r'([0-9]+\.[0-9]+)\s*requests/sec')
     requests_per_second = p.match.groups()[0]
     p.logout()
     print(requests_per_second)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/examples/cgishell.cgi 
new/pexpect-4.3.0/examples/cgishell.cgi
--- old/pexpect-4.2.1/examples/cgishell.cgi     2015-12-08 19:43:59.000000000 
+0100
+++ new/pexpect-4.3.0/examples/cgishell.cgi     2017-11-09 16:52:00.000000000 
+0100
@@ -12,7 +12,7 @@
     --port     : set the local port for the server to listen on
     --watch    : show the virtual screen after each client request
 
-This project is probably not the most security concious thing I've ever built.
+This project is probably not the most security conscious thing I've ever built.
 This should be considered an experimental tool -- at best.
 """
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/examples/chess.py 
new/pexpect-4.3.0/examples/chess.py
--- old/pexpect-4.2.1/examples/chess.py 2015-12-08 19:43:59.000000000 +0100
+++ new/pexpect-4.3.0/examples/chess.py 2017-11-09 16:52:00.000000000 +0100
@@ -29,8 +29,8 @@
 import pexpect
 import ANSI
 
-REGEX_MOVE = 
'(?:[a-z]|\x1b\[C)(?:[0-9]|\x1b\[C)(?:[a-z]|\x1b\[C)(?:[0-9]|\x1b\[C)'
-REGEX_MOVE_PART = '(?:[0-9]|\x1b\[C)(?:[a-z]|\x1b\[C)(?:[0-9]|\x1b\[C)'
+REGEX_MOVE = 
r'(?:[a-z]|\x1b\[C)(?:[0-9]|\x1b\[C)(?:[a-z]|\x1b\[C)(?:[0-9]|\x1b\[C)'
+REGEX_MOVE_PART = r'(?:[0-9]|\x1b\[C)(?:[a-z]|\x1b\[C)(?:[0-9]|\x1b\[C)'
 
 class Chess:
 
@@ -71,7 +71,7 @@
 
     def get_computer_move (self):
         print('Here')
-        i = self.child.expect (['\[17;59H', '\[17;58H'])
+        i = self.child.expect ([r'\[17;59H', r'\[17;58H'])
         print(i)
         if i == 0:
             self.child.expect (REGEX_MOVE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/examples/chess3.py 
new/pexpect-4.3.0/examples/chess3.py
--- old/pexpect-4.2.1/examples/chess3.py        2015-12-08 19:43:59.000000000 
+0100
+++ new/pexpect-4.3.0/examples/chess3.py        2017-11-09 16:52:00.000000000 
+0100
@@ -29,8 +29,8 @@
 import pexpect
 import ANSI
 
-REGEX_MOVE = 
'(?:[a-z]|\x1b\[C)(?:[0-9]|\x1b\[C)(?:[a-z]|\x1b\[C)(?:[0-9]|\x1b\[C)'
-REGEX_MOVE_PART = '(?:[0-9]|\x1b\[C)(?:[a-z]|\x1b\[C)(?:[0-9]|\x1b\[C)'
+REGEX_MOVE = 
r'(?:[a-z]|\x1b\[C)(?:[0-9]|\x1b\[C)(?:[a-z]|\x1b\[C)(?:[0-9]|\x1b\[C)'
+REGEX_MOVE_PART = r'(?:[0-9]|\x1b\[C)(?:[a-z]|\x1b\[C)(?:[0-9]|\x1b\[C)'
 
 class Chess:
 
@@ -74,7 +74,7 @@
 
     def get_computer_move (self):
         print('Here')
-        i = self.child.expect (['\[17;59H', '\[17;58H'])
+        i = self.child.expect ([r'\[17;59H', r'\[17;58H'])
         print(i)
         if i == 0:
             self.child.expect (REGEX_MOVE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/examples/df.py 
new/pexpect-4.3.0/examples/df.py
--- old/pexpect-4.2.1/examples/df.py    2015-12-08 19:43:59.000000000 +0100
+++ new/pexpect-4.3.0/examples/df.py    2017-11-09 16:52:00.000000000 +0100
@@ -35,7 +35,7 @@
 child = pexpect.spawn ('df')
 
 # parse 'df' output into a list.
-pattern = "\n(\S+).*?([0-9]+)%"
+pattern = r"\n(\S+).*?([0-9]+)%"
 filesystem_list = []
 for dummy in range (0, 1000):
     i = child.expect ([pattern, pexpect.EOF])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/examples/hive.py 
new/pexpect-4.3.0/examples/hive.py
--- old/pexpect-4.2.1/examples/hive.py  2015-12-08 19:43:59.000000000 +0100
+++ new/pexpect-4.3.0/examples/hive.py  2017-11-09 16:52:00.000000000 +0100
@@ -15,7 +15,7 @@
     password:
     connecting to host1.example.com - OK
     connecting to host2.example.net - OK
-    targetting hosts: 192.168.1.104 192.168.1.107
+    targeting hosts: 192.168.1.104 192.168.1.107
     CMD (? for help) > uptime
     =======================================================================
     host1.example.com
@@ -160,7 +160,7 @@
 :resync
 
     This is similar to :sync, but it does not change the mode. It looks for the
-    prompt and thus consumes all input from all targetted hosts.
+    prompt and thus consumes all input from all targeted hosts.
 
 :prompt
 
@@ -170,12 +170,12 @@
 
 :send my text
 
-    This will send the 'my text' wihtout a line feed to the targetted hosts.
+    This will send the 'my text' wihtout a line feed to the targeted hosts.
     This output of the hosts is not automatically synchronized.
 
 :control X
 
-    This will send the given control character to the targetted hosts.
+    This will send the given control character to the targeted hosts.
     For example, ":control c" will send ASCII 3.
 
 :exit
@@ -255,7 +255,7 @@
 
     synchronous_mode = True
     target_hostnames = host_names[:]
-    print('targetting hosts:', ' '.join(target_hostnames))
+    print('targeting hosts:', ' '.join(target_hostnames))
     while True:
         cmd = raw_input('CMD (? for help) > ')
         cmd = cmd.strip()
@@ -348,7 +348,7 @@
             target_hostnames = cmd.split()[1:]
             if len(target_hostnames) == 0 or target_hostnames[0] == all:
                 target_hostnames = host_names[:]
-            print('targetting hosts:', ' '.join(target_hostnames))
+            print('targeting hosts:', ' '.join(target_hostnames))
             continue
         elif cmd == ':exit' or cmd == ':q' or cmd == ':quit':
             break
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/examples/monitor.py 
new/pexpect-4.3.0/examples/monitor.py
--- old/pexpect-4.2.1/examples/monitor.py       2015-12-08 19:43:59.000000000 
+0100
+++ new/pexpect-4.3.0/examples/monitor.py       2017-11-09 16:52:00.000000000 
+0100
@@ -59,7 +59,7 @@
 # Some constants.
 #
 COMMAND_PROMPT = '[#$] ' ### This is way too simple for industrial use -- we 
will change is ASAP.
-TERMINAL_PROMPT = '(?i)terminal type\?'
+TERMINAL_PROMPT = r'(?i)terminal type\?'
 TERMINAL_TYPE = 'vt100'
 # This is the prompt we get if SSH does not have the remote host's public key 
stored in the cache.
 SSH_NEWKEY = '(?i)are you sure you want to continue connecting'
@@ -130,12 +130,12 @@
     #
     # Set command prompt to something more unique.
     #
-    COMMAND_PROMPT = "\[PEXPECT\]\$ "
-    child.sendline ("PS1='[PEXPECT]\$ '") # In case of sh-style
+    COMMAND_PROMPT = r"\[PEXPECT\]\$ "
+    child.sendline (r"PS1='[PEXPECT]\$ '") # In case of sh-style
     i = child.expect ([pexpect.TIMEOUT, COMMAND_PROMPT], timeout=10)
     if i == 0:
         print("# Couldn't set sh-style prompt -- trying csh-style.")
-        child.sendline ("set prompt='[PEXPECT]\$ '")
+        child.sendline (r"set prompt='[PEXPECT]\$ '")
         i = child.expect ([pexpect.TIMEOUT, COMMAND_PROMPT], timeout=10)
         if i == 0:
             print("Failed to set command prompt using sh or csh style.")
@@ -159,20 +159,20 @@
 
     # Run and parse 'uptime'.
     child.sendline ('uptime')
-    child.expect('up\s+(.*?),\s+([0-9]+) users?,\s+load averages?: 
([0-9]+\.[0-9][0-9]),?\s+([0-9]+\.[0-9][0-9]),?\s+([0-9]+\.[0-9][0-9])')
+    child.expect(r'up\s+(.*?),\s+([0-9]+) users?,\s+load averages?: 
([0-9]+\.[0-9][0-9]),?\s+([0-9]+\.[0-9][0-9]),?\s+([0-9]+\.[0-9][0-9])')
     duration, users, av1, av5, av15 = child.match.groups()
     days = '0'
     hours = '0'
     mins = '0'
     if 'day' in duration:
-        child.match = re.search('([0-9]+)\s+day',duration)
+        child.match = re.search(r'([0-9]+)\s+day',duration)
         days = str(int(child.match.group(1)))
     if ':' in duration:
         child.match = re.search('([0-9]+):([0-9]+)',duration)
         hours = str(int(child.match.group(1)))
         mins = str(int(child.match.group(2)))
     if 'min' in duration:
-        child.match = re.search('([0-9]+)\s+min',duration)
+        child.match = re.search(r'([0-9]+)\s+min',duration)
         mins = str(int(child.match.group(1)))
     print()
     print('Uptime: %s days, %s users, %s (1 min), %s (5 min), %s (15 min)' % (
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/examples/topip.py 
new/pexpect-4.3.0/examples/topip.py
--- old/pexpect-4.2.1/examples/topip.py 2015-12-08 19:43:59.000000000 +0100
+++ new/pexpect-4.3.0/examples/topip.py 2017-11-09 16:52:00.000000000 +0100
@@ -206,10 +206,10 @@
         stddev_trigger = 5
 
     if ipv6_flag:
-        netstat_pattern = 
'(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+::ffff:(\S+):(\S+)\s+.*?\r'
+        netstat_pattern = 
r'(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+::ffff:(\S+):(\S+)\s+.*?\r'
     else:
-        netstat_pattern = 
'(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(?:::ffff:)*(\S+):(\S+)\s+.*?\r'
-        #netstat_pattern = 
'(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+):(\S+)\s+.*?\r'
+        netstat_pattern = 
r'(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(?:::ffff:)*(\S+):(\S+)\s+.*?\r'
+        #netstat_pattern = 
r'(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+):(\S+)\s+.*?\r'
 
     # run netstat (either locally or via SSH).
     if use_localhost:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/examples/uptime.py 
new/pexpect-4.3.0/examples/uptime.py
--- old/pexpect-4.2.1/examples/uptime.py        2015-12-08 19:43:59.000000000 
+0100
+++ new/pexpect-4.3.0/examples/uptime.py        2017-11-09 16:52:00.000000000 
+0100
@@ -54,7 +54,7 @@
 p = pexpect.spawnu('uptime')
 
 # This parses uptime output into the major groups using regex group matching.
-p.expect('up\s+(.*?),\s+([0-9]+) users?,\s+load averages?: 
([0-9]+\.[0-9][0-9]),?\s+([0-9]+\.[0-9][0-9]),?\s+([0-9]+\.[0-9][0-9])')
+p.expect(r'up\s+(.*?),\s+([0-9]+) users?,\s+load averages?: 
([0-9]+\.[0-9][0-9]),?\s+([0-9]+\.[0-9][0-9]),?\s+([0-9]+\.[0-9][0-9])')
 duration, users, av1, av5, av15 = p.match.groups()
 
 # The duration is a little harder to parse because of all the different
@@ -65,14 +65,14 @@
 hours = '0'
 mins = '0'
 if 'day' in duration:
-    p.match = re.search('([0-9]+)\s+day',duration)
+    p.match = re.search(r'([0-9]+)\s+day',duration)
     days = str(int(p.match.group(1)))
 if ':' in duration:
     p.match = re.search('([0-9]+):([0-9]+)',duration)
     hours = str(int(p.match.group(1)))
     mins = str(int(p.match.group(2)))
 if 'min' in duration:
-    p.match = re.search('([0-9]+)\s+min',duration)
+    p.match = re.search(r'([0-9]+)\s+min',duration)
     mins = str(int(p.match.group(1)))
 
 # Print the parsed fields in CSV format.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/pexpect/__init__.py 
new/pexpect-4.3.0/pexpect/__init__.py
--- old/pexpect-4.2.1/pexpect/__init__.py       2016-08-21 22:02:13.000000000 
+0200
+++ new/pexpect-4.3.0/pexpect/__init__.py       2017-11-09 17:49:01.000000000 
+0100
@@ -75,7 +75,7 @@
     from .pty_spawn import spawn, spawnu
     from .run import run, runu
 
-__version__ = '4.2.1'
+__version__ = '4.3.0'
 __revision__ = ''
 __all__ = ['ExceptionPexpect', 'EOF', 'TIMEOUT', 'spawn', 'spawnu', 'run', 
'runu',
            'which', 'split_command_line', '__version__', '__revision__']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/pexpect/_async.py 
new/pexpect-4.3.0/pexpect/_async.py
--- old/pexpect-4.2.1/pexpect/_async.py 1970-01-01 01:00:00.000000000 +0100
+++ new/pexpect-4.3.0/pexpect/_async.py 2017-11-09 16:52:00.000000000 +0100
@@ -0,0 +1,86 @@
+import asyncio
+import errno
+
+from pexpect import EOF
+
[email protected]
+def expect_async(expecter, timeout=None):
+    # First process data that was previously read - if it maches, we don't need
+    # async stuff.
+    previously_read = expecter.spawn.buffer
+    expecter.spawn.buffer = expecter.spawn.string_type()
+    idx = expecter.new_data(previously_read)
+    if idx is not None:
+        return idx
+    if not expecter.spawn.async_pw_transport:
+        pw = PatternWaiter()
+        pw.set_expecter(expecter)
+        transport, pw = yield from asyncio.get_event_loop()\
+            .connect_read_pipe(lambda: pw, expecter.spawn)
+        expecter.spawn.async_pw_transport = pw, transport
+    else:
+        pw, transport = expecter.spawn.async_pw_transport
+        pw.set_expecter(expecter)
+        transport.resume_reading()
+    try:
+        return (yield from asyncio.wait_for(pw.fut, timeout))
+    except asyncio.TimeoutError as e:
+        transport.pause_reading()
+        return expecter.timeout(e)
+
+
+class PatternWaiter(asyncio.Protocol):
+    transport = None
+
+    def set_expecter(self, expecter):
+        self.expecter = expecter
+        self.fut = asyncio.Future()
+
+    def found(self, result):
+        if not self.fut.done():
+            self.fut.set_result(result)
+            self.transport.pause_reading()
+    
+    def error(self, exc):
+        if not self.fut.done():
+            self.fut.set_exception(exc)
+            self.transport.pause_reading()
+
+    def connection_made(self, transport):
+        self.transport = transport
+    
+    def data_received(self, data):
+        spawn = self.expecter.spawn
+        s = spawn._decoder.decode(data)
+        spawn._log(s, 'read')
+
+        if self.fut.done():
+            spawn.buffer += s
+            return
+
+        try:
+            index = self.expecter.new_data(s)
+            if index is not None:
+                # Found a match
+                self.found(index)
+        except Exception as e:
+            self.expecter.errored()
+            self.error(e)
+    
+    def eof_received(self):
+        # N.B. If this gets called, async will close the pipe (the spawn 
object)
+        # for us
+        try:
+            self.expecter.spawn.flag_eof = True
+            index = self.expecter.eof()
+        except EOF as e:
+            self.error(e)
+        else:
+            self.found(index)
+    
+    def connection_lost(self, exc):
+        if isinstance(exc, OSError) and exc.errno == errno.EIO:
+            # We may get here without eof_received being called, e.g on Linux
+            self.eof_received()
+        elif exc is not None:
+            self.error(exc)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/pexpect/async.py 
new/pexpect-4.3.0/pexpect/async.py
--- old/pexpect-4.2.1/pexpect/async.py  2015-12-08 19:43:59.000000000 +0100
+++ new/pexpect-4.3.0/pexpect/async.py  1970-01-01 01:00:00.000000000 +0100
@@ -1,78 +0,0 @@
-import asyncio
-import errno
-
-from pexpect import EOF
-
[email protected]
-def expect_async(expecter, timeout=None):
-    # First process data that was previously read - if it maches, we don't need
-    # async stuff.
-    previously_read = expecter.spawn.buffer
-    expecter.spawn.buffer = expecter.spawn.string_type()
-    idx = expecter.new_data(previously_read)
-    if idx is not None:
-        return idx
-
-    transport, pw = yield from asyncio.get_event_loop()\
-        .connect_read_pipe(lambda: PatternWaiter(expecter), expecter.spawn)
-
-    try:
-        return (yield from asyncio.wait_for(pw.fut, timeout))
-    except asyncio.TimeoutError as e:
-        transport.pause_reading()
-        return expecter.timeout(e)
-
-class PatternWaiter(asyncio.Protocol):
-    transport = None
-    def __init__(self, expecter):
-        self.expecter = expecter
-        self.fut = asyncio.Future()
-    
-    def found(self, result):
-        if not self.fut.done():
-            self.fut.set_result(result)
-            self.transport.pause_reading()
-    
-    def error(self, exc):
-        if not self.fut.done():
-            self.fut.set_exception(exc)
-            self.transport.pause_reading()
-
-    def connection_made(self, transport):
-        self.transport = transport
-    
-    def data_received(self, data):
-        spawn = self.expecter.spawn
-        s = spawn._decoder.decode(data)
-        spawn._log(s, 'read')
-
-        if self.fut.done():
-            spawn.buffer += s
-            return
-
-        try:
-            index = self.expecter.new_data(s)
-            if index is not None:
-                # Found a match
-                self.found(index)
-        except Exception as e:
-            self.expecter.errored()
-            self.error(e)
-    
-    def eof_received(self):
-        # N.B. If this gets called, async will close the pipe (the spawn 
object)
-        # for us
-        try:
-            self.expecter.spawn.flag_eof = True
-            index = self.expecter.eof()
-        except EOF as e:
-            self.error(e)
-        else:
-            self.found(index)
-    
-    def connection_lost(self, exc):
-        if isinstance(exc, OSError) and exc.errno == errno.EIO:
-            # We may get here without eof_received being called, e.g on Linux
-            self.eof_received()
-        elif exc is not None:
-            self.error(exc)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/pexpect/expect.py 
new/pexpect-4.3.0/pexpect/expect.py
--- old/pexpect-4.2.1/pexpect/expect.py 2016-05-21 13:43:27.000000000 +0200
+++ new/pexpect-4.3.0/pexpect/expect.py 2017-11-09 16:52:00.000000000 +0100
@@ -79,7 +79,6 @@
     def expect_loop(self, timeout=-1):
         """Blocking expect"""
         spawn = self.spawn
-        from . import EOF, TIMEOUT
 
         if timeout is not None:
             end_time = time.time() + timeout
@@ -161,7 +160,7 @@
         return '\n'.join(ss)
 
     def search(self, buffer, freshlen, searchwindowsize=None):
-        '''This searches 'buffer' for the first occurence of one of the search
+        '''This searches 'buffer' for the first occurrence of one of the search
         strings.  'freshlen' must indicate the number of bytes at the end of
         'buffer' which have not been searched before. It helps to avoid
         searching the same, possibly big, buffer over and over again.
@@ -220,7 +219,7 @@
 
         start - index into the buffer, first byte of match
         end   - index into the buffer, first byte after match
-        match - the re.match object returned by a succesful re.search
+        match - the re.match object returned by a successful re.search
 
     '''
 
@@ -267,7 +266,7 @@
         return '\n'.join(ss)
 
     def search(self, buffer, freshlen, searchwindowsize=None):
-        '''This searches 'buffer' for the first occurence of one of the regular
+        '''This searches 'buffer' for the first occurrence of one of the 
regular
         expressions. 'freshlen' must indicate the number of bytes at the end of
         'buffer' which have not been searched before.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/pexpect/fdpexpect.py 
new/pexpect-4.3.0/pexpect/fdpexpect.py
--- old/pexpect-4.2.1/pexpect/fdpexpect.py      2016-07-09 23:34:08.000000000 
+0200
+++ new/pexpect-4.3.0/pexpect/fdpexpect.py      2017-11-09 16:52:00.000000000 
+0100
@@ -1,5 +1,5 @@
 '''This is like pexpect, but it will work with any file descriptor that you
-pass it. You are reponsible for opening and close the file descriptor.
+pass it. You are responsible for opening and close the file descriptor.
 This allows you to use Pexpect with sockets and named pipes (FIFOs).
 
 PEXPECT LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/pexpect/popen_spawn.py 
new/pexpect-4.3.0/pexpect/popen_spawn.py
--- old/pexpect-4.2.1/pexpect/popen_spawn.py    2015-12-08 19:43:59.000000000 
+0100
+++ new/pexpect-4.3.0/pexpect/popen_spawn.py    2017-11-09 16:52:00.000000000 
+0100
@@ -15,6 +15,7 @@
 
 from .spawnbase import SpawnBase, PY3
 from .exceptions import EOF
+from .utils import string_types
 
 class PopenSpawn(SpawnBase):
     if PY3:
@@ -39,10 +40,11 @@
             kwargs['startupinfo'] = startupinfo
             kwargs['creationflags'] = subprocess.CREATE_NEW_PROCESS_GROUP
 
-        if not isinstance(cmd, (list, tuple)):
-            cmd = shlex.split(cmd)
+        if isinstance(cmd, string_types) and sys.platform != 'win32':
+            cmd = shlex.split(cmd, posix=os.name == 'posix')
 
         self.proc = subprocess.Popen(cmd, **kwargs)
+        self.pid = self.proc.pid
         self.closed = False
         self._buf = self.string_type()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/pexpect/pty_spawn.py 
new/pexpect-4.3.0/pexpect/pty_spawn.py
--- old/pexpect-4.2.1/pexpect/pty_spawn.py      2016-07-09 23:34:08.000000000 
+0200
+++ new/pexpect-4.3.0/pexpect/pty_spawn.py      2017-08-22 15:56:46.000000000 
+0200
@@ -106,8 +106,9 @@
             child = pexpect.spawn('some_command')
             child.logfile = sys.stdout
 
-            # In Python 3, spawnu should be used to give str to stdout:
-            child = pexpect.spawnu('some_command')
+            # In Python 3, we'll use the ``encoding`` argument to decode data
+            # from the subprocess and handle it as unicode:
+            child = pexpect.spawn('some_command', encoding='utf-8')
             child.logfile = sys.stdout
 
         The logfile_read and logfile_send members can be used to separately log
@@ -315,7 +316,10 @@
         and SIGINT). '''
 
         self.flush()
-        self.ptyproc.close(force=force)
+        with _wrap_ptyprocess_err():
+            # PtyProcessError may be raised if it is not possible to terminate
+            # the child.
+            self.ptyproc.close(force=force)
         self.isalive()  # Update exit status from ptyproc
         self.child_fd = -1
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/pexpect/pxssh.py 
new/pexpect-4.3.0/pexpect/pxssh.py
--- old/pexpect-4.2.1/pexpect/pxssh.py  2016-08-21 21:57:33.000000000 +0200
+++ new/pexpect-4.3.0/pexpect/pxssh.py  2017-11-09 16:52:00.000000000 +0100
@@ -114,12 +114,12 @@
         #prompt command different than the regex.
 
         # used to match the command-line prompt
-        self.UNIQUE_PROMPT = "\[PEXPECT\][\$\#] "
+        self.UNIQUE_PROMPT = r"\[PEXPECT\][\$\#] "
         self.PROMPT = self.UNIQUE_PROMPT
 
         # used to set shell command-line prompt to UNIQUE_PROMPT.
-        self.PROMPT_SET_SH = "PS1='[PEXPECT]\$ '"
-        self.PROMPT_SET_CSH = "set prompt='[PEXPECT]\$ '"
+        self.PROMPT_SET_SH = r"PS1='[PEXPECT]\$ '"
+        self.PROMPT_SET_CSH = r"set prompt='[PEXPECT]\$ '"
         self.SSH_OPTS = ("-o'RSAAuthentication=no'"
                 + " -o 'PubkeyAuthentication=no'")
 # Disabling host key checking, makes you vulnerable to MITM attacks.
@@ -277,7 +277,7 @@
         # This does not distinguish between a remote server 'password' prompt
         # and a local ssh 'passphrase' prompt (for unlocking a private key).
         spawn._spawn(self, cmd)
-        i = self.expect(["(?i)are you sure you want to continue connecting", 
original_prompt, "(?i)(?:password)|(?:passphrase for key)", "(?i)permission 
denied", "(?i)terminal type", TIMEOUT, "(?i)connection closed by remote host", 
EOF], timeout=login_timeout)
+        i = self.expect(["(?i)are you sure you want to continue connecting", 
original_prompt, "(?i)(?:password:)|(?:passphrase for key)", "(?i)permission 
denied", "(?i)terminal type", TIMEOUT, "(?i)connection closed by remote host", 
EOF], timeout=login_timeout)
 
         # First phase
         if i==0:
@@ -285,13 +285,13 @@
             # This is what you get if SSH does not have the remote host's
             # public key stored in the 'known_hosts' cache.
             self.sendline("yes")
-            i = self.expect(["(?i)are you sure you want to continue 
connecting", original_prompt, "(?i)(?:password)|(?:passphrase for key)", 
"(?i)permission denied", "(?i)terminal type", TIMEOUT])
+            i = self.expect(["(?i)are you sure you want to continue 
connecting", original_prompt, "(?i)(?:password:)|(?:passphrase for key)", 
"(?i)permission denied", "(?i)terminal type", TIMEOUT])
         if i==2: # password or passphrase
             self.sendline(password)
-            i = self.expect(["(?i)are you sure you want to continue 
connecting", original_prompt, "(?i)(?:password)|(?:passphrase for key)", 
"(?i)permission denied", "(?i)terminal type", TIMEOUT])
+            i = self.expect(["(?i)are you sure you want to continue 
connecting", original_prompt, "(?i)(?:password:)|(?:passphrase for key)", 
"(?i)permission denied", "(?i)terminal type", TIMEOUT])
         if i==4:
             self.sendline(terminal_type)
-            i = self.expect(["(?i)are you sure you want to continue 
connecting", original_prompt, "(?i)(?:password)|(?:passphrase for key)", 
"(?i)permission denied", "(?i)terminal type", TIMEOUT])
+            i = self.expect(["(?i)are you sure you want to continue 
connecting", original_prompt, "(?i)(?:password:)|(?:passphrase for key)", 
"(?i)permission denied", "(?i)terminal type", TIMEOUT])
         if i==7:
             self.close()
             raise ExceptionPxssh('Could not establish connection to host')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/pexpect/replwrap.py 
new/pexpect-4.3.0/pexpect/replwrap.py
--- old/pexpect-4.2.1/pexpect/replwrap.py       2016-07-09 23:41:01.000000000 
+0200
+++ new/pexpect-4.3.0/pexpect/replwrap.py       2017-11-09 16:52:00.000000000 
+0100
@@ -114,9 +114,9 @@
     # replwrap seeing that as the next prompt, we'll embed the marker 
characters
     # for invisible characters in the prompt; these show up when inspecting the
     # environment variable, but not when bash displays the prompt.
-    ps1 = PEXPECT_PROMPT[:5] + u'\[\]' + PEXPECT_PROMPT[5:]
-    ps2 = PEXPECT_CONTINUATION_PROMPT[:5] + u'\[\]' + 
PEXPECT_CONTINUATION_PROMPT[5:]
+    ps1 = PEXPECT_PROMPT[:5] + u'\\[\\]' + PEXPECT_PROMPT[5:]
+    ps2 = PEXPECT_CONTINUATION_PROMPT[:5] + u'\\[\\]' + 
PEXPECT_CONTINUATION_PROMPT[5:]
     prompt_change = u"PS1='{0}' PS2='{1}' PROMPT_COMMAND=''".format(ps1, ps2)
 
-    return REPLWrapper(child, u'\$', prompt_change,
+    return REPLWrapper(child, u'\\$', prompt_change,
                        extra_init_cmd="export PAGER=cat")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/pexpect/screen.py 
new/pexpect-4.3.0/pexpect/screen.py
--- old/pexpect-4.2.1/pexpect/screen.py 2015-12-08 19:43:59.000000000 +0100
+++ new/pexpect-4.3.0/pexpect/screen.py 2017-11-09 16:52:00.000000000 +0100
@@ -69,7 +69,7 @@
 
 class screen:
     '''This object maintains the state of a virtual text screen as a
-    rectangluar array. This maintains a virtual cursor position and handles
+    rectangular array. This maintains a virtual cursor position and handles
     scrolling as characters are added. This supports most of the methods needed
     by an ANSI text screen. Row and column indexes are 1-based (not zero-based,
     like arrays).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/pexpect/spawnbase.py 
new/pexpect-4.3.0/pexpect/spawnbase.py
--- old/pexpect-4.2.1/pexpect/spawnbase.py      2016-05-21 13:43:27.000000000 
+0200
+++ new/pexpect-4.3.0/pexpect/spawnbase.py      2017-11-09 16:52:00.000000000 
+0100
@@ -115,6 +115,8 @@
                 self.linesep = os.linesep.decode('ascii')
             # This can handle unicode in both Python 2 and 3
             self.write_to_stdout = sys.stdout.write
+        # storage for async transport
+        self.async_pw_transport = None
 
     def _log(self, s, direction):
         if self.logfile is not None:
@@ -221,7 +223,7 @@
                 self._pattern_type_err(p)
         return compiled_pattern_list
 
-    def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
+    def expect(self, pattern, timeout=-1, searchwindowsize=-1, async_=False, 
**kw):
         '''This seeks through the stream until a pattern is matched. The
         pattern is overloaded and may take several types. The pattern can be a
         StringType, EOF, a compiled re, or a list of any of those types.
@@ -305,7 +307,7 @@
         If you are trying to optimize for speed then see expect_list().
 
         On Python 3.4, or Python 3.3 with asyncio installed, passing
-        ``async=True``  will make this return an :mod:`asyncio` coroutine,
+        ``async_=True``  will make this return an :mod:`asyncio` coroutine,
         which you can yield from to get the same result that this method would
         normally give directly. So, inside a coroutine, you can replace this 
code::
 
@@ -313,15 +315,19 @@
 
         With this non-blocking form::
 
-            index = yield from p.expect(patterns, async=True)
+            index = yield from p.expect(patterns, async_=True)
         '''
+        if 'async' in kw:
+            async_ = kw.pop('async')
+        if kw:
+            raise TypeError("Unknown keyword arguments: {}".format(kw))
 
         compiled_pattern_list = self.compile_pattern_list(pattern)
         return self.expect_list(compiled_pattern_list,
-                timeout, searchwindowsize, async)
+                timeout, searchwindowsize, async_)
 
     def expect_list(self, pattern_list, timeout=-1, searchwindowsize=-1,
-                    async=False):
+                    async_=False, **kw):
         '''This takes a list of compiled regular expressions and returns the
         index into the pattern_list that matched the child output. The list may
         also contain EOF or TIMEOUT(which are not compiled regular
@@ -331,21 +337,25 @@
         the expect() method.  This is called by expect().
 
 
-        Like :meth:`expect`, passing ``async=True`` will make this return an
+        Like :meth:`expect`, passing ``async_=True`` will make this return an
         asyncio coroutine.
         '''
         if timeout == -1:
             timeout = self.timeout
+        if 'async' in kw:
+            async_ = kw.pop('async')
+        if kw:
+            raise TypeError("Unknown keyword arguments: {}".format(kw))
 
         exp = Expecter(self, searcher_re(pattern_list), searchwindowsize)
-        if async:
-            from .async import expect_async
+        if async_:
+            from ._async import expect_async
             return expect_async(exp, timeout)
         else:
             return exp.expect_loop(timeout)
 
     def expect_exact(self, pattern_list, timeout=-1, searchwindowsize=-1,
-                     async=False):
+                     async_=False, **kw):
 
         '''This is similar to expect(), but uses plain string matching instead
         of compiled regular expressions in 'pattern_list'. The 'pattern_list'
@@ -359,11 +369,15 @@
         This method is also useful when you don't want to have to worry about
         escaping regular expression characters that you want to match.
 
-        Like :meth:`expect`, passing ``async=True`` will make this return an
+        Like :meth:`expect`, passing ``async_=True`` will make this return an
         asyncio coroutine.
         '''
         if timeout == -1:
             timeout = self.timeout
+        if 'async' in kw:
+            async_ = kw.pop('async')
+        if kw:
+            raise TypeError("Unknown keyword arguments: {}".format(kw))
 
         if (isinstance(pattern_list, self.allowed_string_types) or
                 pattern_list in (TIMEOUT, EOF)):
@@ -383,8 +397,8 @@
         pattern_list = [prepare_pattern(p) for p in pattern_list]
 
         exp = Expecter(self, searcher_string(pattern_list), searchwindowsize)
-        if async:
-            from .async import expect_async
+        if async_:
+            from ._async import expect_async
             return expect_async(exp, timeout)
         else:
             return exp.expect_loop(timeout)
@@ -415,7 +429,7 @@
 
         # I could have done this more directly by not using expect(), but
         # I deliberately decided to couple read() to expect() so that
-        # I would catch any bugs early and ensure consistant behavior.
+        # I would catch any bugs early and ensure consistent behavior.
         # It's a little less efficient, but there is less for me to
         # worry about if I have to later modify read() or expect().
         # Note, it's OK if size==-1 in the regex. That just means it
@@ -487,7 +501,7 @@
     # For 'with spawn(...) as child:'
     def __enter__(self):
         return self
-    
+
     def __exit__(self, etype, evalue, tb):
         # We rely on subclasses to implement close(). If they don't, it's not
         # clear what a context manager should do.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/pexpect/utils.py 
new/pexpect-4.3.0/pexpect/utils.py
--- old/pexpect-4.2.1/pexpect/utils.py  2016-07-09 23:34:08.000000000 +0200
+++ new/pexpect-4.3.0/pexpect/utils.py  2017-08-22 15:56:46.000000000 +0200
@@ -11,6 +11,11 @@
     # Alias Python2 exception to Python3
     InterruptedError = select.error
 
+if sys.version_info[0] >= 3:
+    string_types = (str,)
+else:
+    string_types = (unicode, str)
+
 
 def is_executable_file(path):
     """Checks that path is an executable regular file, or a symlink towards 
one.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/tests/log new/pexpect-4.3.0/tests/log
--- old/pexpect-4.2.1/tests/log 2016-08-21 22:02:45.000000000 +0200
+++ new/pexpect-4.3.0/tests/log 1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-\,ESC
-P,ESC
-\,ESC
-P,ESC
-\,ESC
-P,ESC
-\,ESC
-P,ESC
-\,ESC
-r,SEMICOLON
-\,ESC
-P,ESC
-\,ESC
-P,ESC
-\,ESC
-P,ESC
-\,ESC
-P,ESC
-\,ESC
-r,SEMICOLON
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/tests/test_async.py 
new/pexpect-4.3.0/tests/test_async.py
--- old/pexpect-4.2.1/tests/test_async.py       2015-12-08 19:43:59.000000000 
+0100
+++ new/pexpect-4.3.0/tests/test_async.py       2017-08-22 15:56:46.000000000 
+0200
@@ -3,6 +3,7 @@
 except ImportError:
     asyncio = None
 
+import gc
 import sys
 import unittest
 
@@ -17,41 +18,53 @@
     def test_simple_expect(self):
         p = pexpect.spawn('cat')
         p.sendline('Hello asyncio')
-        coro = p.expect(['Hello', pexpect.EOF] , async=True)
+        coro = p.expect(['Hello', pexpect.EOF] , async_=True)
         assert run(coro) == 0
         print('Done')
 
     def test_timeout(self):
         p = pexpect.spawn('cat')
-        coro = p.expect('foo', timeout=1, async=True)
+        coro = p.expect('foo', timeout=1, async_=True)
         with self.assertRaises(pexpect.TIMEOUT):
             run(coro)
         
         p = pexpect.spawn('cat')
-        coro = p.expect(['foo', pexpect.TIMEOUT], timeout=1, async=True)
+        coro = p.expect(['foo', pexpect.TIMEOUT], timeout=1, async_=True)
         assert run(coro) == 1
 
     def test_eof(self):
         p = pexpect.spawn('cat')
         p.sendline('Hi')
-        coro = p.expect(pexpect.EOF, async=True)
+        coro = p.expect(pexpect.EOF, async_=True)
         p.sendeof()
         assert run(coro) == 0
 
         p = pexpect.spawn('cat')
         p.sendeof()
-        coro = p.expect('Blah', async=True)
+        coro = p.expect('Blah', async_=True)
         with self.assertRaises(pexpect.EOF):
             run(coro)
 
     def test_expect_exact(self):
         p = pexpect.spawn('%s list100.py' % sys.executable)
-        assert run(p.expect_exact(b'5', async=True)) == 0
-        assert run(p.expect_exact(['wpeok', b'11'], async=True)) == 1
-        assert run(p.expect_exact([b'foo', pexpect.EOF], async=True)) == 1
+        assert run(p.expect_exact(b'5', async_=True)) == 0
+        assert run(p.expect_exact(['wpeok', b'11'], async_=True)) == 1
+        assert run(p.expect_exact([b'foo', pexpect.EOF], async_=True)) == 1
 
     def test_async_utf8(self):
         p = pexpect.spawn('%s list100.py' % sys.executable, encoding='utf8')
-        assert run(p.expect_exact(u'5', async=True)) == 0
-        assert run(p.expect_exact([u'wpeok', u'11'], async=True)) == 1
-        assert run(p.expect_exact([u'foo', pexpect.EOF], async=True)) == 1
+        assert run(p.expect_exact(u'5', async_=True)) == 0
+        assert run(p.expect_exact([u'wpeok', u'11'], async_=True)) == 1
+        assert run(p.expect_exact([u'foo', pexpect.EOF], async_=True)) == 1
+
+    def test_async_and_gc(self):
+        p = pexpect.spawn('%s sleep_for.py 1' % sys.executable, 
encoding='utf8')
+        assert run(p.expect_exact(u'READY', async_=True)) == 0
+        gc.collect()
+        assert run(p.expect_exact(u'END', async_=True)) == 0
+
+    def test_async_and_sync(self):
+        p = pexpect.spawn('echo 1234', encoding='utf8', maxread=1)
+        assert run(p.expect_exact(u'1', async_=True)) == 0
+        assert p.expect_exact(u'2') == 0
+        assert run(p.expect_exact(u'3', async_=True)) == 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pexpect-4.2.1/tests/test_unicode.py 
new/pexpect-4.3.0/tests/test_unicode.py
--- old/pexpect-4.2.1/tests/test_unicode.py     2015-12-08 19:43:59.000000000 
+0100
+++ new/pexpect-4.3.0/tests/test_unicode.py     2017-11-09 16:52:00.000000000 
+0100
@@ -155,7 +155,7 @@
     def test_spawn_utf8_incomplete(self):
         # This test case ensures correct incremental decoding, which
         # otherwise fails when the stream inspected by os.read()
-        # does not align exactly at a utf-8 multibyte boundry:
+        # does not align exactly at a utf-8 multibyte boundary:
         #    UnicodeDecodeError: 'utf8' codec can't decode byte 0xe2 in
         #                        position 0: unexpected end of data
         p = pexpect.spawnu('cat', maxread=1)


Reply via email to