Skip to content

Commit

Permalink
gh-36339: fix expect interface for newer ptyprocess
Browse files Browse the repository at this point in the history
    
This will close #32147

ptyprocess 0.5.2+ included a change that broke our expect.py on macOS

Here we guard a bit more around thrown errors, and this appears to
suffice
    
URL: #36339
Reported by: Dima Pasechnik
Reviewer(s): Dima Pasechnik, Gonzalo Tornaría, Matthias Köppe
  • Loading branch information
Release Manager committed Sep 27, 2023
2 parents bb04839 + df89444 commit 2c71472
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ jobs:
echo "::remove-matcher owner=configure-system-package-warning::"
echo "::remove-matcher owner=configure-system-package-error::"
# Manually install ptyprocess for now, until https://github.com/sagemath/sage/issues/32147 is fixed
pip install --no-build-isolation -v -v ptyprocess==0.5.1
- name: Build
shell: bash -l {0}
run: |
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/ptyprocess/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=ptyprocess-VERSION.tar.gz
sha1=3290062d67ef8a2f136bff9c2cd106673ff21316
md5=94e537122914cc9ec9c1eadcd36e73a1
cksum=1748633415
sha1=2d8830d1025c8e33149c7723c2f283122f9488c1
md5=9da200c397cb1752209a6b718b6cfc68
cksum=2094263560
upstream_url=https://pypi.io/packages/source/p/ptyprocess/ptyprocess-VERSION.tar.gz
4 changes: 1 addition & 3 deletions build/pkgs/ptyprocess/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
ptyprocess ==0.5.1
# https://github.com/sagemath/sage/issues/31280#comment:42 and following
# sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7
ptyprocess > 0.5
2 changes: 1 addition & 1 deletion build/pkgs/ptyprocess/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.1.p0
0.7.0
2 changes: 1 addition & 1 deletion src/sage/interfaces/expect.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def _close(self, force=True):
try:
if self._expect is not None:
self._expect.close(force=force)
except ExceptionPexpect:
except (ExceptionPexpect, OSError):
self._expect.ptyproc.fd = -1
self._expect.ptyproc.closed = True
self._expect.child_fd = -1
Expand Down

0 comments on commit 2c71472

Please sign in to comment.