git: 5ca0f1b40b47 - main - misc/py-pexpect: Update to 4.9.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 27 Nov 2023 18:09:13 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5ca0f1b40b479013a3140495fec2a2a99ff10fd2

commit 5ca0f1b40b479013a3140495fec2a2a99ff10fd2
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-11-27 18:03:27 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-11-27 18:07:55 +0000

    misc/py-pexpect: Update to 4.9.0
    
    - Update WWW
    
    Changes:        https://github.com/pexpect/pexpect/releases
                    https://pexpect.readthedocs.io/en/stable/history.html
---
 misc/py-pexpect/Makefile                           |  6 +--
 misc/py-pexpect/distinfo                           |  6 +--
 misc/py-pexpect/files/patch-pexpect_bashrc.sh      |  8 ----
 .../files/patch-tests_PexpectTestCase.py           | 11 -----
 misc/py-pexpect/files/patch-tests_test__expect.py  | 47 ----------------------
 misc/py-pexpect/files/patch-tests_test__misc.py    | 20 ---------
 .../files/patch-tests_test__popen__spawn.py        | 20 ---------
 .../py-pexpect/files/patch-tests_test__replwrap.py | 11 -----
 8 files changed, 6 insertions(+), 123 deletions(-)

diff --git a/misc/py-pexpect/Makefile b/misc/py-pexpect/Makefile
index 02c033ac9c06..b10033256640 100644
--- a/misc/py-pexpect/Makefile
+++ b/misc/py-pexpect/Makefile
@@ -1,13 +1,13 @@
 PORTNAME=	pexpect
-PORTVERSION=	4.8.0
-PORTREVISION=	1
+PORTVERSION=	4.9.0
 CATEGORIES=	misc python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	Python module for controlling interactive programs in pseudo-terminal
-WWW=		https://pexpect.readthedocs.io/
+WWW=		https://pexpect.readthedocs.io/en/stable/ \
+		https://github.com/pexpect/pexpect
 
 LICENSE=	ISCL
 LICENSE_FILE=	${WRKSRC}/LICENSE
