Skip to content

Commit

Permalink
Trac #29240: Upgrade pexpect to 4.8
Browse files Browse the repository at this point in the history
Requires changes to expect_upto and expect_peek due to [1]. Removed
patch merged upstream

[1] pexpect/pexpect@fa084459198f7e9f4a2f346ea8
bdac2ca102bc87

Tarball: https://codeload.github.com/pexpect/pexpect/tar.gz/4.8.0

URL: https://trac.sagemath.org/29240
Reported by: arojas
Ticket author(s): Antonio Rojas, Samuel Lelièvre
Reviewer(s): Matthias Koeppe
  • Loading branch information
Release Manager committed Aug 24, 2020
2 parents 3198f30 + 97a4b08 commit 508fb24
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 142 deletions.
7 changes: 4 additions & 3 deletions build/pkgs/pexpect/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tarball=pexpect-VERSION.tar.gz
sha1=3d79bb7de5436cd0a8417a6249c765595a33abcf
md5=d4f3372965a996238d57d19b95d2e03a
cksum=2052391001
sha1=3f6c41a4a72dc802f3431f5d2367a4259f9b1813
md5=b260eb284efc19489466b804ff53c59b
cksum=966265148
upstream_url=https://codeload.github.com/pexpect/pexpect/tar.gz/VERSION
2 changes: 1 addition & 1 deletion build/pkgs/pexpect/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.6.0.p0
4.8.0
136 changes: 0 additions & 136 deletions build/pkgs/pexpect/patches/read_more_bytes.patch

This file was deleted.

6 changes: 4 additions & 2 deletions src/sage/interfaces/sagespawn.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ class SageSpawn(spawn):
u'hello world\r\n'
"""
ret = self.expect(*args, **kwds)
self.buffer = self.before + self.after + self.buffer
self._before = self.buffer_type()
self._before.write(self.before + self.after + self.buffer)
return ret

def expect_upto(self, *args, **kwds):
Expand All @@ -167,7 +168,8 @@ class SageSpawn(spawn):
u'world\r\n'
"""
ret = self.expect(*args, **kwds)
self.buffer = self.after + self.buffer
self._before = self.buffer_type()
self._before.write(self.after + self.buffer)
return ret


Expand Down

0 comments on commit 508fb24

Please sign in to comment.