summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pexpect')
-rw-r--r--dev-python/pexpect/Manifest2
-rw-r--r--dev-python/pexpect/files/pexpect-4.8.0-fix-PS1.patch16
-rw-r--r--dev-python/pexpect/files/pexpect-4.8.0-py311.patch67
-rw-r--r--dev-python/pexpect/files/pexpect-4.8.0-sphinx-3.patch25
-rw-r--r--dev-python/pexpect/pexpect-4.8.0-r2.ebuild44
-rw-r--r--dev-python/pexpect/pexpect-4.8.0-r3.ebuild51
-rw-r--r--dev-python/pexpect/pexpect-4.9.0.ebuild70
7 files changed, 71 insertions, 204 deletions
diff --git a/dev-python/pexpect/Manifest b/dev-python/pexpect/Manifest
index 335b751b7e95..13443088b210 100644
--- a/dev-python/pexpect/Manifest
+++ b/dev-python/pexpect/Manifest
@@ -1 +1 @@
-DIST pexpect-4.8.0.tar.gz 157037 BLAKE2B 742642bd6b9ec3f6cdfad054d4fd22db56b4a55b746d675c27a8cdf824ea749ec4589e296dffa08778195f3ccd20feb56bc0fd5212984396ea5aa0555c41ca96 SHA512 7447ae2d1e13be422c894a8fd51c5aaa788e37ea7f0c798c88b77afd401fb3631400a637077ccbb83c2e3876b0d0c5e1dbd5fdc9d3739d785b4d5ad7c0192580
+DIST pexpect-4.9.0.tar.gz 166450 BLAKE2B a08e10deb9f21e49a04021d78dc1ff6c9eeded5825ef73b236c3dac725e6877a4fe74deaa6844c8aa4b1beab4b915d7612e682529c4ed97b364a737a1960b30f SHA512 0e4b3a6978b94aee221ff23cd7bd771517e0e0f1a1a8b17f77f15bf78edd3130ad093d925b7d1e86fe6ba7eb956205d4c616b4e52b2fcfa1e944d4860dd7b3a0
diff --git a/dev-python/pexpect/files/pexpect-4.8.0-fix-PS1.patch b/dev-python/pexpect/files/pexpect-4.8.0-fix-PS1.patch
deleted file mode 100644
index 903b742f71d3..000000000000
--- a/dev-python/pexpect/files/pexpect-4.8.0-fix-PS1.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-From: whitley-delamora <62795654+whitley-delamora@users.noreply.github.com>
-Date: Sat, 28 Mar 2020 13:46:47 +0100
-Subject: [PATCH] REPLWrapTestCase.test_bash_env(): export variable PS1
-
-https://github.com/pexpect/pexpect/commit/51c0b09f92f140eda10b62d234710f65ad56dee2
-
---- a/tests/test_replwrap.py
-+++ b/tests/test_replwrap.py
-@@ -45,6 +45,7 @@ def test_bash_env(self):
- """env, which displays PS1=..., should not mess up finding the prompt.
- """
- bash = replwrap.bash()
-+ res = bash.run_command("export PS1")
- res = bash.run_command("env")
- self.assertIn('PS1', res)
- res = bash.run_command("echo $HOME")
diff --git a/dev-python/pexpect/files/pexpect-4.8.0-py311.patch b/dev-python/pexpect/files/pexpect-4.8.0-py311.patch
deleted file mode 100644
index b7de17a68785..000000000000
--- a/dev-python/pexpect/files/pexpect-4.8.0-py311.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 52af5b0ae0627139524448a3f2e83d9f40802bc2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
-Date: Thu, 24 Mar 2022 15:15:33 +0100
-Subject: [PATCH] Convert @asyncio.coroutine to async def
-
-This is required for Python 3.11+ support.
-
-Fixes https://github.com/pexpect/pexpect/issues/677
----
- pexpect/_async.py | 16 +++++++---------
- 1 file changed, 7 insertions(+), 9 deletions(-)
-
-diff --git a/pexpect/_async.py b/pexpect/_async.py
-index dfbfeef5..bc83261d 100644
---- a/pexpect/_async.py
-+++ b/pexpect/_async.py
-@@ -4,8 +4,7 @@
-
- from pexpect import EOF
-
--@asyncio.coroutine
--def expect_async(expecter, timeout=None):
-+async def expect_async(expecter, timeout=None):
- # First process data that was previously read - if it maches, we don't need
- # async stuff.
- idx = expecter.existing_data()
-@@ -14,7 +13,7 @@ def expect_async(expecter, timeout=None):
- if not expecter.spawn.async_pw_transport:
- pw = PatternWaiter()
- pw.set_expecter(expecter)
-- transport, pw = yield from asyncio.get_event_loop()\
-+ transport, pw = await asyncio.get_event_loop()\
- .connect_read_pipe(lambda: pw, expecter.spawn)
- expecter.spawn.async_pw_transport = pw, transport
- else:
-@@ -22,26 +21,25 @@ def expect_async(expecter, timeout=None):
- pw.set_expecter(expecter)
- transport.resume_reading()
- try:
-- return (yield from asyncio.wait_for(pw.fut, timeout))
-+ return (await asyncio.wait_for(pw.fut, timeout))
- except asyncio.TimeoutError as e:
- transport.pause_reading()
- return expecter.timeout(e)
-
--@asyncio.coroutine
--def repl_run_command_async(repl, cmdlines, timeout=-1):
-+async def repl_run_command_async(repl, cmdlines, timeout=-1):
- res = []
- repl.child.sendline(cmdlines[0])
- for line in cmdlines[1:]:
-- yield from repl._expect_prompt(timeout=timeout, async_=True)
-+ await repl._expect_prompt(timeout=timeout, async_=True)
- res.append(repl.child.before)
- repl.child.sendline(line)
-
- # Command was fully submitted, now wait for the next prompt
-- prompt_idx = yield from repl._expect_prompt(timeout=timeout, async_=True)
-+ prompt_idx = await repl._expect_prompt(timeout=timeout, async_=True)
- if prompt_idx == 1:
- # We got the continuation prompt - command was incomplete
- repl.child.kill(signal.SIGINT)
-- yield from repl._expect_prompt(timeout=1, async_=True)
-+ await repl._expect_prompt(timeout=1, async_=True)
- raise ValueError("Continuation prompt found - input was incomplete:")
- return u''.join(res + [repl.child.before])
-
diff --git a/dev-python/pexpect/files/pexpect-4.8.0-sphinx-3.patch b/dev-python/pexpect/files/pexpect-4.8.0-sphinx-3.patch
deleted file mode 100644
index d23055fba251..000000000000
--- a/dev-python/pexpect/files/pexpect-4.8.0-sphinx-3.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 506bcd97fa1d20d1412d399353c38f0ff3546a1a Mon Sep 17 00:00:00 2001
-From: Sebastian Pipping <sebastian@pipping.org>
-Date: Mon, 13 Apr 2020 23:26:09 +0200
-Subject: [PATCH] Fix compilation of docs with Sphinx 3.0.1
-
-https://github.com/pexpect/pexpect/issues/637
----
- doc/sphinxext/github.py | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/doc/sphinxext/github.py b/doc/sphinxext/github.py
-index 519e146..771dccc 100644
---- a/doc/sphinxext/github.py
-+++ b/doc/sphinxext/github.py
-@@ -146,7 +146,6 @@ def setup(app):
-
- :param app: Sphinx application context.
- """
-- app.info('Initializing GitHub plugin')
- app.add_role('ghissue', ghissue_role)
- app.add_role('ghpull', ghissue_role)
- app.add_role('ghuser', ghuser_role)
---
-2.26.0
-
diff --git a/dev-python/pexpect/pexpect-4.8.0-r2.ebuild b/dev-python/pexpect/pexpect-4.8.0-r2.ebuild
deleted file mode 100644
index 9e985d413abf..000000000000
--- a/dev-python/pexpect/pexpect-4.8.0-r2.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
-PYTHON_REQ_USE="threads(+)"
-DISTUTILS_USE_SETUPTOOLS=no
-
-inherit distutils-r1
-
-DESCRIPTION="Python module for spawning child apps and responding to expected patterns"
-HOMEPAGE="https://pexpect.readthedocs.io/ https://pypi.org/project/pexpect/ https://github.com/pexpect/pexpect/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
-IUSE="examples"
-
-RDEPEND=">=dev-python/ptyprocess-0.5[${PYTHON_USEDEP}]"
-
-PATCHES=(
- "${FILESDIR}"/${P}-sphinx-3.patch
- "${FILESDIR}"/${P}-fix-PS1.patch
-)
-
-distutils_enable_tests pytest
-distutils_enable_sphinx doc
-
-src_test() {
- # workaround new readline defaults
- echo "set enable-bracketed-paste off" > "${T}"/inputrc || die
- local -x INPUTRC="${T}"/inputrc
- distutils-r1_src_test
-}
-
-python_install_all() {
- if use examples; then
- dodoc -r examples
- docompress -x /usr/share/doc/${PF}/examples
- fi
- distutils-r1_python_install_all
-}
diff --git a/dev-python/pexpect/pexpect-4.8.0-r3.ebuild b/dev-python/pexpect/pexpect-4.8.0-r3.ebuild
deleted file mode 100644
index 67a37a70dcc5..000000000000
--- a/dev-python/pexpect/pexpect-4.8.0-r3.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..11} pypy3 )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="Python module for spawning child apps and responding to expected patterns"
-HOMEPAGE="
- https://pexpect.readthedocs.io/
- https://pypi.org/project/pexpect/
- https://github.com/pexpect/pexpect/
-"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
-IUSE="examples"
-
-RDEPEND="
- >=dev-python/ptyprocess-0.5[${PYTHON_USEDEP}]
-"
-
-PATCHES=(
- "${FILESDIR}"/${P}-sphinx-3.patch
- "${FILESDIR}"/${P}-fix-PS1.patch
- "${FILESDIR}"/${P}-py311.patch
-)
-
-distutils_enable_tests pytest
-distutils_enable_sphinx doc
-
-src_test() {
- # workaround new readline defaults
- echo "set enable-bracketed-paste off" > "${T}"/inputrc || die
- local -x INPUTRC="${T}"/inputrc
- distutils-r1_src_test
-}
-
-python_install_all() {
- if use examples; then
- dodoc -r examples
- docompress -x /usr/share/doc/${PF}/examples
- fi
- distutils-r1_python_install_all
-}
diff --git a/dev-python/pexpect/pexpect-4.9.0.ebuild b/dev-python/pexpect/pexpect-4.9.0.ebuild
new file mode 100644
index 000000000000..a12292320218
--- /dev/null
+++ b/dev-python/pexpect/pexpect-4.9.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Python module for spawning child apps and responding to expected patterns"
+HOMEPAGE="
+ https://pexpect.readthedocs.io/
+ https://pypi.org/project/pexpect/
+ https://github.com/pexpect/pexpect/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
+IUSE="examples"
+
+RDEPEND="
+ >=dev-python/ptyprocess-0.5[${PYTHON_USEDEP}]
+"
+
+distutils_enable_tests pytest
+distutils_enable_sphinx doc \
+ dev-python/sphinxcontrib-github-alt
+
+src_test() {
+ # workaround new readline defaults
+ echo "set enable-bracketed-paste off" > "${T}"/inputrc || die
+ local -x INPUTRC="${T}"/inputrc
+
+ distutils-r1_src_test
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # flaky test on weaker arches
+ tests/test_performance.py
+ # requires zsh installed, not worth it
+ tests/test_replwrap.py::REPLWrapTestCase::test_zsh
+ # flaky
+ tests/test_env.py::TestCaseEnv::test_spawn_uses_env
+ )
+
+ case ${EPYTHON} in
+ python3.13)
+ EPYTEST_DESELECT+=(
+ # TODO: changes in python3.13's prompt?
+ tests/test_replwrap.py::REPLWrapTestCase::test_python
+ tests/test_replwrap.py::REPLWrapTestCase::test_no_change_prompt
+ )
+ ;;
+ esac
+
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest
+}
+
+python_install_all() {
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ distutils-r1_python_install_all
+}