diff --git a/misc/py-pexpect/distinfo b/misc/py-pexpect/distinfo
index ab8ee0ef377a..7e358d25e052 100644
--- a/misc/py-pexpect/distinfo
+++ b/misc/py-pexpect/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1579684146
-SHA256 (pexpect-4.8.0.tar.gz) = fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c
-SIZE (pexpect-4.8.0.tar.gz) = 157037
+TIMESTAMP = 1701083398
+SHA256 (pexpect-4.9.0.tar.gz) = ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f
+SIZE (pexpect-4.9.0.tar.gz) = 166450
diff --git a/misc/py-pexpect/files/patch-pexpect_bashrc.sh b/misc/py-pexpect/files/patch-pexpect_bashrc.sh
deleted file mode 100644
index da3b2719271c..000000000000
--- a/misc/py-pexpect/files/patch-pexpect_bashrc.sh
+++ /dev/null
@@ -1,8 +0,0 @@
---- pexpect/bashrc.sh.orig	2020-01-17 17:08:15 UTC
-+++ pexpect/bashrc.sh
-@@ -14,3 +14,5 @@ PS1="$"
- 
- # Unset PROMPT_COMMAND, so that it can't change PS1 to something unexpected.
- unset PROMPT_COMMAND
-+
-+bind 'set enable-bracketed-paste off'
diff --git a/misc/py-pexpect/files/patch-tests_PexpectTestCase.py b/misc/py-pexpect/files/patch-tests_PexpectTestCase.py
deleted file mode 100644
index 4f71643ec7f1..000000000000
--- a/misc/py-pexpect/files/patch-tests_PexpectTestCase.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- tests/PexpectTestCase.py.orig	2020-01-17 17:08:15 UTC
-+++ tests/PexpectTestCase.py
-@@ -97,7 +97,7 @@ class PexpectTestCase(unittest.TestCase):
-                 raise AssertionError("%s was not raised" % excClass)
- 
-         @contextlib.contextmanager
--        def assertRaisesRegexp(self, excClass, pattern):
-+        def assertRaisesRegex(self, excClass, pattern):
-             import re
-             try:
-                 yield
diff --git a/misc/py-pexpect/files/patch-tests_test__expect.py b/misc/py-pexpect/files/patch-tests_test__expect.py
deleted file mode 100644
index 5d068493d7e9..000000000000
--- a/misc/py-pexpect/files/patch-tests_test__expect.py
+++ /dev/null
@@ -1,47 +0,0 @@
---- tests/test_expect.py.orig	2021-09-22 12:21:58 UTC
-+++ tests/test_expect.py
-@@ -411,7 +411,7 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase):
-     def test_before_across_chunks(self):
-         # https://github.com/pexpect/pexpect/issues/478
-         child = pexpect.spawn(
--            '''/bin/bash -c "openssl rand -base64 {} 2>/dev/null | head -500 | nl --number-format=rz --number-width=5 2>&1 ; echo 'PATTERN!!!'"'''.format(1024 * 1024 * 2),
-+            '''/bin/sh -c "openssl rand -base64 {} 2>/dev/null | head -500 | nl -n rz -w 5 2>&1 ; echo 'PATTERN!!!'"'''.format(1024 * 1024 * 2),
-             searchwindowsize=128
-         )
-         child.expect(['PATTERN'])
-@@ -456,7 +456,7 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase):
-         child = pexpect.spawn('cat', echo=False)
-         child.sendline('BEGIN')
-         for i in range(100):
--            child.sendline('foo' * 100)
-+            child.sendline('foo' * 10)
-         e = child.expect([b'xyzzy', pexpect.TIMEOUT],
-                          searchwindowsize=10, timeout=0.001)
-         self.assertEqual(e, 1)
-@@ -473,7 +473,7 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase):
-         child = pexpect.spawn('cat', echo=False)
-         child.sendline('BEGIN')
-         for i in range(100):
--            child.sendline('foo' * 100)
-+            child.sendline('foo' * 10)
-         e = child.expect([b'xyzzy', pexpect.TIMEOUT],
-                          searchwindowsize=10, timeout=0.5)
-         self.assertEqual(e, 1)
-@@ -569,13 +569,13 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase)
- 
-     def test_bad_arg(self):
-         p = pexpect.spawn('cat')
--        with self.assertRaisesRegexp(TypeError, '.*must be one of'):
-+        with self.assertRaisesRegex(TypeError, '.*must be one of'):
-             p.expect(1)
--        with self.assertRaisesRegexp(TypeError, '.*must be one of'):
-+        with self.assertRaisesRegex(TypeError, '.*must be one of'):
-             p.expect([1, b'2'])
--        with self.assertRaisesRegexp(TypeError, '.*must be one of'):
-+        with self.assertRaisesRegex(TypeError, '.*must be one of'):
-             p.expect_exact(1)
--        with self.assertRaisesRegexp(TypeError, '.*must be one of'):
-+        with self.assertRaisesRegex(TypeError, '.*must be one of'):
-             p.expect_exact([1, b'2'])
- 
-     def test_timeout_none(self):
diff --git a/misc/py-pexpect/files/patch-tests_test__misc.py b/misc/py-pexpect/files/patch-tests_test__misc.py
deleted file mode 100644
index 668854c6b5de..000000000000
--- a/misc/py-pexpect/files/patch-tests_test__misc.py
+++ /dev/null
@@ -1,20 +0,0 @@
---- tests/test_misc.py.orig	2020-01-17 17:08:15 UTC
-+++ tests/test_misc.py
-@@ -214,7 +214,7 @@ class TestCaseMisc(PexpectTestCase.PexpectTestCase):
-         # Force an invalid state to test isalive
-         child.ptyproc.terminated = 0
-         try:
--            with self.assertRaisesRegexp(pexpect.ExceptionPexpect,
-+            with self.assertRaisesRegex(pexpect.ExceptionPexpect,
-                                          ".*" + expect_errmsg):
-                 child.isalive()
-         finally:
-@@ -224,7 +224,7 @@ class TestCaseMisc(PexpectTestCase.PexpectTestCase):
-     def test_bad_arguments_suggest_fdpsawn(self):
-         " assert custom exception for spawn(int). "
-         expect_errmsg = "maybe you want to use fdpexpect.fdspawn"
--        with self.assertRaisesRegexp(pexpect.ExceptionPexpect,
-+        with self.assertRaisesRegex(pexpect.ExceptionPexpect,
-                                      ".*" + expect_errmsg):
-             pexpect.spawn(1)
- 
diff --git a/misc/py-pexpect/files/patch-tests_test__popen__spawn.py b/misc/py-pexpect/files/patch-tests_test__popen__spawn.py
deleted file mode 100644
index e95c4f38abf9..000000000000
--- a/misc/py-pexpect/files/patch-tests_test__popen__spawn.py
+++ /dev/null
@@ -1,20 +0,0 @@
---- tests/test_popen_spawn.py.orig	2020-01-17 17:08:15 UTC
-+++ tests/test_popen_spawn.py
-@@ -110,13 +110,13 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase)
- 
-     def test_bad_arg(self):
-         p = PopenSpawn('cat')
--        with self.assertRaisesRegexp(TypeError, '.*must be one of'):
-+        with self.assertRaisesRegex(TypeError, '.*must be one of'):
-             p.expect(1)
--        with self.assertRaisesRegexp(TypeError, '.*must be one of'):
-+        with self.assertRaisesRegex(TypeError, '.*must be one of'):
-             p.expect([1, b'2'])
--        with self.assertRaisesRegexp(TypeError, '.*must be one of'):
-+        with self.assertRaisesRegex(TypeError, '.*must be one of'):
-             p.expect_exact(1)
--        with self.assertRaisesRegexp(TypeError, '.*must be one of'):
-+        with self.assertRaisesRegex(TypeError, '.*must be one of'):
-             p.expect_exact([1, b'2'])
- 
-     def test_timeout_none(self):
diff --git a/misc/py-pexpect/files/patch-tests_test__replwrap.py b/misc/py-pexpect/files/patch-tests_test__replwrap.py
deleted file mode 100644
index 7f98316ee132..000000000000
--- a/misc/py-pexpect/files/patch-tests_test__replwrap.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- tests/test_replwrap.py.orig	2021-09-22 14:15:55 UTC
-+++ tests/test_replwrap.py
-@@ -24,7 +24,7 @@ class REPLWrapTestCase(unittest.TestCase):
- 
-     def test_bash(self):
-         bash = replwrap.bash()
--        res = bash.run_command("alias")
-+        res = bash.run_command("alias xyzzy=true; alias")
-         assert 'alias' in res, res
- 
-         try: