public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pexpect/, dev-python/pexpect/files/
@ 2020-04-13 22:12 Sebastian Pipping
  0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Pipping @ 2020-04-13 22:12 UTC (permalink / raw
  To: gentoo-commits

commit:     6df79dfa10bd801c99c1698f81701f9ae0aa31d9
Author:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 13 21:54:22 2020 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Mon Apr 13 22:11:34 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6df79dfa

dev-python/pexpect: 4.8.0 + QA

Closes: https://bugs.gentoo.org/703100
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
Package-Manager: Portage-2.3.99, Repoman-2.3.22

 dev-python/pexpect/Manifest                        |  1 +
 .../pexpect/files/pexpect-4.8.0-sphinx-3.patch     | 25 ++++++++++++
 dev-python/pexpect/pexpect-4.8.0.ebuild            | 45 ++++++++++++++++++++++
 3 files changed, 71 insertions(+)

diff --git a/dev-python/pexpect/Manifest b/dev-python/pexpect/Manifest
index e4b654e92ba..db8deda521f 100644
--- a/dev-python/pexpect/Manifest
+++ b/dev-python/pexpect/Manifest
@@ -1 +1,2 @@
 DIST pexpect-4.6.0.tar.gz 148966 BLAKE2B 0ed1a3c31133bf618e4c75ea099efaa9bda9e2b7f92f46c54ad553ecc56487e5415b750334376a95599ada53e17e91efe7d4b65ad80bb4f6a1cf9d655a3c9685 SHA512 9a2b1ef19d885e69cfd17ba0519581f782574019010043e66d8b68f98ac86b359f4a1ca42f8bb0059a5dfdd43275ad93531c076cc0ac2049e109408961b46bbd
+DIST pexpect-4.8.0.tar.gz 157037 BLAKE2B 742642bd6b9ec3f6cdfad054d4fd22db56b4a55b746d675c27a8cdf824ea749ec4589e296dffa08778195f3ccd20feb56bc0fd5212984396ea5aa0555c41ca96 SHA512 7447ae2d1e13be422c894a8fd51c5aaa788e37ea7f0c798c88b77afd401fb3631400a637077ccbb83c2e3876b0d0c5e1dbd5fdc9d3739d785b4d5ad7c0192580

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
new file mode 100644
index 00000000000..d23055fba25
--- /dev/null
+++ b/dev-python/pexpect/files/pexpect-4.8.0-sphinx-3.patch
@@ -0,0 +1,25 @@
+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.ebuild b/dev-python/pexpect/pexpect-4.8.0.ebuild
new file mode 100644
index 00000000000..3de5f455d3b
--- /dev/null
+++ b/dev-python/pexpect/pexpect-4.8.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{6,7,8} 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 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="doc examples"
+
+RDEPEND=">=dev-python/ptyprocess-0.5[${PYTHON_USEDEP}]"
+DEPEND="
+	doc? ( dev-python/sphinx )"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-sphinx-3.patch
+)
+
+distutils_enable_tests pytest
+
+python_compile_all() {
+	use doc && emake -C doc html
+}
+
+python_install_all() {
+	use doc && local HTML_DOCS=( doc/_build/html/. )
+	if use examples; then
+		dodoc -r examples
+		docompress -x /usr/share/doc/${PF}/examples
+	fi
+	distutils-r1_python_install_all
+
+	# Address byte-compile QA warning, see https://bugs.gentoo.org/703100
+	python_setup -2
+	rm "${D}$(python_get_sitedir)"/pexpect/_async.py || die
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pexpect/, dev-python/pexpect/files/
@ 2022-05-09 20:38 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2022-05-09 20:38 UTC (permalink / raw
  To: gentoo-commits

commit:     c2d15a210f6ce13cd4673222bad4d365da6dcdad
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon May  9 18:12:34 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon May  9 20:34:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2d15a21

dev-python/pexpect: Enable py3.11

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pexpect/files/pexpect-4.8.0-py311.patch | 67 ++++++++++++++++++++++
 dev-python/pexpect/pexpect-4.8.0-r3.ebuild         |  3 +-
 2 files changed, 69 insertions(+), 1 deletion(-)

diff --git a/dev-python/pexpect/files/pexpect-4.8.0-py311.patch b/dev-python/pexpect/files/pexpect-4.8.0-py311.patch
new file mode 100644
index 000000000000..b7de17a68785
--- /dev/null
+++ b/dev-python/pexpect/files/pexpect-4.8.0-py311.patch
@@ -0,0 +1,67 @@
+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/pexpect-4.8.0-r3.ebuild b/dev-python/pexpect/pexpect-4.8.0-r3.ebuild
index 22046e4dcd82..67a37a70dcc5 100644
--- a/dev-python/pexpect/pexpect-4.8.0-r3.ebuild
+++ b/dev-python/pexpect/pexpect-4.8.0-r3.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
 PYTHON_REQ_USE="threads(+)"
 
 inherit distutils-r1
@@ -29,6 +29,7 @@ RDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${P}-sphinx-3.patch
 	"${FILESDIR}"/${P}-fix-PS1.patch
+	"${FILESDIR}"/${P}-py311.patch
 )
 
 distutils_enable_tests pytest


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pexpect/, dev-python/pexpect/files/
@ 2023-06-27 12:01 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2023-06-27 12:01 UTC (permalink / raw
  To: gentoo-commits

commit:     31373f95a21dbcf732a1c8eacba65779298e4149
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 27 11:59:10 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jun 27 11:59:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31373f95

dev-python/pexpect: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pexpect/Manifest                        |  1 -
 .../pexpect/files/pexpect-4.8.0-fix-PS1.patch      | 16 ------
 dev-python/pexpect/files/pexpect-4.8.0-py311.patch | 67 ----------------------
 .../pexpect/files/pexpect-4.8.0-sphinx-3.patch     | 25 --------
 dev-python/pexpect/pexpect-4.8.0-r3.ebuild         | 50 ----------------
 5 files changed, 159 deletions(-)

diff --git a/dev-python/pexpect/Manifest b/dev-python/pexpect/Manifest
index 59920b3f9b8d..f26be5381a34 100644
--- a/dev-python/pexpect/Manifest
+++ b/dev-python/pexpect/Manifest
@@ -1,2 +1 @@
-DIST pexpect-4.8.0.tar.gz 157037 BLAKE2B 742642bd6b9ec3f6cdfad054d4fd22db56b4a55b746d675c27a8cdf824ea749ec4589e296dffa08778195f3ccd20feb56bc0fd5212984396ea5aa0555c41ca96 SHA512 7447ae2d1e13be422c894a8fd51c5aaa788e37ea7f0c798c88b77afd401fb3631400a637077ccbb83c2e3876b0d0c5e1dbd5fdc9d3739d785b4d5ad7c0192580
 DIST pexpect-4.8.0_p20230402.gh.tar.gz 169420 BLAKE2B 4780621f5876506c5ad2dbf03656d8c336d5aadef99b1ae99e841b5d0a945ab54177cb04a79b526e422cd4df7393c723000e4a28960bd5f57a5e0173b0a3bc69 SHA512 72cdf226ec5c7d60a10fbcecf81cd1ae422467652e104bb818908bf6d1a4a4bcadab9a06d58475a9609580d973956e18e2ab144ab13a0b700072474ff3087259

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-r3.ebuild b/dev-python/pexpect/pexpect-4.8.0-r3.ebuild
deleted file mode 100644
index 38a771d8a8a6..000000000000
--- a/dev-python/pexpect/pexpect-4.8.0-r3.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9..11} 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 ~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
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pexpect/, dev-python/pexpect/files/
@ 2024-10-14 12:42 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2024-10-14 12:42 UTC (permalink / raw
  To: gentoo-commits

commit:     5ca38413ca6f234f251db928382fcf4d80e12f10
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 11 19:21:51 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Oct 14 12:39:27 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ca38413

dev-python/pexpect: Enable python3_13t

Closes: https://github.com/gentoo/gentoo/pull/38918
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pexpect/files/pexpect-4.9.0-py313.patch | 37 ++++++++++++++++++++++
 dev-python/pexpect/pexpect-4.9.0.ebuild            | 17 ++++------
 2 files changed, 43 insertions(+), 11 deletions(-)

diff --git a/dev-python/pexpect/files/pexpect-4.9.0-py313.patch b/dev-python/pexpect/files/pexpect-4.9.0-py313.patch
new file mode 100644
index 000000000000..838cfdd22d86
--- /dev/null
+++ b/dev-python/pexpect/files/pexpect-4.9.0-py313.patch
@@ -0,0 +1,37 @@
+From 95d09c54d2502d8d48f2da591089ceb6d09df056 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
+Date: Wed, 29 May 2024 12:21:52 +0200
+Subject: [PATCH] Force NO_COLOR=1 to fix test failures with Python 3.13+ REPL
+
+Python 3.13+ has colors now. Always setting this variable should be safe.
+---
+ pexpect/replwrap.py    | 2 +-
+ tests/test_replwrap.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pexpect/replwrap.py b/pexpect/replwrap.py
+index 08dbd5e8..c8714a23 100644
+--- a/pexpect/replwrap.py
++++ b/pexpect/replwrap.py
+@@ -35,7 +35,7 @@ def __init__(self, cmd_or_spawn, orig_prompt, prompt_change,
+                  continuation_prompt=PEXPECT_CONTINUATION_PROMPT,
+                  extra_init_cmd=None):
+         if isinstance(cmd_or_spawn, basestring):
+-            self.child = pexpect.spawn(cmd_or_spawn, echo=False, encoding='utf-8')
++            self.child = pexpect.spawn(cmd_or_spawn, echo=False, encoding='utf-8', env={'NO_COLOR': '1'})
+         else:
+             self.child = cmd_or_spawn
+         if self.child.echo:
+diff --git a/tests/test_replwrap.py b/tests/test_replwrap.py
+index ddafa5d6..5ac782a4 100644
+--- a/tests/test_replwrap.py
++++ b/tests/test_replwrap.py
+@@ -124,7 +124,7 @@ def test_no_change_prompt(self):
+         if platform.python_implementation() == 'PyPy':
+             raise unittest.SkipTest(skip_pypy)
+ 
+-        child = pexpect.spawn(sys.executable, echo=False, timeout=5, encoding='utf-8')
++        child = pexpect.spawn(sys.executable, echo=False, timeout=5, encoding='utf-8', env={'NO_COLOR': '1'})
+         # prompt_change=None should mean no prompt change
+         py = replwrap.REPLWrapper(child, u">>> ", prompt_change=None,
+                                   continuation_prompt=u"... ")

diff --git a/dev-python/pexpect/pexpect-4.9.0.ebuild b/dev-python/pexpect/pexpect-4.9.0.ebuild
index 93f20c1b16ab..a6a72d9e35dc 100644
--- a/dev-python/pexpect/pexpect-4.9.0.ebuild
+++ b/dev-python/pexpect/pexpect-4.9.0.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..13} pypy3 )
+PYTHON_COMPAT=( python3_{10..13} python3_13t pypy3 )
 PYTHON_REQ_USE="threads(+)"
 
 inherit distutils-r1 pypi
@@ -29,6 +29,11 @@ distutils_enable_tests pytest
 distutils_enable_sphinx doc \
 	dev-python/sphinxcontrib-github-alt
 
+PATCHES=(
+	# https://github.com/pexpect/pexpect/pull/794
+	"${FILESDIR}/${P}-py313.patch"
+)
+
 src_test() {
 	# workaround new readline defaults
 	echo "set enable-bracketed-paste off" > "${T}"/inputrc || die
@@ -47,16 +52,6 @@ python_test() {
 		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
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-14 12:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-09 20:38 [gentoo-commits] repo/gentoo:master commit in: dev-python/pexpect/, dev-python/pexpect/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-10-14 12:42 Michał Górny
2023-06-27 12:01 Michał Górny
2020-04-13 22:12 Sebastian Pipping

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox